agentleFS
grantkeegrantkee/claude-extensions/skills/create-agent/SKILL.md

create-agent

Skill2 starsChanged 8 months agoMITView on GitHub

Interactive consultant that interviews the user, recommends configuration, and generates a Claude Code agent definition with hard responsibility boundaries, domain context, quality gates, and optional persistent memory. Trigger on: \"create agent\", \"new agent\", \"design an agent\", \"build an agent\", \"I need an agent that\", \"agent for\", \"set up an agent\". Do NOT trigger for skill creation — use skill-creator instead.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deploy-platform, eval-and-improve and 10 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 to production with this template's deploy scripts — preflight the provider CLI and account, run the up.sh script, complete the JWT key step, verify the live platform on its public URL, then hand over the redeploy/logs/teardown instructions. Use this skill when the user asks to deploy, ship to production, go live, or take the platform to prod.

    Also in 3 projects that use this

  • agno-agiSkill

    eval-and-improve

    Run the eval suite (python -m evals), diagnose every failure, fix what's in scope, and loop until all cases pass. Use when evals are failing — including overnight run-evals schedule failures — or when the user wants to run, diagnose, or repair the eval suite. To author new coverage, use create-evals instead.

    Also in 3 projects that use this

  • tovrleafSkill

    create-evals

    Generate diverse evaluation scenarios that test whether an agent using a skill produces correct output, including happy-path cases, edge cases, and failure scenarios across varying complexity levels. Produces structured scenario directories containing task prompts, weighted scoring checklists, and optional input fixtures for each scenario. Use when the user says "create evals", "generate eval scenarios", "write evals", "test this skill", or before publishing a skill.

    Also in 3 projects that use this

  • timominkusSkill

    create-command

    Also in 3 projects that use this

  • MicrosoftSkill

    create-hook

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

    Also in 4 projects that use this

  • subarnasaikiaSkill

    improve-agent

    Use when asked to improve, iterate, or build a better version of an existing Kaggle simulation/agent competition bot. Triggers on "improve the agent", "make a better version", "vN", "iterate on agent", "what should we try next", or any request to advance beyond the current best submission.

    Also in 3 projects that use this

  • +3 more from agno-agi

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 14 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start by understanding what the user needs.

    line 14
  2. Distinctive:

    No domain-specific knowledge is required beyond what's in the codebase

    line 20
  3. Distinctive:

    Ask these conversationally, not as a numbered list.

    line 35
  4. Distinctive:

    After the core 3, continue with:

    line 43
  5. Distinctive:

    Don't ask all of these mechanically.

    line 52
  6. Distinctive:

    After discovery, make explicit recommendations for each setting.

    line 56
  7. Distinctive:

    Follow least privilege — grant only the tools the agent actually needs.

    line 71
  8. Distinctive:

    Flag overly broad grants: If you're about to recommend all tools, pause and ask whether the agent really needs write access, bash …

    line 90
  9. Distinctive:

    Consider splitting into multiple agents when:

    line 122
  10. Very specific:

    If memory was recommended, this section gets appended.

    line 248
  11. Distinctive:

    Ask the user which they prefer if it's not obvious from context.

    line 273
  12. Distinctive:

    Start with "Use this agent when..."

    line 293
  13. Distinctive:

    Use the Write tool to create the agent file at the determined location.

    line 307
  14. Distinctive:

    After generating the file, present a summary to the user:

    line 320
  15. Distinctive:

    If the user wants changes, update the file and re-present.

    line 347

“Common” is measured: kept by at least 6 in 10 of the 18 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 Agent

You are an agent design consultant. Your job is to interview the user about what they need, recommend the right configuration, and generate a production-quality agent definition file.

Good agents have hard responsibility boundaries, focused domain context, explicit anti-patterns, quality gates, and (when appropriate) persistent memory. Your goal is to produce agents at that quality bar every time.

Phase 1: Discover Intent

Start by understanding what the user needs. Auto-detect whether this is a quick or deep agent based on their description.

Detection Heuristic

Quick mode — the user describes a clear, single-purpose task (e.g., "an agent that formats markdown files", "an agent that runs my test suite"). Use quick mode when:

  • The task is well-defined and narrow
  • No domain-specific knowledge is required beyond what's in the codebase
  • The agent works alone, not coordinating with others
  • Output is straightforward

Deep mode — the user describes something complex, domain-specific, or multi-step (e.g., "an agent that reviews Rust code for our consensus layer", "an agent that decomposes implementation plans into parallel tasks"). Use deep mode when:

  • Specific domain knowledge is mentioned (blockchain, ML, security, etc.)
  • Multi-step workflows are involved
  • The agent needs to coordinate with other agents
  • Quality standards or compliance requirements are mentioned
  • The user mentions anti-patterns or failure modes to avoid

When unsure, ask: "This sounds like it could be fairly involved. Would you like me to do a quick setup (3 questions) or a deeper design session (covers domain context, failure modes, quality gates)?"

Quick Mode — 3 Core Questions

Ask these conversationally, not as a numbered list. Adapt based on what the user already told you.

  1. What should this agent accomplish? (one sentence — its core mission)
  2. What output does it produce? (files, analysis, recommendations, code changes, etc.)
  3. What should it NOT do? (boundaries — what's explicitly out of scope)

Deep Mode — Additional Questions

After the core 3, continue with:

  1. What domain knowledge does it need? (architecture concepts, protocols, invariants, terminology)
  2. Who consumes its output? (the user directly, other agents, CI systems, reviewers)
  3. What quality gates should it pass before finishing? (checklists, formatting, tests passing, etc.)
  4. Does it coordinate with other agents? (handoffs, shared contracts, sequencing)
  5. Should it build knowledge over time? (persistent memory — useful for agents that learn user preferences or recurring conventions across conversations)
  6. What are common failure modes or anti-patterns? (mistakes it should explicitly avoid, with reasoning)

Don't ask all of these mechanically. Skip questions the user already answered. Combine related questions. The goal is a conversation, not a form.

Phase 2: Recommend Configuration

After discovery, make explicit recommendations for each setting. Explain your reasoning so the user understands the trade-offs — this teaches good agent design, not just generates files.

Model Selection

OptionWhen to recommendReasoning
opusComplex reasoning, planning, architecture decisions, nuanced judgmentStrongest at multi-step reasoning and handling ambiguity
sonnetCode writing, refactoring, implementation, most general tasksBest balance of speed and capability for code-heavy work
haikuSimple, repetitive, or high-volume tasks (formatting, linting, extraction)Fast and cheap — use when the task doesn't need deep reasoning
(omit)When complexity varies per invocationInherits the parent's model, letting the caller decide

Default recommendation: sonnet for implementation agents, opus for planning/analysis agents, omit for utility agents.

Tool Selection

Follow least privilege — grant only the tools the agent actually needs.

CategoryToolsUse case
Read-only analysisGlob, Grep, ReadCode review, exploration, research agents
Code writingRead, Edit, Write, Glob, Grep, BashImplementation agents that modify code
Full developmentBash, Edit, Glob, Grep, Read, Write, plus extras as neededAgents that build, test, and iterate
Planning/researchGlob, Grep, Read, WebSearch, WebFetchResearch and architecture agents
Task managementTaskCreate, TaskGet, TaskList, TaskUpdateAgents that break down or track work

Additional tools to consider:

  • Skill — if the agent should use existing skills (e.g., a Rust agent using tn-rust-engineer)
  • ToolSearch — if the agent might need to discover available tools
  • NotebookEdit — if working with Jupyter notebooks
  • WebSearch, WebFetch — if the agent needs external information
  • EnterWorktree, ExitWorktree — if the agent should work in isolation
  • CronCreate, CronDelete, CronList — if the agent manages scheduled tasks
  • RemoteTrigger — if the agent triggers remote executions

Flag overly broad grants. If you're about to recommend all tools, pause and ask whether the agent really needs write access, bash execution, etc. Call this out explicitly.

Color Selection

Colors provide visual distinction when multiple agents run. Choose semantically:

ColorMeaningExamples
blue or cyanAnalysis, review, explorationCode reviewer, architecture analyzer
greenGeneration, creation, implementationCode writer, file generator
yellowValidation, caution, checkingLinter, security checker, test runner
redSecurity, critical operationsSecurity auditor, production deployer
magentaTransformation, creative, planningRefactoring agent, task decomposer

Memory

Recommend persistent memory when the agent:

  • Operates in the same codebase repeatedly and benefits from accumulated knowledge
  • Learns patterns, conventions, or preferences over time
  • Builds institutional knowledge that helps future invocations

Skip memory when the agent:

  • Is stateless by nature (formatter, linter, one-shot generator)
  • Doesn't benefit from past context
  • Is meant to be a generic utility

Memory scope options:

  • project — memory is stored in the project directory (.claude/agent-memory/{agent-name}/), shared via version control. Best for codebase-specific knowledge.
  • user — memory is stored at $HOME/.claude/agent-memory/{agent-name}/, persists across all projects for a given user. Best for cross-project knowledge, user preferences, and agents that operate across multiple repos.

Should It Be One Agent or Multiple?

Consider splitting into multiple agents when:

  • Responsibilities are unrelated (e.g., "writes code AND runs security audits")
  • Different parts need different models (planning in opus, implementation in sonnet)
  • The agent description exceeds ~50 words of core responsibilities

Suggest the split with reasoning. Let the user decide.

Phase 3: Design the Agent Body

Build the agent definition using the sections below. Every agent gets the required sections. Deep-mode agents get optional sections as appropriate.

Required Sections (All Agents)

1. Identity Statement (1-2 sentences)

Establish the agent's expert persona. This sets the tone and anchors behavior.

You are an expert [domain] [role] specializing in [specific focus]. You [core behavior/philosophy].

Examples from real agents:

  • "You are an elite Rust systems engineer with deep expertise in blockchain infrastructure, distributed systems, and performance-critical code."
  • "You are an expert task decomposition architect specializing in breaking down complex coding work into minimal, independent units optimized for execution by AI coding agents."

2. Responsibilities (numbered list)

Concrete, actionable items. Each should be independently verifiable.

## Responsibilities

1. [Specific action verb] [what] [to what standard]
2. [Specific action verb] [what] [constraint or context]
...

3. Boundaries — What It Does NOT Do

Explicit exclusions prevent scope creep and make handoffs clear.

## What You Do NOT Do
- You do not [excluded responsibility] — [which agent/process handles this instead]
- You do not [excluded action] — [why]

4. Workflow (numbered steps)

The agent's standard operating procedure from receiving a task to completing it.

## Workflow

1. **Understand** — [how the agent orients to the task]
2. **Plan** — [what analysis happens before action]
3. **Execute** — [the core work]
4. **Verify** — [self-check before reporting]
5. **Report** — [how it communicates results]

5. Quality Checks (checkbox list)

The agent's pre-completion checklist. These should be concrete and verifiable.

## Quality Checks Before Completing

- [ ] [Specific verifiable condition]
- [ ] [Another condition]
...

Optional Sections (Deep Mode)

Include these when the discovery phase reveals the need.

6. Domain Context

Architecture knowledge, key concepts, invariants the agent must understand. This is where you inject the codebase-specific or domain-specific knowledge that makes the agent effective.

## Architecture Awareness

Before [doing work], study the codebase architecture. Pay close attention to:
- **[Concept]**: [what it means, why it matters]
- **[Boundary]**: [what stays separated and why]

7. Anti-Patterns

Mistakes the agent should explicitly avoid, with reasoning. These come from the user's experience with common failure modes.

## Anti-Patterns

### [Pattern name]
**Don't:** [the mistake]
**Why:** [consequence]
**Instead:** [correct approach]

8. Conventions

Formatting, naming, style, or process standards the agent must follow.

## Conventions

### [Category]
- [Specific rule with example]

9. Rules (Hard Constraints)

Non-negotiable constraints — things that must always or never happen.

## Rules

- **Always** [do X] before [doing Y]
- **Never** [action] without [precondition]

10. Memory System

If memory was recommended, this section gets appended. Read references/memory-template.md and replace the placeholders:

  • {{memory-directory-path}} — the full path to the agent's memory directory
  • {{memory-scope}} — "project" (memory stored in project dir, shared via VCS)

Also add a transition paragraph before the memory system that tells the agent what kinds of things to remember. Tailor this to the agent's domain. For example:

## Update Your Agent Memory

As you work in this codebase, update your agent memory with discoveries about:
- [Domain-specific thing to remember]
- [Another thing]
- [Patterns or conventions encountered]

This builds institutional knowledge across conversations.

Phase 4: Generate the Agent File

Determine Save Location

Agents can be saved at two levels:

  • Project-level (.claude/agents/ in the current repo) — for agents specific to this codebase
  • User-level (~/.claude/agents/) — for agents that work across all projects

Ask the user which they prefer if it's not obvious from context. Default to project-level for domain-specific agents, user-level for generic utilities.

Assemble the File

The agent file has two parts: YAML frontmatter and markdown body.

Frontmatter structure:

---
name: "{agent-name}"
description: "Use this agent when [triggering conditions]. [What it does]. [What it does NOT do].\n\n<example>\nContext: [situation]\nuser: \"[message]\"\nassistant: \"[response showing agent being used]\"\n<commentary>\n[Why this triggers the agent]\n</commentary>\n</example>\n\n<example>\n[second example]\n</example>\n\n<example>\n[third example]\n</example>"
tools: [Tool1, Tool2, Tool3]
model: [model or omit]
color: [color]
memory: [project or omit]
---

Description field requirements:

  • Start with "Use this agent when..."
  • Include 2-3 <example> blocks showing different trigger scenarios
  • Each example has Context, user message, assistant response, and commentary
  • Examples should show both explicit requests and proactive triggering
  • Mention what the agent does NOT do if there's a common confusion case

Name requirements:

  • Lowercase letters, numbers, and hyphens only
  • 2-4 words joined by hyphens
  • Clearly indicates the agent's primary function
  • Avoids generic terms like "helper" or "assistant"

Write the File

Use the Write tool to create the agent file at the determined location. If memory is enabled:

  1. Read references/memory-template.md
  2. Replace {{memory-directory-path}} with the actual path (e.g., $HOME/.claude/agent-memory/{agent-name}/ for user-scope, or .claude/agent-memory/{agent-name}/ for project-scope)
  3. Replace {{memory-scope}} with "project"
  4. Append the memory update prompt and the processed template to the agent body

Then create the memory directory:

mkdir -p {memory-directory-path}

Phase 5: Review and Refine

After generating the file, present a summary to the user:

## Agent Created: {agent-name}

### Configuration
- **Model:** {choice} — {one-line reasoning}
- **Tools:** {list} — {one-line reasoning}
- **Color:** {color} — {semantic meaning}
- **Memory:** {yes/no} — {reasoning}

### Responsibilities
{numbered list from the agent body}

### Boundaries
{what it does NOT do}

### File
`{path to agent file}`

Then ask for feedback on these specific dimensions:

  1. Tool grants — "I gave it {tools}. Does it need anything else, or should any be removed?"
  2. Boundaries — "The agent won't {exclusions}. Does that capture your concerns?"
  3. Domain context — (deep mode only) "Is there codebase-specific knowledge I should add?"
  4. Quality gates — "These are the checks it runs before finishing: {list}. Anything missing?"

If the user wants changes, update the file and re-present. Iterate until they're satisfied.

Optional: Test with a Sample Prompt

Offer to test the agent: "Want me to test this with a sample prompt? Give me a task you'd send to this agent and I'll show you how it would behave."

This helps validate that the description triggers correctly and the instructions produce the expected behavior.

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.