Best for
- Use when creating, authoring, scaffolding, designing, or drafting a new agent or subagent.
testdouble/han/han-plugin-builder/skills/agent-builder/SKILL.md
Builds a new Claude Code agent (subagent) from scratch through a relentless, evidence-based interview that walks the agent's design tree decision-by-decision — entity fit, domain focus and vocabulary, role identity, anti-patterns, description, model tier, tools, and self-containment — then reviews the finished agent against the plugin-building guidance and applies every fix it finds. Use when creating, authoring, scaffolding, designing, or drafting a new agent or subagent. Does not build a skill
Decision brief
As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md probe supplies content, apply it per config-rule.m…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/testdouble/han --skill "han-plugin-builder/skills/agent-builder"Inspect the Agent Skill "agent-builder" from https://github.com/testdouble/han/blob/55e15f752b12f6f90923eb38f7cd25e8e51bf07b/han-plugin-builder/skills/agent-builder/SKILL.md at commit 55e15f752b12f6f90923eb38f7cd25e8e51bf07b. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Read the user's argument and the conversation to extract what the agent should do. If the request is too thin to start (for example, just "build an agent"), ask the user for one or two sentences on the agent's domain and what it produces — nothing else yet.
Locate the target plugin and learn its conventions before asking the user anything beyond the framing. Use Glob, Grep, and find to gather:
Enumerate the decisions the agent needs, in dependency order. Resolve foundational decisions before dependent ones; never ask a dependent question before its parent is settled.
For each decision in dependency order:
Write the single self-contained file:
Permission review
The documentation asks the agent to create, modify, or delete local files.
Write the single self-contained file:Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 95/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 181 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
echo "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"cat .han/config.md 2>/dev/null || echo ""As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read
that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md
probe supplies content, apply it per config-rule.md, which governs precedence
between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.
The authoritative agent-authoring guidance ships in this plugin. Read the specific document a decision needs, when that decision is on the table — never read them all up front, because that defeats progressive disclosure and burns context on guidance the current agent does not touch.
${CLAUDE_PLUGIN_ROOT}/skills/guidance/references/${CLAUDE_PLUGIN_ROOT}/skills/guidance/references/agent-building-guidelines/Map from decision to governing document (read just-in-time):
| Decision on the table | Read |
|---|---|
| Agent vs. skill vs. hook; one role (generate or evaluate) | plugin-entity-taxonomy.md, agent-building-guidelines/agent-domain-focus.md |
| Domain focus, vocabulary, role identity, anti-patterns | agent-building-guidelines/agent-domain-focus.md |
The description field (four components, boundaries, length) | agent-building-guidelines/agent-description-length.md, skill-building-guidance/skill-description-frontmatter.md |
Model tier (opus / sonnet / haiku / inherit) | agent-building-guidelines/agent-model-selection.md, specialization-and-model-selection.md |
| Self-containment — no references, scripts, or context injection | agent-building-guidelines/agent-external-files.md |
| Which frontmatter fields are valid (and which plugins ignore) | agent-building-guidelines/agent-external-files.md |
| Degraded environments (no git, missing tools) | agent-building-guidelines/graceful-degradation.md |
| Whether this agent is justified at all; how it gets dispatched | agent-building-guidelines/multi-agent-economics.md, skill-building-guidance/agent-dispatch-namespacing.md |
| New plugin needed (plugin.json, marketplace.json) | claude-marketplace-and-plugin-configuration/ and templates/ |
.md file. No references/ folder, no
scripts/ folder, no !`command` context injection. Everything the agent needs is inlined in its body.Read the user's argument and the conversation to extract what the agent should do. If the request is too thin to start (for example, just "build an agent"), ask the user for one or two sentences on the agent's domain and what it produces — nothing else yet.
Confirm the entity type before anything else. Read
${CLAUDE_PLUGIN_ROOT}/skills/guidance/references/plugin-entity-taxonomy.md and apply its decision heuristic. An agent
is the thinking layer: it applies contextual judgment, taste, and discernment ("Does this require reasoning about
context?" → agent). If the work is a deterministic, flowchartable process, it is a skill — stop and recommend
skill-builder. If it fires automatically on an event, it is a hook.
Confirm the single role. An agent generates or evaluates, never both, because self-evaluation bias means the
reasoning that created a blind spot also rates it as correct (agent-domain-focus.md). If the request bundles
generation and evaluation, recommend splitting it into a generator agent and a separate evaluator agent. Only proceed
once an agent — with one role — is the right entity.
Locate the target plugin and learn its conventions before asking the user anything beyond the framing. Use Glob, Grep,
and find to gather:
.claude-plugin/plugin.json. Confirm the plugin actually ships agents (an
agents/ directory) or is the right home for the first one. If the user has not said which plugin, infer candidates
and confirm in Step 4.{plugin}/agents/*.md) — their descriptions, role identities, model tiers, domain
vocabulary, and the boundaries they draw. A new agent's description must disambiguate against near-sibling agents in
both directions.Agent tool using the qualified
defining-plugin:agent-name. Knowing the caller tells you what the agent receives and returns.Record what was found (file paths) and what was not.
Enumerate the decisions the agent needs, in dependency order. Resolve foundational decisions before dependent ones; never ask a dependent question before its parent is settled.
description say across all four components (what, when, boundary, breadth), and how
does it disambiguate against near-sibling agents in both directions, within 1024 characters?opus for synthesis and judgment, sonnet for
structured procedures, haiku for fast lookups, inherit only when matching the session is intentional)? What
tools does it need, defaulting to no Agent tool, since dispatch flows from skills to agents, and carrying it only
when the agent's own protocol dispatches sub-agents?Keep each node a concrete decision with a candidate answer. Do not pre-fill the tree with content the user has not confirmed.
For each decision in dependency order:
Keep the interview moving — do not stall on questions the evidence can answer, and do not batch.
Write the single self-contained file:
{plugin}/agents/ if it does not exist (use mkdir), then write {plugin}/agents/{agent-name}.md. The file
is flat — no per-agent subdirectory, no companion folders.name, the description settled in the interview, tools (the allowlist — agents use tools, not
allowed-tools), and model. Add other supported fields (disallowedTools, maxTurns, color, and so on) only
when a decision called for them. Do not rely on hooks, mcpServers, or permissionMode — Claude Code ignores
all three on plugin agents as a security boundary. No XML angle brackets in any frontmatter value.## Domain Vocabulary section, the
## Anti-Patterns section, and the inlined protocol or checklist the agent follows. Embed reasoning in constraints.
Add graceful-degradation wording ("If {tool} is not available, skip this step and note the limitation") to any
tool-dependent step. No flattery, superlatives, or motivational framing — let domain vocabulary do the routing.claude-marketplace-and-plugin-configuration/ guidance and templates/.This is the review pass the skill commits to. Re-read each governing document that applies to what you built and verify the finished agent against it, applying every fix directly. Do not summarize problems for the user without fixing them. Cover at minimum:
plugin-entity-taxonomy.md, agent-building-guidelines/agent-domain-focus.md) — the
agent is genuinely a judgment layer, targets one narrow domain, and only generates or only evaluates.agent-domain-focus.md) — the opening paragraph is under 50 tokens, states domain + task +
perspective, and carries no flattery or motivational filler.agent-domain-focus.md) — 15-30 precise terms that pass the
15-year-practitioner test, and 5-10 named anti-patterns each with a detection signal, both inlined in the body.agent-description-length.md, skill-description-frontmatter.md) — covers what, when, boundary,
and trigger breadth; names near-sibling agents in boundary clauses; disambiguates in both directions (repair the
sibling's description if a one-way gap exists); within 1024 characters, with domain vocabulary and anti-patterns kept
in the body, not the description.agent-model-selection.md, specialization-and-model-selection.md) — model is set explicitly
and matches the cognitive load, chosen on capability and not on cost.agent-external-files.md) — no references/ or scripts/ folder, no !`command` context
injection; all protocol and reference content is inlined; frontmatter uses tools (not allowed-tools), and the
file relies on no field plugins ignore.agent-dispatch-namespacing.md, agent-external-files.md) — the agent defaults to no Agent tool,
since dispatch flows from skills to agents; it carries the Agent tool only when its own protocol dispatches
sub-agents. The tools allowlist is the minimum the work needs, each tool present only if the body uses it.agent-building-guidelines/graceful-degradation.md) — every tool-dependent step checks
availability inline and notes the limitation when the tool is absent.multi-agent-economics.md) — the agent clears the bar for existing: a single
well-prompted agent or an instruction improvement to an existing agent would not do the job as well.Apply the YAGNI discipline throughout: vocabulary terms, anti-patterns, tools, and frontmatter fields must each earn their place against the agent's actual job. Cut anything added "for completeness."
Summarize for the user:
defining-plugin:agent-name and which skill (existing or to-be-built)
would call it. If a calling skill is needed and does not exist, recommend skill-builder.Note that plugin entities rarely land in one pass: per iterative-plugin-development.md, plan for 3-5 iterations. Ask
whether the user wants to iterate on the agent's domain framing or considers it ready to test.
Alternatives
narrative-io/narrative-skills-marketplace
Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "
PramodDutta/qaskills
Generate optimized test combinations using pairwise (all-pairs) testing algorithms to achieve maximum coverage with minimum test cases across multiple input parameters
PramodDutta/qaskills
Automatically generate comprehensive test cases from user stories and acceptance criteria using BDD patterns, equivalence partitioning, and risk-based prioritization
aAAaqwq/AGI-Super-Team
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices