Imported from RohiRIK/dev-team (
skills/create-agent/SKILL.md). Install upstream withnpx skills add RohiRIK/dev-team --skill create-agent. Copyright stays with the author.
create-agent
Owns the full lifecycle of a dev-team subagent. Five procedures: Create, Port, Research, Validate, Update — each ends by invoking Validate so the loop is always closed.
When this skill applies
Trigger on any of:
- "create a new dev-team agent for
<domain>" - "scaffold a
<role>subagent" - "port the
<slug>agent from Gemini / Cursor / Cline" - "canonicalize
agents/<slug>.md" - "validate the agents folder"
- "the canonical structure changed — update all agents"
Do not trigger for: editing .claude-plugin/plugin.json, generating MCP servers, generating non-agent skills, authoring slash commands.
Anatomy of a dev-team agent
Every agent file under agents/<slug>.md must satisfy:
- YAML frontmatter — required keys:
name,description,tools. Recommended:model: inherit. - 7 canonical sections (verbatim headings, in order):
Role,When to use,When NOT to use (Boundaries),Workflow,Tools,Constraints,Worked example. - Body ≤ 200 lines. Overflow goes to
knowledge/<slug>-refs.md. - Default-deny tool allowlist per spec §5.4. Review-only agents (
security-analyst,pentester) must not haveWriteorEdit. - No absolute home paths — macOS
/Users/, Linux/home/, or WindowsC:\Users\patterns are forbidden. Use~or relative paths. - No Gemini residue — no
UFC Hydration, noexecute_agent, no.gemini/references.
Full structural detail: references/agent-structure.md.
Procedures
Create — new agent from scratch
Use when no source agent exists. Steps:
- Pick the slug (kebab-case matching one of the 13 in spec §5.1, or a new slug if extending).
- Read
references/agent-structure.mdandreferences/tool-allowlists.mdto determine the allowlist. - Run Research procedure if domain knowledge is needed.
- Author
agents/<slug>.mdwith the 7 canonical sections. Reference shared docs by relative path:knowledge/coding-standards.md,knowledge/task-tracker-api.md, etc. - Read
references/integration.mdand weave the task-tracker MCP protocol into the Workflow section (get_task→update_task(in_progress)→ work →complete_task). - Run Validate. Fix findings. Repeat until strict-pass.
Reference output: examples/backend-developer.md is the canonical pilot — follow its shape.
Port — from external source
Use when porting from .gemini/agents/<slug>/, Cursor rules, Cline modes, or any other external agent format.
- Run the port script:
This emitsbun ../../scripts/port-agent.ts <slug>agents/<slug>.mdwithTODO(author):markers in sections that need human judgment. - Resolve every
TODO(author):marker usingreferences/agent-structure.md,references/tool-allowlists.md, andreferences/integration.md. - Strip any external-tool residue the script missed (Gemini emoji sirens,
UFC Hydration, etc. are already filtered, but check for new patterns). - Run Validate. Fix findings.
The port script lives at scripts/port-agent.ts (repo root). Sources read from .gemini/agents/<slug>/agent.{json,md}.
Research — gather domain refs
Use when the agent's domain is unfamiliar or when external library APIs are involved.
Procedure (full detail in references/research.md):
- Grep the codebase first — existing patterns trump invented ones.
- For external library APIs: prepend
use context7to any code you intend to write. Library APIs change; training data is stale. - For general domain knowledge: use
WebSearch(current) orWebFetch(specific URL). - Land the gathered refs:
- ≤ 30 lines → inline in the agent body's
WorkfloworToolssection. - > 30 lines or cross-cutting → extract to
knowledge/<slug>-refs.mdand link from the agent body.
- ≤ 30 lines → inline in the agent body's
Validate — lint the agents folder
Run after every Create, Port, or Update. This is the gate.
# Lint one agent (strict — no TODO markers allowed)
bun ../../scripts/verify-agents.ts <slug>
# Lint everything
bun ../../scripts/verify-agents.ts
# Pilot-stage only: allow TODO(author) markers
bun ../../scripts/verify-agents.ts <slug> --allow-todo
# Lint skills (frontmatter + residue paths only)
bun ../../scripts/verify-agents.ts --skills
Linter checks: YAML frontmatter (name, description, tools), 7 canonical sections, ≤ 200-line body, no absolute home paths, no TODO(author) markers (unless --allow-todo).
Exit 0 = pass. Any non-zero exit means findings printed to stderr — read them and route back to Create or Update.
Update — sweep when canonical changes
Use when references/agent-structure.md, references/tool-allowlists.md, or references/integration.md is edited (because spec §5.4–§5.6 changed).
- Edit the affected reference doc inside this skill first — it is the single source of truth.
- For each affected agent in
agents/: re-read the agent body, apply the change, re-run Validate. - If a change touches all agents (e.g. allowlist matrix shape), batch-edit then run
bun ../../scripts/verify-agents.tsonce. - Commit per agent or per coherent batch — never one giant sweep that's hard to review.
Tool wiring
This skill does not introduce new tools. It composes:
| Tool | Used by | Notes |
|---|---|---|
bun ../../scripts/port-agent.ts |
Port | Reads .gemini/agents/<slug>/, emits skeleton |
bun ../../scripts/verify-agents.ts |
Validate | Lints frontmatter, sections, line cap, residue |
context7 MCP |
Research | Authoritative library APIs |
WebSearch / WebFetch |
Research | General + specific URL |
Read / Grep / Glob |
All | Explore before edit |
Edit / Write |
Create, Update | Author the agent file |
The calling agent (agent-builder) needs at minimum: Read, Write, Edit, Bash, Grep, Glob, Skill, WebSearch per spec §5.4.
Integration with shared system
- task-tracker MCP — invoke from inside an
agent-buildertask. The agent callsupdate_task(in_progress)before this skill,complete_taskafter. /buddyrouting —/buddy "build me a <X> agent"routes toagent-builder, which invokes this skill.- Hand-off — completing an agent file rarely requires a commit on its own. If commit/PR is needed, create a follow-on task targeted at
github-managerviacreate_task.
Full protocol: references/integration.md.
Validation checklist
Before marking any procedure complete:
- Frontmatter has
name,description,tools - All 7 canonical sections present, in order, headings verbatim
- Body ≤ 200 lines
- Tool allowlist matches
references/tool-allowlists.mdfor the slug - No absolute home paths anywhere in the file
- References to shared docs use relative paths (
knowledge/...) -
bun ../../scripts/verify-agents.ts <slug>exits 0 (strict, no--allow-todo)
If any check fails, route back to Create or Update — do not mark the task complete.
Reference files
references/agent-structure.md— canonical 7 sections, frontmatter contract, 200-line cap, default-deny toolsreferences/tool-allowlists.md— per-agent allowlist matrix mirroring spec §5.4 (single source of truth for what each agent may use)references/integration.md— task-tracker MCP protocol,/buddyrouting, knowledge tiers (§5.5),github-managerhand-offreferences/research.md— when to usecontext7/WebSearch/ repo grep, where gathered refs land
Examples
examples/backend-developer.md— the canonical pilot agent. Strict-verify passes. Use it as the shape reference for any new agent.
Self-update rule
This skill is the single source of truth for "how to author a dev-team agent." When the parent spec (specs/plugin-pivot.md) §5.4, §5.5, or §5.6 changes:
- Update the matching reference doc inside this skill first.
- Run the Update procedure to sweep
agents/. - Re-validate.
Never let the spec drift ahead of this skill. The skill ships with the plugin; users extending the plugin rely on it as documentation of the canonical shape.