← 返回
未分类 Key 中文

Agenter Coder

Delegate coding tasks to a separate autonomous agent with AST validation, security scanning, and automatic retry. Supports 4 backends (Claude Code, Codex, Op...
Delegate coding tasks to a separate autonomous agent with AST validation, security scanning, and automatic retry. Supports 4 backends (Claude Code, Codex, Op...
gabriel-hurtado gabriel-hurtado 来源
未分类 clawhub v0.1.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 312
下载
💾 0
安装
1
版本
#latest

概述

Agenter Coder

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.

Why this instead of coding directly

  • Your context window stays clean. The sub-agent does all the file

reading, editing, and bash execution in its own process. You only see

the final result.

  • Automatic validation and retry. Every iteration runs AST syntax checks

(and optional Bandit security scans). If code has errors, the agent retries

automatically — no manual back-and-forth.

  • Hard budget enforcement. Set a dollar limit, token limit, or time limit.

The agent stops when it hits the cap — no surprise bills.

  • Backend portability. Same interface whether you're using Claude, GPT, or

open-source models. Switch with one flag.

When to use

Use this skill when the user asks to:

  • Write, create, or generate code for a project
  • Modify, refactor, or update existing code
  • Fix bugs in a codebase
  • Create entire applications or components
  • Generate tests for existing code

Do NOT use for: reading files, explaining code, or answering questions. Use

your own tools for those — they don't need a sub-agent.

How to run

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

Parameters

FlagRequiredDefaultDescription
--------------------------------------
--promptYesThe coding task. Be specific about what to build.
--cwdYesWorking 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.

Cost awareness

Set budget limits based on task complexity. Always tell the user the estimated cost.

Task typeSuggested --max-cost-usdSuggested --max-iterations
--------------------------------------------------------------------
Simple script / single file0.503
Small app / multiple files2.005
Complex refactoring / full project5.007

Backend selection

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-sdk — Default. Claude Sonnet/Opus. Works with ANTHROPIC_API_KEY or AWS Bedrock.
  • claude-code — Claude Code CLI runtime. Native OS-level sandbox, battle-tested file tools.
  • codex — OpenAI's gpt-5.4/gpt-5.4-mini. Requires OPENAI_API_KEY.
  • openhands — Any model via litellm (including local). Must use --no-sandbox.

Reading the output

The script outputs JSON to stdout:

{
  "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
}

Status values

StatusMeaningWhat to do
-----------------------------
completedTask 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.

After running

  1. Check the status field.
  2. If completed: the files are already written to disk in --cwd. Use read to

inspect them if the user wants to review.

  1. Report the summary, cost, and files modified to the user.
  2. If failed or budget_exceeded: report the issue and ask how to proceed.

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-05-07 09:35 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 865 📥 344,268
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,163 📥 935,336
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,441 📥 328,430