Skip to content
Development
Skill

/create-agent

Author a new subagent for this repository end to end by scaffolding it with pnpm new, curating its tool allowlist, setting model, color, and memory in frontmatter, then writing a focused system prompt and regenerating the registry. Use when creating, scaffolding, or reviewing an

From plugin
dotclaude
586 skills1 agent1 command

Claude Code

$ npx -y skills add KhaledSaeed18/dotclaude --skill create-agent --agent claude-code

SKILL.md

create-agent.SKILL.md
name: create-agent
description: Author a new subagent for this repository end to end by scaffolding it with pnpm new, curating its tool allowlist, setting model, color, and memory in frontmatter, then writing a focused system prompt and regenerating the registry. Use when creating, scaffolding, or reviewing an agent or subagent in this repo.
argument-hint: "(optional) the agent's purpose, proposed name, or category"

Create a subagent that earns its own context window: one clear role, a tightly curated tool allowlist, and a system prompt focused enough that the main agent knows exactly when to delegate to it. Then regenerate the derived files and validate.

Source layout is `agents/<category>/<name>/AGENT.md`. Agents are **file-layout**: the folder must contain only `AGENT.md`, because it installs as the single file `.claude/agents/<name>.md`. The **category is the folder**; the per-agent `registry.json`, the root `registry.json`, and the README catalog are all *generated* by `pnpm gen`. Never hand-edit generated files.

Hard rules: never break these

  • **One agent, one role.** A subagent exists to keep a side task out of the main context and return a tight result. If the role needs "and" to describe it, narrow it or split it.
  • **Curate the tool allowlist ruthlessly.** The whole point of a subagent is a constrained tool set. Grant only what the role genuinely needs; omit `Bash` unless it must run commands, omit write tools for a read-only reviewer. Inheriting everything defeats the purpose.
  • **File layout: only `AGENT.md`.** No companion files in an agent folder. `pnpm gen` rejects extra files because the agent installs as one file. Reference material for the agent goes in its system prompt, not a sidecar.
  • **`name` is globally unique and equals the folder name**, kebab-case. Agents install to a flat `.claude/agents/<name>.md`.
  • **Never hand-write `registry.json` or the README catalog.** They are derived; run `pnpm gen`.
  • **No AI/co-author mentions** anywhere in the agent or in what it produces.

Step 1: Define the agent

Pin down before writing a line:

  • **The one role**, in a sentence.
  • **When the main agent should delegate to it.** This is the most load-bearing decision; it drives the `description`.
  • **The tools the role actually needs.** List them; everything else stays off.
  • **The model.** `opus` for synthesis and hard judgment, `haiku` for cheap high-volume work, `inherit` (the default) when it should match the session.

If the role is fuzzy or sounds like two jobs, sharpen or split it now.

Step 2: Scaffold it

From the repo root, let the scaffolder create the folder, stub, and regenerate in one step:

pnpm new --type agent --category <category> --name <name> --description "<what it does. Use when ...>"

Current agent categories: `academic`, `engineering`, `research`, `review`, `security` (run `ls agents` for the live list). Reuse one unless a genuinely new family is justified. The scaffolder enforces kebab-case and global name uniqueness, so a bad name fails fast.

Step 3: Write the frontmatter

Required: `name`, `description`. The rest are optional but shape behavior, cost, and UI. Full field table and valid values: [reference/frontmatter.md](./reference/frontmatter.md).

  • **`description` is the delegation trigger.** Third person, lead with the capability, end with an explicit **"Use when …"** clause naming the situations that should route to this agent. Vague descriptions never get delegated to (avoid a `: ` in the value; it is YAML).
  • **`tools`**: the curated allowlist from Step 1.
  • **`model`**, and optionally **`color`** (UI accent) and **`memory`** (`user` / `project` / `local` for cross-session learning). `pnpm validate` rejects an invalid color, memory scope, or model, so typos fail in CI.

Step 4: Write the system prompt

The markdown body is the agent's system prompt. Address the agent in the second person, imperative. The shape that works:

1. One or two lines establishing the role and the standard it's held to. 2. **Operating rules / hard constraints** the agent must always follow. 3. The **procedure** if the work is staged. 4. The **exact output** it should return to the caller, since that result is all the main agent sees.

Keep it focused. A subagent's prompt should be sharp, not a second copy of the whole repo's conventions.

Step 5: Regenerate and validate

pnpm gen        # writes registry.json files and the README catalog
pnpm validate   # checks frontmatter values + layout, then shadcn registry validate

If `pnpm validate` flags the frontmatter or layout, fix the source `AGENT.md` and rerun; never patch generated output.

Step 6: Review against the bar

  • The `description` would actually get the agent delegated to on the intended situations, and not over-trigger.
  • The tool allowlist is the minimum the role needs, nothing more.
  • The folder contains only `AGENT.md`.
  • `color`/`memory`/`model` are valid and `pnpm validate` passes.
  • It reads like the existing agents in voice and structure.

Report the agent's path, category, its tools and model, and the validation result. Leave committing to the user.

Read more
@khaledsaeed18
Ships withdotclaude

Reusable Claude Code extension registry. skills, subagents, slash commands, and hooks for engineering, git, testing, and security workflows. Distributed as a shadcn GitHub registry and as installable plugins.

586 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5
Star history of KhaledSaeed18/dotclaude on GitHub, a chart by star-history.com

Other skills on dotclaude.

academic-writing

academic-writing

Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…

bibtex-manager

bibtex-manager

Maintain the thesis .bib file as a single source of truth: fetch verified BibTeX from a DOI, arXiv id, or title via CrossRef and…

citation-graph

citation-graph

Expand a set of key papers into the literature around them by walking the citation graph with the Semantic Scholar and OpenAlex…

citation-verifier

citation-verifier

Audit every citation in a chapter, paper, or proposal against the .bib file and the real world: each cite key must exist, each…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about create-agent.

Which coding agents can use create-agent?
create-agent installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.