agent-cli-dev
Spawns AI coding agents in isolated git worktrees. Use when the user asks to spawn or launch an agent, delegate a task to a separate agent, or parallelize development across features. Only create a worktree without starting an agent if the user explicitly wants setup only.
Best use case
agent-cli-dev is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Spawns AI coding agents in isolated git worktrees. Use when the user asks to spawn or launch an agent, delegate a task to a separate agent, or parallelize development across features. Only create a worktree without starting an agent if the user explicitly wants setup only.
Teams using agent-cli-dev should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How agent-cli-dev Compares
| Feature / Agent | agent-cli-dev | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Spawns AI coding agents in isolated git worktrees. Use when the user asks to spawn or launch an agent, delegate a task to a separate agent, or parallelize development across features. Only create a worktree without starting an agent if the user explicitly wants setup only.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Parallel Development with agent-cli dev
This skill teaches you how to spawn parallel AI coding agents in isolated git worktrees using the `agent-cli dev` command.
`agent-cli dev` supports two complementary patterns:
- Separate worktrees for isolated implementation/review tasks
- Multiple agents on the same worktree using `dev agent --tmux-session <unique-name>` for autonomous launches, or `-m tmux` when a human explicitly wants shared tmux windows
## Installation
If `agent-cli` is not available, install it first:
```bash
# Install globally
uv tool install agent-cli -p 3.13
# Or run directly without installing
uvx --python 3.13 agent-cli dev new <branch-name> --prompt "..."
```
## When to spawn parallel agents
Spawn separate agents when:
- Multiple independent features/tasks can be worked on in parallel
- Tasks benefit from isolation (separate branches, no conflicts)
- Large refactoring that can be split by module/component
- Test-driven development (one agent for tests, one for implementation)
Do NOT spawn when:
- Tasks are small and sequential
- Tasks have tight dependencies requiring constant coordination
- The overhead of context switching exceeds the benefit
## Core command
For new features (starts from origin/main):
```bash
agent-cli dev new <branch-name> --prompt "Implement the new feature..."
```
For work on current branch (review, test, fix) - use `--from HEAD`:
```bash
agent-cli dev new <branch-name> --from HEAD --prompt "Review/test/fix..."
```
For longer prompts (recommended for multi-line or complex instructions):
```bash
agent-cli dev new <branch-name> --from HEAD --prompt-file path/to/prompt.md
```
This creates:
1. A new git worktree with its own branch
2. Runs project setup (installs dependencies)
3. Saves your prompt to a unique task file in `.claude/` in the worktree (for reference)
4. Opens a new terminal tab with an AI coding agent
5. Passes your prompt to the agent
**Important**: Use `--prompt-file` for prompts longer than a single line. The `--prompt` option passes text through the shell, which can cause issues with special characters (exclamation marks, dollar signs, backticks, quotes) in ZSH and other shells. Using `--prompt-file` avoids all shell quoting issues.
## Automation rule
When an assistant is executing this workflow on the user's behalf, the spawn is not complete unless the agent receives a prompt at launch time.
- Prefer `--prompt-file`; create the prompt file first, then launch the agent
- Use `dev new ... --prompt-file ...` for a new delegated task
- Use `dev agent ... --prompt-file ...` for another agent in an existing worktree
- Do not stop after `dev new ...` alone if the user's intent was to delegate work immediately
- Do not run `dev new ... --start-agent`, `dev new ... --agent <name>`, or `dev agent ... -m tmux` without `--prompt` or `--prompt-file` unless the user explicitly wants an interactive session that they will drive manually
## Writing effective prompts for spawned agents
Spawned agents work in isolation, so prompts must be **self-contained**. Include:
1. **Clear task description**: What to implement/fix/refactor
2. **Relevant context**: File locations, patterns to follow, constraints
3. **Report request**: Ask the agent to write conclusions to `.claude/REPORT.md`
### Using --prompt-file (recommended)
For any prompt longer than a single sentence:
1. Write the prompt to a temporary file (e.g., `.claude/spawn-prompt.md`)
2. Use `--prompt-file` to pass it to the agent
3. The file can be deleted after spawning
Example workflow:
```bash
# 1. Write prompt to file
# 2. Spawn agent with the file
agent-cli dev new my-feature --prompt-file .claude/spawn-prompt.md
# 3. Optionally clean up
rm .claude/spawn-prompt.md
```
### Prompt template
```
<Task description>
Context:
- <Key file locations>
- <Patterns to follow>
- <Constraints or requirements>
When complete, write a summary to .claude/REPORT.md including:
- What you implemented/changed
- Key decisions you made
- Any questions or concerns for review
```
## Checking spawned agent results
After spawning, you can check progress:
```bash
# List all worktrees and their status
agent-cli dev status
# Read an agent's report
agent-cli dev run <branch-name> cat .claude/REPORT.md
# Open the worktree in your editor
agent-cli dev editor <branch-name>
```
## Same-branch multi-agent workflow
Use this when several agents should inspect or validate the same code at once without separate worktrees.
```bash
# Create the worktree once. This step only prepares the shared workspace.
agent-cli dev new review-auth --from HEAD
# Then launch the actual agents with prompts. Give each agent its own tmux session.
agent-cli dev agent review-auth \
--tmux-session review-auth-security-20260402-1530 \
--prompt-file .claude/review-security.md
agent-cli dev agent review-auth \
--tmux-session review-auth-performance-20260402-1530 \
--prompt-file .claude/review-performance.md
agent-cli dev agent review-auth \
--tmux-session review-auth-tests-20260402-1530 \
--prompt-file .claude/review-tests.md
```
Key rules for same-worktree launches:
- Use `dev agent`, not `dev new`, after the worktree already exists
- Use `dev agent --agent <agent>` to select a specific agent for an existing worktree; `--with-agent` remains a deprecated alias on this subcommand
- For autonomous agents, prefer `--tmux-session <unique-name>` and use a different session name for each launch
- Reserve bare `-m tmux` for human-driven grouped windows or when the user explicitly wants agents to share one tmux session
- Outside tmux, bare `-m tmux` joins the deterministic repo-scoped tmux session
- Inside tmux, bare `-m tmux` opens a new window in the current session unless you pass `--tmux-session <name>`, which reuses or creates a specific tmux session and also implies `-m tmux`
- tmux session names cannot contain `.` or `:`
- Ask each agent to write to a unique report path such as `.claude/REPORT-security-<run-id>.md` or `.claude/REPORT-tests-<run-id>.md`
- If you rerun the same prompt repeatedly, include a timestamp or other run id in the report filename so later runs do not overwrite earlier ones
- Each agent launch gets its own unique task file in `.claude/` (e.g., `TASK-{timestamp}-{hex}.md`), so parallel launches do not overwrite each other
### Prompt guidance for shared worktrees
When multiple agents share a worktree, explicitly assign both a focus area and a unique report file. If you rerun the same review prompt often, prefer a timestamped filename such as `.claude/REPORT-security-20260319-153045-123.md`.
Prompt pattern:
```text
Review the auth module for security issues only.
When complete, write findings to .claude/REPORT-security-20260319-153045-123.md including:
- Summary
- Issues found with file/line references
- Suggested fixes
```
## Headless/scripted orchestration
For non-interactive contexts (scripts, cron jobs, other assistants), combine `--prompt-file` with `--tmux-session`:
```bash
agent-cli dev new validation-a --from HEAD --agent codex \
--tmux-session validation-a-20260402-1530 \
--prompt-file .claude/validation-a.md
```
This works without an attached terminal. For autonomous or scripted launches, prefer a unique `--tmux-session` per agent so separate runs do not trample each other by sharing one tmux session. Use bare `-m tmux` only when you explicitly want shared tmux grouping. Launches may also run pre-launch preparation by default; use `--no-hooks` only when you explicitly need to bypass that behavior.
## Cleanup behavior
- `dev rm` and `dev clean` also clean up tmux windows that `agent-cli` tagged for the worktree
- If git worktree removal succeeds but tmux cleanup is partial, the command warns and still removes the worktree
- Session isolation prevents agents from interfering with each other's tmux windows during execution, but cleanup still applies to all tagged windows for the worktree
## Example: Multi-feature implementation
If asked to implement auth, payments, and notifications:
```bash
# Spawn three parallel agents
agent-cli dev new auth-feature --prompt "Implement JWT authentication..."
agent-cli dev new payment-integration --prompt "Add Stripe payment processing..."
agent-cli dev new email-notifications --prompt "Implement email notification system..."
```
Each agent works independently in its own branch. Results can be reviewed and merged separately.
## Key options
| Option | Description |
|--------|-------------|
| `--start-agent` | Start the default/auto-detected agent without an initial prompt |
| `--prompt` / `-p` | Initial prompt for the agent (short prompts only) |
| `--prompt-file` / `-P` | Read prompt from file (recommended for longer prompts) |
| `--from` / `-f` | Base ref (default: origin/main). **Use `--from HEAD` when reviewing/testing current branch!** |
| `--agent` | Specific agent (or `auto`): claude, aider, codex, gemini |
| `--agent-args` | Extra arguments for the agent |
| `--tmux-session` | Reuse or create a specific tmux session. For autonomous agents, prefer a unique name per launch |
@examples.mdRelated Skills
workspace-surface-audit
Audit the active repo, MCP servers, plugins, connectors, env surfaces, and harness setup, then recommend the highest-value ECC-native skills, hooks, agents, and operator workflows. Use when the user wants help setting up Claude Code or understanding what capabilities are actually available in their environment.
ui-demo
Record polished UI demo videos using Playwright. Use when the user asks to create a demo, walkthrough, screen recording, or tutorial video of a web application. Produces WebM videos with visible cursor, natural pacing, and professional feel.
token-budget-advisor
Offers the user an informed choice about how much response depth to consume before answering. Use this skill when the user explicitly wants to control response length, depth, or token budget. TRIGGER when: "token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed answer", "exhaustive answer", "respuesta corta vs larga", "cuántos tokens", "ahorrar tokens", "responde al 50%", "dame la versión corta", "quiero controlar cuánto usas", or clear variants where the user is explicitly asking to control answer size or depth. DO NOT TRIGGER when: user has already specified a level in the current session (maintain it), the request is clearly a one-word answer, or "token" refers to auth/session/payment tokens rather than response size.
skill-comply
Visualize whether skills, rules, and agent definitions are actually followed — auto-generates scenarios at 3 prompt strictness levels, runs agents, classifies behavioral sequences, and reports compliance rates with full tool call timelines
santa-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
safety-guard
Use this skill to prevent destructive operations when working on production systems or running agents autonomously.
repo-scan
Cross-stack source code asset audit — classifies every file, detects embedded third-party libraries, and delivers actionable four-level verdicts per module with interactive HTML reports.
project-flow-ops
Operate execution flow across GitHub and Linear by triaging issues and pull requests, linking active work, and keeping GitHub public-facing while Linear remains the internal execution layer. Use when the user wants backlog control, PR triage, or GitHub-to-Linear coordination.
product-lens
Use this skill to validate the "why" before building, run product diagnostics, and pressure-test product direction before the request becomes an implementation contract.
openclaw-persona-forge
为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡, 输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。 如当前环境提供已审核的生图 skill,可自动生成统一风格头像图片。 当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。 不适用于:微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。 触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、 龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、 lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。
manim-video
Build reusable Manim explainers for technical concepts, graphs, system diagrams, and product walkthroughs, then hand off to the wider ECC video stack if needed. Use when the user wants a clean animated explainer rather than a generic talking-head script.
laravel-plugin-discovery
Discover and evaluate Laravel packages via LaraPlugins.io MCP. Use when the user wants to find plugins, check package health, or assess Laravel/PHP compatibility.