coding-agent
AI coding agent that plans, implements, and verifies code changes with human approval gates. Built on FlatAgents.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Coding Agent
An agentic coding assistant with human-in-the-loop review.
Workflow
- Explore — Gathers codebase context
- Plan — Generates implementation plan → human reviews
- Execute — Implements changes
- Verify — Reviews changes → human approves
- Apply — Writes changes to files
Invocation
$HOME/.flatagents/skills/coding_agent/run.sh "<task>" --cwd "<working_directory>" --claude
Claude Code Integration
When running as a Claude Code skill, use the --claude flag. This enables a checkpoint/exit approval flow instead of interactive input() prompts.
Approval Gates
This agent requires human approval at two points:
- Plan review - Before implementing changes
- Result review - Before applying changes to files
Exit Code 2: Approval Needed
When the agent needs approval, it:
- Writes approval request to stderr starting with
APPROVAL_NEEDED: <type>(where type isplanorresult) - Saves state to
.coding_agent_checkpoint.json - Exits with code 2
Handling Approval
When you see exit code 2:
- Parse stderr to find
APPROVAL_NEEDED: planorAPPROVAL_NEEDED: result - Display the content from stderr to the user
- Use
AskUserQuestionto ask the user to approve or provide feedback - Resume with the decision via environment variable (task arg not needed on resume):
# Approve plan (task retrieved from checkpoint)
CODING_AGENT_APPROVAL_PLAN=approved $HOME/.flatagents/skills/coding_agent/run.sh --cwd "<dir>" --claude
# Reject plan with feedback
CODING_AGENT_APPROVAL_PLAN="<user feedback here>" $HOME/.flatagents/skills/coding_agent/run.sh --cwd "<dir>" --claude
# Approve result
CODING_AGENT_APPROVAL_RESULT=approved $HOME/.flatagents/skills/coding_agent/run.sh --cwd "<dir>" --claude
Environment Variables
| Variable | Values | Purpose |
|---|---|---|
CODING_AGENT_APPROVAL_PLAN |
approved or feedback text |
Resume after plan review |
CODING_AGENT_APPROVAL_RESULT |
approved or feedback text |
Resume after result review |
The agent restores state (including the task) from the checkpoint file and continues from where it paused.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!