Instead of writing code tool-by-tool (filling your context window with file contents), delegate to a purpose-built coding agent that runs in its own process. It has its own tools, validates its output with AST parsing, and comes back with structured results. Your context stays clean.
Use this skill when the user asks to:
Do NOT use for: reading files, explaining code, or answering questions. Use your own tools for those — they don't need a sub-agent.
bash
python3 {SKILL_DIR}/scripts/agenter_cli.py \
--prompt "<the coding task>" \
--cwd "<workspace directory>" \
--backend "anthropic-sdk" \
--max-cost-usd 2.0 \
--max-iterations 5 \
--sandbox
FlagRequiredDefaultDescription--promptYes—The coding task. Be specific about what to build.--cwdYes—Working directory. Use the current workspace or a subdirectory.--backendNoanthropic-sdkRuntime: anthropic-sdk, claude-code, codex, or openhands.--modelNoautoModel override (e.g., claude-sonnet-4-20250514, gpt-5.4).--max-cost-usdNounlimitedMaximum spend in USD.--max-tokensNounlimitedMaximum total tokens (input + output).--max-time-secondsNounlimitedMaximum wall clock time.--max-iterationsNo5Max validation/retry iterations.--allowed-write-pathsNoall in cwdGlob patterns for allowed writes (e.g., "*.py" "*.ts").--sandbox / --no-sandboxNo--sandboxSandboxed execution (recommended).--streamNooffEmit NDJSON progress events for real-time updates.
Set budget limits based on task complexity. Always tell the user the estimated cost.
Task typeSuggested --max-cost-usdSuggested --max-iterationsSimple script / single file0.503Small app / multiple files2.005Complex refactoring / full project5.007
Default to anthropic-sdk unless the user asks for a specific backend. Check
{SKILL_DIR}/references/backends.md if the user asks about backend differences.
ANTHROPIC_API_KEY or AWS Bedrock.OPENAI_API_KEY.--no-sandbox.The script outputs JSON to stdout:
json
{
"status": "completed",
"summary": "Created main.py with FastAPI app and test_main.py",
"files_modified": ["main.py", "test_main.py"],
"files": {"main.py": "...", "test_main.py": "..."},
"iterations": 2,
"total_tokens": 15000,
"total_cost_usd": 0.045,
"total_duration_seconds": 12.3
}
StatusMeaningWhat to docompletedTask succeeded, files written to disk.Report summary and files to user.completed_with_limit_exceededTask succeeded but used more resources than configured.Report success + warn about cost.budget_exceededStopped because budget ran out before completion.Tell user, ask if they want to retry with higher budget.refusedThe model refused the request (safety/policy).Report refusal reason to user.failedUnrecoverable error.Report error, suggest checking logs.
status field.completed: the files are already written to disk in --cwd. Use read to
inspect them if the user wants to review.failed or budget_exceeded: report the issue and ask how to proceed.