create-agent

A guided process for creating a focused subagent, which is a smaller AI assistant given one role and its own instructions.

In plain words
What is it for?
It helps scaffold an agent, choose its tools and model settings, write its system prompt, and regenerate the repository's agent registry.
Why use it?
It keeps side tasks separate from the main coding conversation and limits the tools the subagent can use.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/khaledsaeed18/dotclaude/create-agent
Any agent
npx skills add KhaledSaeed18/dotclaude --skill create-agent
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code, Codex.

Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00071 $0.01211
Opus 5 $0.00036 $0.00606
Sonnet 5 $0.00014 $0.00242
Haiku 4.5 $0.00007 $0.00121

Measured 2d ago against content hash ee0d0be898b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/engineering/create-agent/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 78 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 78 lines · 71 tokens per session scan A ee0d0be898b9

Subscribe to this mod's changes

create-agent is a skill published in the GitHub repository KhaledSaeed18/dotclaude (4 stars, last pushed 8d ago), licensed MIT. It adds 71 tokens to every session and 1,211 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.