basnijholt/agent-cli/skill
Claude Code and agent skill by basnijholt/agent-cli
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install basnijholt/agent-cli/skillSKILL.md
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 tmuxwhen a human explicitly wants shared tmux windows
Installation
If agent-cli is not available, install it first:
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):
For work on current branch (review, test, fix) - use --from HEAD:
For longer prompts (recommended for multi-line or complex instructions):
This creates:
- A new git worktree with its own branch
- Runs project setup (installs dependencies)
- Saves your prompt to a unique task file in
.claude/in the worktree (for reference) - Opens a new terminal tab with an AI coding agent
- 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>, ordev agent ... -m tmuxwithout--promptor--prompt-fileunless 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:
- Clear task description: What to implement/fix/refactor
- Relevant context: File locations, patterns to follow, constraints
- Report request: Ask the agent to write conclusions to
.claude/REPORT.md
Using --prompt-file (recommended)
For any prompt longer than a single sentence:
- Write the prompt to a temporary file (e.g.,
.claude/spawn-prompt.md) - Use
--prompt-fileto pass it to the agent - The file can be deleted after spawning
Example workflow:
Prompt template
Checking spawned agent results
After spawning, you can check progress:
Same-branch multi-agent workflow
Use this when several agents should inspect or validate the same code at once without separate worktrees.
Key rules for same-worktree launches:
- Use
dev agent, notdev new, after the worktree already exists - Use
dev agent --agent <agent>to select a specific agent for an existing worktree;--with-agentremains 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 tmuxfor human-driven grouped windows or when the user explicitly wants agents to share one tmux session - Outside tmux, bare
-m tmuxjoins the deterministic repo-scoped tmux session - Inside tmux, bare
-m tmuxopens 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>.mdor.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:
Headless/scripted orchestration
For non-interactive contexts (scripts, cron jobs, other assistants), combine --prompt-file with --tmux-session:
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 rmanddev cleanalso clean up tmux windows thatagent-clitagged 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:
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.md
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent_cli/dev/skill/SKILL.md
Popularity
- Repository stars
- 235
- Repository forks
- 25
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/basnijholt/agent-cli/skill)