Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add memgrafter/skills-flatagents --skill "coding-agent"
Install specific skill from multi-skill repository
# Description
AI coding agent that plans, implements, and verifies code changes with human approval gates. Built on FlatAgents.
# SKILL.md
name: coding-agent
description: AI coding agent that plans, implements, and verifies code changes with human approval gates. Built on FlatAgents.
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:
1. Writes approval request to stderr starting with APPROVAL_NEEDED: <type> (where type is plan or result)
2. Saves state to .coding_agent_checkpoint.json
3. 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.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.