Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run Codex CLI, Claude Code, or other coding agents as background processes for programmatic control. Use when a user asks to run a coding agent, delegate a task to another AI, spawn a sub-agent, run Claude Code in the background, or orchestrate multiple coding agents on separate tasks.
.claude/skills/terminalskills-coding-agent/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 1187% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 129% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 49% | 0% |
Run coding agents (Claude Code, Codex CLI, Gemini CLI, or others) as background processes for programmatic task delegation. Spawn sub-agents to handle well-scoped tasks, monitor their progress, and collect results. Useful for parallel task execution, complex multi-step workflows, and automated coding pipelines.
When a user asks you to delegate work to a coding agent or run one in the background, follow this process:
Check which coding agent CLIs are installed:
bash# Check for Claude Code claude --version 2>/dev/null && echo "claude available" || echo "claude not found" # Check for Codex CLI codex --version 2>/dev/null && echo "codex available" || echo "codex not found" # Check for Gemini CLI gemini --version 2>/dev/null && echo "gemini available" || echo "gemini not found"
If none are available, instruct the user to install one:
bash# Claude Code npm install -g @anthropic-ai/claude-code # Codex CLI npm install -g @openai/codex
Before spawning an agent, ensure the task is:
Write a clear prompt that includes:
Claude Code (background, non-interactive):
bash# Run with a specific prompt, print-only mode claude -p "Refactor the function parseConfig in src/config.ts to use zod validation. Do not modify other files." \ --output-format text \ 2>&1 | tee /tmp/agent-output.txt & # Store the PID for monitoring AGENT_PID=$! echo "Agent running with PID: $AGENT_PID"
Claude Code with specific options:
bash# Limit scope and disable interactive features claude -p "Add JSDoc comments to all exported functions in src/utils/" \ --no-permissions \ --output-format json \ > /tmp/agent-result.json 2>&1 &
Codex CLI:
bashcodex --prompt "Write unit tests for src/auth/login.ts covering success, failure, and timeout cases" \ --auto-approve \ 2>&1 | tee /tmp/codex-output.txt &
bash# Check if the agent is still running ps -p $AGENT_PID > /dev/null 2>&1 && echo "Still running" || echo "Finished" # Wait for completion wait $AGENT_PID EXIT_CODE=$? echo "Agent exited with code: $EXIT_CODE" # Read the output cat /tmp/agent-output.txt
After the agent finishes:
User request: "Write tests for the auth module while I work on the API"
Actions:
bash# Spawn Claude Code to write tests in the background claude -p "Write comprehensive unit tests for all functions in src/auth/. \ Use vitest as the test framework. Create test files next to source files \ with .test.ts extension. Cover success, failure, and edge cases. \ Do not modify any source files." \ --output-format text \ 2>&1 | tee /tmp/test-agent.txt & TEST_PID=$! echo "Test writing agent started (PID: $TEST_PID)"
After completion, review the generated test files and run the test suite:
bashwait $TEST_PID npx vitest run src/auth/
User request: "Add types to the utils folder and add docs to the components folder"
Actions:
bash# Agent 1: Add TypeScript types claude -p "Add strict TypeScript types to all functions in src/utils/. \ Replace any 'any' types with proper types. Do not modify files outside src/utils/." \ --output-format text > /tmp/types-agent.txt 2>&1 & PID1=$! # Agent 2: Add documentation claude -p "Add JSDoc documentation to all React components in src/components/. \ Include @param, @returns, and @example tags. Do not modify logic." \ --output-format text > /tmp/docs-agent.txt 2>&1 & PID2=$! # Wait for both wait $PID1 $PID2 echo "Both agents finished" cat /tmp/types-agent.txt cat /tmp/docs-agent.txt
User request: "Analyze the codebase and list all TODO comments with suggested fixes"
Actions:
bashclaude -p "Search the entire src/ directory for TODO, FIXME, and HACK comments. \ For each one, output a JSON array with objects containing: file, line, comment, \ and suggestedFix. Only output the JSON, no other text." \ --output-format text > /tmp/todos.json 2>&1 # Parse and display cat /tmp/todos.json | python3 -m json.tool
--output-format text or --output-format json for programmatic consumption.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | fail→fail | 10,644 | 8,130 | -24% | 1 | 1 | 0% | 1,812 | 1,929 | +6% | 0 | 0 | — |
case-21 | fail→pass | 14,130 | 9,248 | -35% | 1 | 1 | 0% | 2,319 | 3,099 | +34% | 0 | 0 | — |
case-01 | fail→pass | 6,160 | 26,927 | +337% | 1 | 1 | 0% | 419 | 5,393 | +1187% | 0 | 0 | — |
case-02 | fail→fail | 7,328 | 7,189 | -2% | 1 | 1 | 0% | 404 | 1,835 | +354% | 0 | 0 | — |
case-04 | pass→fail | 8,516 | 7,651 | -10% | 1 | 1 | 0% | 1,645 | 3,061 | +86% | 0 | 0 | — |
case-05 | pass→pass | 10,768 | 8,018 | -26% | 1 | 1 | 0% | 1,877 | 2,950 | +57% | 0 | 0 | — |
case-06 | pass→fail | 8,476 | 6,968 | -18% | 1 | 1 | 0% | 1,757 | 1,802 | +3% | 0 | 0 | — |
case-07 | fail→fail | 7,124 | 6,930 | -3% | 1 | 1 | 0% | 1,296 | 1,756 | +35% | 0 | 0 | — |
case-08 | pass→fail | 4,717 | 1,597 | -66% | 1 | 1 | 0% | 837 | 1,752 | +109% | 0 | 0 | — |
case-09 | fail→fail | 10,546 | 4,390 | -58% | 1 | 1 | 0% | 1,418 | 1,777 | +25% | 0 | 0 | — |
case-10 | fail→fail | 7,447 | 2,808 | -62% | 1 | 1 | 0% | 1,321 | 1,820 | +38% | 0 | 0 | — |
case-11 | fail→fail | 10,992 | 4,805 | -56% | 1 | 1 | 0% | 2,219 | 1,765 | -20% | 0 | 0 | — |
case-12 | fail→fail | 6,859 | 1,840 | -73% | 1 | 1 | 0% | 1,062 | 1,717 | +62% | 0 | 0 | — |
case-13 | fail→fail | 7,173 | 2,690 | -62% | 1 | 1 | 0% | 1,211 | 1,826 | +51% | 0 | 0 | — |
case-14 | pass→pass | 13,984 | 15,629 | +12% | 1 | 1 | 0% | 2,002 | 4,550 | +127% | 0 | 0 | — |
case-15 | fail→fail | 11,830 | 8,125 | -31% | 1 | 1 | 0% | 814 | 1,976 | +143% | 0 | 0 | — |
case-16 | fail→pass | 12,328 | 7,162 | -42% | 1 | 1 | 0% | 2,084 | 2,809 | +35% | 0 | 0 | — |
case-17 | fail→pass | 5,884 | 6,766 | +15% | 1 | 1 | 0% | 1,226 | 2,805 | +129% | 0 | 0 | — |
case-18 | fail→pass | 9,528 | 6,648 | -30% | 1 | 1 | 0% | 1,841 | 2,750 | +49% | 0 | 0 | — |
case-19 | pass→pass | 4,832 | 6,145 | +27% | 1 | 1 | 0% | 595 | 2,431 | +309% | 0 | 0 | — |
case-20 | fail→pass | 14,145 | 8,562 | -39% | 1 | 1 | 0% | 2,607 | 3,029 | +16% | 0 | 0 | — |
case-22 | pass→fail | 13,014 | 4,789 | -63% | 1 | 1 | 0% | 2,320 | 2,365 | +2% | 0 | 0 | — |
case-23 | fail→fail | 7,766 | 3,791 | -51% | 1 | 1 | 0% | 1,454 | 2,102 | +45% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 19 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -14 percentage points is the difference between those two pass rates over the 19 comparable cases. 9 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.