From build-my-agent
Generate a deepagents-based operational agent project from templates and design document
How this skill is triggered — by the user, by Claude, or both
Slash command
/build-my-agent:03-generate-agentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are generating a complete operational agent project based on the design from the previous step.
You are generating a complete operational agent project based on the design from the previous step.
<component>-design.md file exists from the design steptemplates/ directorytools/ directory<component>-design.mdtemplates/ directorytools/Create <component_name>-ops-agent/ in the working directory with the standard structure:
<component_name>-ops-agent/
├── pyproject.toml
├── config/
│ └── agent.yaml
├── agent.py
├── models.py
├── tools/
│ ├── __init__.py
│ ├── log_search.py
│ ├── metric_query.py
│ └── <additional_tools>.py
├── prompts/
│ └── system.md
├── skills/
│ └── troubleshooting/
│ └── SKILL.md
└── tests/
├── test_tools.py
└── test_agent.py
For each file, use the corresponding template from templates/ as your base. Fill in the placeholders with values from the design document.
Important rules:
tools/ as examples for how tools should work_get_*_config() pattern (not module-level loading)For additional tools (Kafka, DB, etc.) that don't have templates:
tools/http_client.py_get_*_config() private helperagent.py includes:
SummarizationMiddleware for compressing long conversationsMemorySaver checkpointer for conversation persistence--once "query" flag for single invocation--diagnose --once "query" flag for structured DiagnosisReport outputUsing templates/models.py.tmpl, generate the DiagnosisReport model. This provides structured output when the agent is run with --diagnose --once "query".
Using templates/prompts/system.md.tmpl as the base, create a rich system prompt that includes:
Tool unit tests (tests/test_tools.py):
Agent integration test (tests/test_agent.py):
create_agent() returns a valid agentRun the AST guard to verify the generated project:
python -m guard check <component_name>-ops-agent/
If there are violations, fix them and re-run until all checks pass.
"Agent project generated at
<component_name>-ops-agent/. All guard checks pass.To run:
cd <component_name>-ops-agent && pip install -e '.[dev]' python agent.py # interactive mode python agent.py --once "check error rate" # single query python agent.py --diagnose --once "why is latency high?" # structured reportTo validate structure:
python -m guard check <component_name>-ops-agent/Want me to run the final structure validation? Run: 04-validate-structure"
npx claudepluginhub namhaesusan/build-my-agent --plugin build-my-agentGenerates, scaffolds, or refactors an AI agent (subagent/specialized role) from intent, renders per host tool, and validates the output.
Generates custom Claude Code agent.md files from purpose-based templates (Reviewer, Generator, Fixer, Tester, Documenter, Orchestrator). Configures tools, model, color; saves to .claude/agents/ and validates.
Guides creation of Claude Code agents via 5 phases: analyze requirements and type, design architecture with patterns/skills, create files/frontmatter, validate, refine iteratively.