‹ 首页

afx

@cluesmith · 收录于 5 天前 · 上游提交 6 天前

Agent Farm CLI — the tool for spawning builders, managing Tower, workspaces, and cron tasks. ALWAYS consult this skill BEFORE running any `afx` command to get the exact syntax. This prevents wasting time guessing flags that don't exist. Use this whenever you need to spawn a builder, check status, send messages, clean up worktrees, manage Tower, or run cron tasks. If you're about to type `afx` followed by anything, check here first.

适合你,如果你需要从命令行管理多个 agent 工作流和定时任务。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add cluesmith/codev/afx
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- cluesmith/codev/afx
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify cluesmith/codev/afx
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
282GitHub stars
~1.5K最小装载
~1.5K含声明引用
~2K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 12d42bb · 表述以原文为准
它做什么

当用户询问或需要执行 `afx` 命令时,Claude 会根据此技能提供准确的命令格式、可用选项和示例,避免使用不存在的命令行标志。

什么时候触发

当用户提到要生成 builder、查看状态、发送消息、清理工作树、管理 Tower 或运行 cron 任务,或者输入 `afx` 命令时触发。

装好后可以这样说
Claude会给出正确的命令和必需参数。
Claude会展示cleanup子命令及其标志。
Claude会解释send命令和寻址方式。
技能原文 SKILL.md作者撰写 · Apache-2.0 · 12d42bb

Agent Farm CLI

afx spawn

Spawns a new builder in an isolated git worktree.

afx spawn [number] [options]

The ONLY flags that exist:

| Flag | Description | |------|-------------| | --protocol <name> | Protocol: spir, aspir, air, bugfix, tick, maintain, experiment. Required for numbered spawns. | | --task <text> | Ad-hoc task (no issue number needed) | | --shell | Bare Claude session | | --worktree | Bare worktree session | | --amends <number> | Original spec number (TICK only) | | --files <files> | Context files, comma-separated. Requires --task. | | --no-comment | Skip commenting on the GitHub issue | | --force | Skip dirty-worktree and collision checks | | --soft | Soft mode (AI follows protocol, you verify) | | --strict | Strict mode (porch orchestrates) — this is the default | | --resume | Resume builder in existing worktree | | --no-role | Skip loading role prompt |

There is NO -t, --title, --name, or --branch flag. The branch name is auto-generated from the issue title.

Examples:

afx spawn 42 --protocol spir           # SPIR builder for issue #42
afx spawn 42 --protocol aspir          # ASPIR (autonomous, no human gates)
afx spawn 42 --protocol air            # AIR (small features)
afx spawn 42 --protocol bugfix         # Bugfix
afx spawn 42 --protocol tick --amends 30  # TICK amendment to spec 30
afx spawn 42 --protocol spir --soft    # Soft mode
afx spawn 42 --resume                  # Resume existing builder
afx spawn --task "fix the flaky test"  # Ad-hoc task (no issue)
afx spawn 42 --protocol spir --force   # Skip dirty-worktree check

Pre-spawn checklist:

  1. git status — worktree must be clean (or use --force)
  2. Commit specs/plans first — builders branch from HEAD and can't see uncommitted files
  3. --protocol is required for numbered spawns
afx send

Sends a message to a running builder.

afx send [builder] [message]

| Flag | Description | |------|-------------| | --all | Send to all builders | | --file <path> | Include file content | | --interrupt | Send Ctrl+C first | | --raw | Skip structured formatting | | --no-enter | Don't press Enter after message |

afx send 0042 "PR approved, please merge"
afx send 0585 "check the test output" --file /tmp/test-results.txt

Addressing forms — the recipient isn't only a builder ID:

| Form | Routes to | |------|-----------| | afx send 0585 "…" | Builder 0585 (zero-padded). | | afx send architect "…" | From a builder: its spawning architect. From an architect: the main architect (else first registered). | | afx send architect:<name> "…" | A specific named architect (sibling-architect messaging). Architects can address any architect; a builder may only use its own spawnedByArchitect. | | afx send <workspace>:architect "…" | The architect in another workspace (cross-workspace). |

afx send architect:ob-refine "PR-iter-2 feedback ready"   # sibling architect, same workspace
afx send taqwabench:architect "use porch.checks, don't fork protocol.json"  # cross-workspace

Find the exact workspace name first — guessing fails with NOT_FOUND. The name is the basename of the workspace path, which can differ from how someone refers to it. List active workspaces via the Tower API:

curl -s http://localhost:4100/api/workspaces | python3 -m json.tool   # → each .name is a valid <workspace> address
afx cleanup

Removes a builder's worktree and branch after work is done.

afx cleanup [options]

| Flag | Description | |------|-------------| | -p, --project <id> | Builder project ID (no leading zeros: 585 not 0585) | | -i, --issue <number> | Cleanup bugfix builder by issue number | | -t, --task <id> | Cleanup task builder (e.g., task-bEPd) | | -f, --force | Force cleanup even if branch not merged |

afx cleanup -p 585              # Clean up project 585
afx cleanup -p 585 -f           # Force (unmerged branch)

Note: afx cleanup uses plain numbers (585), not zero-padded (0585). But afx send uses zero-padded IDs (0585).

afx status
afx status                      # Show all builders and workspace status

No flags needed. Shows Tower status, workspace, and all active builders.

afx whoami
afx whoami                      # Report this terminal's identity (workspace, type, name)
afx whoami --json               # Same, as a single JSON object

Resolves identity from Tower/global.db's perspective: builder-worktree cwd match first, then the Tower-injected CODEV_ARCHITECT_NAME env var. Exits 1 with an explanation when identity cannot be determined — it never guesses and never defaults to main (issue #1094). Builders also get an architect: field naming their spawning architect when recorded. Works without Tower.

afx tower
afx tower start                 # Start Tower on port 4100
afx tower stop                  # Stop Tower
afx tower log                   # Tail Tower logs
afx tower status                # Check daemon and cloud connection status
afx tower connect               # Connect to Codev Cloud
afx tower disconnect            # Disconnect from Codev Cloud

There is NO afx tower restart — use afx tower stop && afx tower start.

afx workspace
afx workspace start             # Start workspace for current project
afx workspace stop              # Stop workspace processes

afx dash is a deprecated alias — use afx workspace instead.

afx cron
afx cron list                   # List all cron tasks
afx cron status <name>          # Check task status
afx cron run <name>             # Run immediately
afx cron enable <name>          # Enable
afx cron disable <name>         # Disable

There is NO afx cron add — create YAML files in .af-cron/ directly.

Other commands
afx open <file>                 # Open file in annotation viewer (NOT system open)
afx shell                       # Spawn utility shell
afx attach                      # Attach to running builder terminal
afx rename <name>               # Rename current shell session
afx architect                   # Start architect session in current terminal
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。