agentleFS
luanmorenommacielluanmorenommaciel/agentspec/.claude/skills/create-agent/SKILL.md

create-agent

Skill256 starsChanged 2 months agoMITView on GitHub

Repo-specific SOP for adding a new agent to this repository — the frontmatter contract the auto-generated router feeds on (name, description one-liner, tier, model, tools, kb_domains, stop conditions, escalation targets), the thin-executor default, category placement, and the router/build/docs ship checklist. Use when the user wants to create an agent, add a new agent to this repository, or asks for a new specialist agent. Do not use for creating skills (use create-skill) or KB domains (use /create-kb); to decide whether an agent is even the right layer, run the component-model skill first — most "new agent" requests turn out to be new skills plus a thin executor.

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deploy-platform, setup-platform and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • agno-agiSkill

    deploy-platform

    Deploy this AgentOS using its own provider instructions, configure JWT verification, and verify the public service. Use for first deployment, redeployment, or production configuration changes.

    Also in 5 projects that use this

  • agno-agiSkill

    setup-platform

    Set up this AgentOS from a fresh clone — confirm Docker, configure .env, boot the containers, prove the MCP endpoint live, connect the AgentOS UI, then build the user's first agent. Use when the user asks to set up the platform, get started, or bring this repo up on a new machine.

    Also in 5 projects that use this

  • ElasticSkill

    create-integration

    Use when creating a new Elastic integration package, scaffolding data streams, answering package layout or structure questions, or running the end-to-end integration build workflow. Covers package topology, scaffold commands, post-scaffold edits, and full orchestration of CEL/pipeline/test subagents.

    Also in 3 projects that use this

  • MicrosoftSkill

    create-hook

    Create a hook (.json) to enforce policy or automate agent lifecycle events.

    Also in 5 projects that use this

  • AnasX7Skill

    improve

    Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.

    Also in 5 projects that use this

  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 3 projects that use this

  • +3 more from agno-agi

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 35 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 32
  2. Distinctive:

    Every new agent passes this before review:

    line 116

“Common” is measured: kept by at least 6 in 10 of the 35 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create an Agent (repo conventions)

Agents are the EXECUTION layer of the component model: identity, tool scope, model tier, stop conditions, escalation — a thin shell around capabilities. The scaffold and tier rules are owned by .claude/agents/_template.md; the layer decision is owned by the component model. This skill carries the repo mechanics between those two: the frontmatter contract as the router reads it, the thin-executor default, and the checklist an agent passes before it ships.

Division of labor

ConcernOwner
Is an agent even the right layer?the component-model skill (gate), grounded in .claude/kb/shared/component-model.md
Section structure, tier line budgets, section-by-tier requirements.claude/agents/_template.md (copy it) + .claude/agents/README.md
The methodology the agent executesa skill, authored via create-skill
Frontmatter contract, router coupling, ship checklistthis skill

When to use / Skip if

First, run the layer gate. Before writing anything, apply the component-model skill (or read .claude/kb/shared/component-model.md). Most "new agent" asks are actually new skills plus a thin executor: if the request is "teach the system HOW to do X", that is a skill — the agent, if one is needed at all, is only the WHO (identity, tools, boundaries).

Use this skill when:

  • Adding a new specialist agent under .claude/agents/.
  • Splitting an overloaded agent into two roles with distinct tool scopes or KB domains.

Skip if:

  • The capability is methodology or how-to knowledge → create-skill.
  • The content is reference truth (facts, standards, deep dives) → /create-kb.
  • An existing agent already covers most of the capability → extend it instead; apply the four-condition gate in .claude/agents/README.md ("When NOT to Create an Agent" — no existing agent covers >60%, unique KB/tool combination, ≥3 distinct triggers, no >80% overlap).
  • Undecided which layer the logic belongs in → the component-model skill first.

The agent contract (frontmatter)

The frontmatter is machine-read, not decoration. scripts/generate-agent-router.py regenerates the agent-router skill (SKILL.md + routing.json) from every agent's frontmatter — it extracts name, tier, model, the first line of description, kb_domains, and every escalation_rules target:. Write these as routing signals.

FieldRequiredContract
nameall tiersKebab-case, matches the filename, {tech|domain}-{role} style: dbt-specialist, code-cleaner, fabric-architect.
descriptionall tiersLiteral block (|). The first line is extracted verbatim as the agent's routing one-liner — write it as the routing sentence, not a teaser. Second line: Use PROACTIVELY when {triggers}. Then two example blocks per house convention (Context / user / assistant).
tierall tiersT1 utility (80-150 lines) / T2 domain expert (150-350) / T3 platform specialist (350-600). Governs which template sections are required — see the tier guide comment in _template.md.
modeloptionalDefaults to sonnet. Pick the cheapest tier that does the job: haiku for fast pattern work, sonnet for most agents, opus only where the judgment is genuinely complex.
toolsall tiersLeast privilege — scope to what the role needs. A read-only analyst gets no Write/Edit; grant Bash only if the role runs commands; include Task only for delegating agents (the build-phase executor is the precedent).
kb_domainsall tiersDomains this agent reads. Every entry must exist in .claude/kb/_index.yaml; use [] if none. Feeds the router's KB-domain reverse index.
colorall tiersOne of blue, green, orange, purple, red, yellow.
anti_pattern_refsall tiers[shared-anti-patterns] → .claude/kb/shared/anti-patterns.md.
stop_conditionsT2+Conditions that make the agent halt or refuse and return control.
escalation_rulesT2+trigger / target / reason entries. Every target: must be a real agent name (or user) — the router builds the handoff graph from these, so a typo is a broken route.
mcp_serversT3 optionalname / tools / purpose per server dependency.

Parser pitfalls

The router's parser is line-based, not a full YAML load. Silent failure modes:

  • kb_domains must be the inline form [a, b] — a block-style YAML list is ignored, and the agent ships with no domains in the router.
  • Escalation targets are read only from target: lines inside the escalation_rules: block, and must be lowercase kebab-case.
  • name, tier, model must be single-line scalars; description must be a literal block (|) or a single line.
  • The one-liner extractor takes the first non-blank description line and stops at example markers (Example, **Example, -, Context, user:, assistant:) — keep line one clean, complete, and self-contained.

Worked example (thin T2 specialist)

---
name: duckdb-specialist
description: |
  DuckDB specialist for local analytics, larger-than-memory queries, and Parquet-first pipelines.
  Use PROACTIVELY when users work with DuckDB, .duckdb files, or local OLAP queries.

  Example 1 — User wants warehouse-free analytics:
  user: "Query these Parquet files without spinning up a warehouse"
  assistant: "I'll use the duckdb-specialist agent to build the DuckDB query."

  Example 2 — User hits a memory limit:
  user: "My DuckDB aggregation runs out of memory"
  assistant: "Let me invoke the duckdb-specialist to configure spilling and rewrite the query."

tier: T2
model: sonnet
tools: [Read, Write, Edit, Grep, Glob, Bash, TodoWrite]
kb_domains: [modern-stack]
anti_pattern_refs: [shared-anti-patterns]
color: yellow
stop_conditions:
  - Query validated against sample data, results returned
  - Task requires a distributed engine — out of scope
escalation_rules:
  - trigger: Workload outgrows a single machine
    target: spark-engineer
    reason: Distributed processing is the Spark lane
---

From this contract the router derives: the one-liner (description line one), a modern-stack reverse-index entry, and a duckdb-specialist → spark-engineer edge in the handoff graph.

Thin executor by default

New agents start thin: the frontmatter contract, an identity statement, the role's non-negotiable policies, and one loading instruction — read the corresponding skill and execute it. Write the methodology as a skill via create-skill, so it can be versioned, swapped, and reused by commands without touching the executor.

The SDD workflow agents (.claude/agents/workflow/) are the reference shape for this split — phase executors whose method lives in the workflow skills, per the component model.

A fat body — methodology written inline — is the exception and needs a stated reason (for example: the method is inseparable from the role's tool scope and nothing else will ever reuse it). "It was faster to inline" is not a reason; it is the first anti-pattern in .claude/kb/shared/component-model.md.

Ship checklist

Every new agent passes this before review:

#CheckHow
1Scaffold from the templateCopy .claude/agents/_template.md into the right category folder — architect/, cloud/, data-engineering/, dev/, platform/, python/, test/, or workflow/ (the directory becomes the router category). Keep only the sections your tier requires.
2Frontmatter contract completeAll required fields for the tier; description first line = the router one-liner; kb_domains all exist in .claude/kb/_index.yaml; every escalation target: is a real agent name.
3Regenerate the routerpython3 scripts/generate-agent-router.py — CI runs it with --check and fails on drift, so never hand-edit the agent-router skill.
4Rebuild the plugin mirrorRun ./build-plugin.sh and commit the regenerated plugin/ tree together with the agent (agents ship wholesale; the build strips _template.md).
5Update the hand-maintained catalogAdd the agent to .claude/agents/README.md — category table, tier distribution, escalation map if it escalates — and to the docs reference tables (docs/reference/README.md).
6Agent count referencesIf the total changes, update the counts in CLAUDE.md, README.md, docs/README.md, plugin/README.md, and .claude/agents/README.md.
7CHANGELOGEntry under [Unreleased] in CHANGELOG.md.

References

  • .claude/kb/shared/component-model.md — the four-layer model, thin-executor pattern, anti-patterns (the component-model skill is its operational gate)
  • .claude/agents/_template.md — the scaffold: frontmatter schema, tier guide, section-by-tier requirements
  • .claude/agents/README.md — the hand-maintained catalog: categories, tiers, escalation map, "When NOT to Create an Agent"
  • .claude/skills/create-skill/SKILL.md — the sibling SOP for the skill that carries the new agent's methodology
  • scripts/generate-agent-router.py — the generator this frontmatter contract feeds

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.