skills/BuildAgent/SKILL.md
Create, validate, or audit agent definitions. USE WHEN create agent, new agent, build agent, scaffold agent, validate agent, audit agents, agent conventions, agent frontmatter.
npx skillsauth add n4m3z/forge-core BuildAgentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scaffold, validate, and audit agent markdown files following forge conventions. Agents are markdown files with frontmatter that deploy to provider-specific directories via forge install.
| Workflow | Trigger | Section | |--------------|-----------------------------------------------|----------------------------------------------| | Create | "create agent", "new agent", "build agent" | Create Workflow | | Validate | "validate agent", "check agent" | Validate Workflow | | Audit | "audit agents", "check all agents" | Audit Workflow |
All agent identifiers use PascalCase with no spaces, hyphens, or abbreviations:
| Field | Format | Example |
|---------------------|---------------|-------------------------------------------|
| name | PascalCase | SecurityArchitect |
| Source filename | PascalCase.md | SecurityArchitect.md |
| Deployed filename | PascalCase.md | ~/.claude/agents/SecurityArchitect.md |
| Task subagent_type | PascalCase | subagent_type: "SecurityArchitect" |
Rules:
GameMaster not Game MasterSecurityArchitect not security-architectDocumentationWriter not DocWriterDevOps stays DevOpsGhostwriter, Opponent| Location | Purpose |
|----------------------|-----------------------------------------|
| agents/ | Module agents (shipped with the module) |
| User vault workspace | Personal agents |
Agent name must be unique across all locations -- sync overwrites by name.
Module agents use flat frontmatter -- deployment config (model, tools) lives in defaults.yaml, not in the agent file:
---
name: AgentName
description: "Role -- capabilities. USE WHEN trigger phrases."
version: 0.1.0
---
Field reference:
| Field | Required | Notes |
|---------------|----------|--------------------------------------------------------|
| name | Yes | PascalCase, matches filename |
| description | Yes | Pattern: "Role -- capabilities. USE WHEN triggers." |
| version | Yes | Semantic version |
Model and tool assignments live in defaults.yaml (map format, keyed by agent name):
agents:
SecurityArchitect:
model: fast
tools: Read, Grep, Glob, Bash
Semantic model tiers:
| Tier | Maps to | Use for | |--------|---------------------------|-------------------------------------------------| | fast | sonnet / gemini-2.0-flash | Implementation, analysis, most specialist work | | strong | opus / gemini-2.5-pro | Deep reasoning, critical decisions |
Model tiers resolve to concrete model IDs via the providers: section in defaults.yaml. Each provider maps fast and strong to its own model.
> One-line summary of role and scope. Shipped with forge-{module}.
## Role
2-3 sentences. Who is this agent? What perspective does it bring?
## Expertise
- Domain 1
- Domain 2
- Domain 3
- Domain 4
- Domain 5
## Instructions
### When Reviewing Code (or contextual heading)
1. Numbered steps. Concrete, actionable, ordered.
2. ...
### When Designing or Planning (or contextual heading)
1. Numbered steps for alternative modes.
2. ...
## Output Format
Structured template for findings using markdown headings.
## Constraints
- Stay focused on your assigned domain -- don't review areas outside your expertise
- Reference specific files and line numbers
- If your domain is solid, say so -- don't invent problems
- Every critique must include a concrete suggestion
- Communicate findings to the team lead via SendMessage when done
Body guidelines:
> ...). End with "Shipped with forge-{module}." for module agents.Mandatory constraint clauses:
Example data rule: All examples must use synthetic data (Jane Doe, [email protected], Acme Corp). Never use real PII -- agent files deploy to public repos.
Module agents deploy via forge install:
make install # all providers
forge install --scope user # user-level install
Provider-specific behaviour:
| Provider | Format | Notes |
|----------|---------|---------------------------------------------------------------------------|
| Claude | .md | Frontmatter + body, model/tools from defaults.yaml |
| Gemini | .md | Name slugified (e.g., code-helper), tools mapped to Gemini equivalents |
| Codex | .toml | TOML config in .codex/config.toml, agent prompt in .codex/agents/ |
| OpenCode | .md | Same format as Claude |
Deployment adds a # synced-from: OriginalFilename.md header for provenance tracking. Tool mapping to provider equivalents happens automatically.
Critical: forge install reads provider keys from the providers: section in defaults.yaml to determine deployment targets. If a provider is missing from providers:, agents will not deploy there.
User-created detection: If an agent file already exists in the target directory without a # synced-from: header, forge install skips it to avoid overwriting user-created agents. When migrating from a committed provider dir to agents/ source: delete the old file from disk first, then run make install.
Determine:
If unclear, ask using AskUserQuestion.
| Scenario | Location |
|-------------------------|-----------------------|
| Part of a forge module | agents/AgentName.md |
| Personal agent | User vault workspace |
The name must be unique across all source directories.
Follow the frontmatter and body structure from Agent Conventions.
make install
The agent will be available as a subagent_type after restarting the session.
name present and uses PascalCasename has no spaces, hyphens, or abbreviationsname matches the filename (without .md)description follows pattern: "Role -- capabilities. USE WHEN triggers."version present> ...)COMPLIANT or NON-COMPLIANT with specific issues and fixes.
ls agents/*.md
Run the Validate workflow checklist against every agent. Report:
| Agent | Name OK | FM OK | Body OK | Issues | |-----------|---------|-------|---------|--------| | Developer | Y | Y | Y | -- | | ... | ... | ... | ... | ... |
name valuesTotal agents, compliant count, issues found, recommended fixes.
name in frontmatter"Role -- capabilities. USE WHEN triggers."development
Reactive correction and root-cause fix. USE WHEN something went wrong, user is frustrated, demands a correction, says wtf, what the hell, why did you, that's wrong, this is broken, no not that, stop. Executes the immediate fix, then hunts the upstream artifact that caused it and creates a corrective change.
development
Decompose a research question into sub-queries, spawn parallel WebResearcher agents per angle, synthesize findings with citations and explicit confidence. USE WHEN the user asks to research, investigate, look online, look up, dig into, find sources, gather evidence, or survey what's known about a topic. Single-pass; for multi-round adversarial research use ResearchCouncil in forge-council.
tools
Author project documentation that future humans (and AI sessions) actually read. Covers TLDRs for tools, READMEs, runbooks, journals. USE WHEN write documentation, create tldr, tool one-pager, document a cli, write readme, runbook, journal entry, capture knowledge about a tool, distill a session into reusable notes.
development
Review your own staged changes via a code-review TUI before triggering a commit. USE WHEN about to commit, walking through your own staged diff, self-reviewing before approval, tuicr, revdiff, git diff cached.