Skip to content

Commit 53d7844

Browse files
barckcodeclaude
andcommitted
refactor: restructure with agent type prefix (cc/oc)
Reorganize into claude_code/ and open_code/ top-level directories so each agent type has its own namespace. Image naming follows agentcrew-{cc|oc}-{name} convention. Pipeline updated to detect changes at 2-level depth and compute image names automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0c41551 commit 53d7844

4 files changed

Lines changed: 79 additions & 28 deletions

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
workflow_dispatch:
1212
inputs:
1313
image:
14-
description: 'Specific image directory to build (leave empty to build all)'
14+
description: 'Image path to build, e.g. claude_code/aws (leave empty to build all)'
1515
required: false
1616
type: string
1717

@@ -30,6 +30,12 @@ jobs:
3030
- name: Determine which images to build
3131
id: changes
3232
run: |
33+
# Helper: find all image dirs (2 levels: agent_type/image_name)
34+
find_all() {
35+
find . -maxdepth 3 -mindepth 3 -name Dockerfile -exec dirname {} \; \
36+
| sed 's|^./||' | sort
37+
}
38+
3339
if [[ -n "${{ inputs.image }}" ]]; then
3440
# Manual trigger: specific image
3541
if [[ ! -f "${{ inputs.image }}/Dockerfile" ]]; then
@@ -40,21 +46,19 @@ jobs:
4046
4147
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
4248
# Manual trigger without input: build all
43-
dirs=$(find . -maxdepth 2 -name Dockerfile -exec dirname {} \; \
44-
| sed 's|^./||' | sort | jq -R . | jq -s -c .)
49+
dirs=$(find_all | jq -R . | jq -s -c .)
4550
4651
else
4752
# Push event: check what changed
4853
prev_commit="${{ github.event.before }}"
4954
50-
# Handle first push (no previous commit)
5155
if [[ "$prev_commit" == "0000000000000000000000000000000000000000" ]]; then
52-
dirs=$(find . -maxdepth 2 -name Dockerfile -exec dirname {} \; \
53-
| sed 's|^./||' | sort | jq -R . | jq -s -c .)
56+
dirs=$(find_all | jq -R . | jq -s -c .)
5457
else
55-
# Only build directories that changed
58+
# Detect changed image dirs (agent_type/image_name)
5659
dirs=$(git diff --name-only "$prev_commit" HEAD \
57-
| grep '/' | cut -d'/' -f1 | sort -u \
60+
| grep -E '^[^/]+/[^/]+/' \
61+
| cut -d'/' -f1,2 | sort -u \
5862
| while read -r dir; do
5963
[[ -f "$dir/Dockerfile" ]] && echo "$dir"
6064
done | jq -R . | jq -s -c .)
@@ -86,9 +90,23 @@ jobs:
8690
steps:
8791
- uses: actions/checkout@v4
8892

89-
- name: Read version
90-
id: version
91-
run: echo "version=$(cat ${{ matrix.image }}/VERSION)" >> "$GITHUB_OUTPUT"
93+
- name: Compute image name and version
94+
id: meta
95+
run: |
96+
dir="${{ matrix.image }}"
97+
agent_type="${dir%%/*}"
98+
image_name="${dir#*/}"
99+
100+
case "$agent_type" in
101+
claude_code) prefix="cc" ;;
102+
open_code) prefix="oc" ;;
103+
*) echo "::error::Unknown agent type: $agent_type"; exit 1 ;;
104+
esac
105+
106+
version=$(cat "$dir/VERSION")
107+
108+
echo "tag=agentcrew-${prefix}-${image_name}" >> "$GITHUB_OUTPUT"
109+
echo "version=$version" >> "$GITHUB_OUTPUT"
92110
93111
- name: Set up QEMU
94112
uses: docker/setup-qemu-action@v3
@@ -110,8 +128,8 @@ jobs:
110128
platforms: linux/amd64,linux/arm64
111129
push: true
112130
tags: |
113-
ghcr.io/helmcode/agentcrew-${{ matrix.image }}:${{ steps.version.outputs.version }}
114-
ghcr.io/helmcode/agentcrew-${{ matrix.image }}:latest
131+
ghcr.io/helmcode/${{ steps.meta.outputs.tag }}:${{ steps.meta.outputs.version }}
132+
ghcr.io/helmcode/${{ steps.meta.outputs.tag }}:latest
115133
labels: |
116134
org.opencontainers.image.source=https://github.com/helmcode/agent_crew_marketplace
117-
org.opencontainers.image.description=AgentCrew marketplace image - ${{ matrix.image }}
135+
org.opencontainers.image.description=AgentCrew marketplace image - ${{ steps.meta.outputs.tag }}

README.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,64 @@
22

33
Pre-built custom agent images for [AgentCrew](https://github.com/helmcode/agent_crew).
44

5-
Each directory contains a `Dockerfile` that extends the official AgentCrew agent base images with additional tools and dependencies for specific use cases.
5+
## Repository Structure
66

7-
## Usage
7+
```
8+
<agent_type>/<image_name>/
9+
├── Dockerfile
10+
└── VERSION
11+
```
12+
13+
| Directory | Base Image | Image Prefix |
14+
|-----------|-----------|--------------|
15+
| `claude_code/` | `ghcr.io/helmcode/agent_crew_agent:latest` | `agentcrew-cc-` |
16+
| `open_code/` | `ghcr.io/helmcode/agent_crew_opencode_agent:latest` | `agentcrew-oc-` |
817

9-
Set the **Custom Agent Image** field when creating or editing a team in the AgentCrew UI:
18+
### Naming Convention
1019

1120
```
12-
ghcr.io/helmcode/agentcrew-<image-name>:latest
21+
ghcr.io/helmcode/agentcrew-{prefix}-{image_name}:{version}
1322
```
1423

24+
Examples:
25+
26+
| Path | Published Image |
27+
|------|----------------|
28+
| `claude_code/aws/` | `ghcr.io/helmcode/agentcrew-cc-aws:latest` |
29+
| `claude_code/gcp/` | `ghcr.io/helmcode/agentcrew-cc-gcp:latest` |
30+
| `open_code/aws/` | `ghcr.io/helmcode/agentcrew-oc-aws:latest` |
31+
1532
## Available Images
1633

17-
| Image | Base | Description |
18-
|-------|------|-------------|
19-
| [`aws`](aws/) | Claude Code Agent | AWS CLI v2 |
34+
### Claude Code (`cc`)
35+
36+
| Image | Description | Usage |
37+
|-------|-------------|-------|
38+
| [`aws`](claude_code/aws/) | AWS CLI v2 | `ghcr.io/helmcode/agentcrew-cc-aws:latest` |
2039

21-
## Building Custom Images
40+
### OpenCode (`oc`)
41+
42+
*Coming soon*
43+
44+
## Usage
45+
46+
Set the **Custom Agent Image** field when creating or editing a team in the AgentCrew UI.
2247

2348
See the [Custom Agent Images](https://agentcrew.sh/docs/configuration#custom-agent-images) documentation.
2449

2550
## Contributing
2651

27-
1. Create a new directory with a descriptive name
28-
2. Add a `Dockerfile` extending one of the base images:
29-
- `ghcr.io/helmcode/agent_crew_agent:latest` (Claude Code)
30-
- `ghcr.io/helmcode/agent_crew_opencode_agent:latest` (OpenCode)
31-
3. Add a `VERSION` file with the image version (e.g., `0.1.0`)
32-
4. Push to `main` — only the changed directory will be built and published
52+
1. Choose the agent type directory: `claude_code/` or `open_code/`
53+
2. Create a subdirectory with a descriptive name (e.g., `aws`, `gcp`, `playwright`)
54+
3. Add a `Dockerfile` extending the corresponding base image:
55+
- Claude Code → `FROM ghcr.io/helmcode/agent_crew_agent:latest`
56+
- OpenCode → `FROM ghcr.io/helmcode/agent_crew_opencode_agent:latest`
57+
4. Add a `VERSION` file with the image version (e.g., `0.1.0`)
58+
5. Push to `main` — only changed directories are built and published
59+
60+
### CI Pipeline
61+
62+
- **Push to `main`**: detects changed directories and builds only those images
63+
- **Manual trigger**: build all images or a specific one (e.g., `claude_code/aws`)
64+
- All images are built for **linux/amd64** and **linux/arm64**
65+
- Each image is tagged with its `VERSION` and `latest`
File renamed without changes.

0 commit comments

Comments
 (0)