.agents/skills/agent-authoring/SKILL.md
Creates and configures Claude Code subagents (custom agents). Covers frontmatter fields, tool restrictions, model selection, hooks, memory, skills preloading, and common patterns. Follows official Anthropic best practices. USE WHEN: user mentions "create agent", "subagent", "custom agent", ".claude/agents", "agent file", "delegate task", "isolated context", "agent memory", "agent hooks" DO NOT USE FOR: creating skills - use `skill-authoring`; creating hooks standalone - use `hook-authoring`; creating MCP servers - use `mcp-authoring`
npx skillsauth add d-subrahmanyam/deno-fresh-microservices agent-authoringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agents are Markdown files with YAML frontmatter. The body becomes the system prompt.
.claude/agents/my-agent.md # Project-scoped (commit to VCS)
~/.claude/agents/my-agent.md # User-scoped (all projects)
See quick-ref/frontmatter-reference.md for detailed field docs.
---
name: code-reviewer # Required. Lowercase + hyphens
description: | # Required. When Claude should delegate
Expert code review specialist. Use proactively after code changes.
tools: Read, Grep, Glob, Bash # Allowlist (inherits all if omitted)
disallowedTools: Write, Edit # Denylist (removed from inherited/allowed)
model: sonnet # sonnet | opus | haiku | inherit (default)
permissionMode: default # default | acceptEdits | dontAsk | bypassPermissions | plan
maxTurns: 50 # Max agentic turns before stopping
skills: # Skills preloaded into context at startup
- api-conventions
- error-handling
mcpServers: # MCP servers available to this agent
- slack # Reference existing server by name
memory: user # user | project | local — persistent memory
background: false # true = always run as background task
isolation: worktree # Run in temporary git worktree
hooks: # Lifecycle hooks (scoped to this agent)
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/validate.sh"
---
The markdown body IS the system prompt. Subagents receive ONLY this + basic env details (cwd, etc.), NOT the full Claude Code system prompt.
Effective prompt structure:
You are a [role] specializing in [domain].
When invoked:
1. [First action]
2. [Second action]
3. [Third action]
[Domain-specific checklist or criteria]
Provide feedback organized by:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider)
Include specific examples of how to fix issues.
Claude delegates based on the description. Include "Use proactively" to encourage automatic delegation.
Good: "Expert code review specialist. Use proactively after code changes."
Bad: "Reviews code" — too vague, Claude won't know when to delegate.
| Use Case | Mechanism | |----------|-----------| | Verbose output you don't need in main context | Agent | | Enforce tool restrictions | Agent | | Self-contained work returning a summary | Agent | | Reusable knowledge/instructions inline | Skill | | Frequent back-and-forth needed | Main conversation | | Quick, targeted changes | Main conversation |
| Model | Use for |
|-------|---------|
| haiku | Fast exploration, simple search, low-cost |
| sonnet | Balanced — code review, analysis, most tasks |
| opus | Complex reasoning, architecture decisions |
| inherit | Same as main conversation (default) |
tools: Read, Grep, Glob, Bashtools (inherits all)disallowedTools: Write, Edittools: Agent(worker, researcher), ReadSee quick-ref/patterns.md for detailed examples.
Code reviewer — Read-only, focused on quality Debugger — Can edit, diagnosis-to-fix workflow Domain expert — Specialized knowledge (data science, security) Parallel research — Multiple agents exploring independently Chain — Sequential agents, each building on previous results
When memory is set, the agent gets a persistent directory across sessions.
| Scope | Location | Use when |
|-------|----------|----------|
| user | ~/.claude/agent-memory/<name>/ | Learnings across all projects |
| project | .claude/agent-memory/<name>/ | Project-specific, shareable via VCS |
| local | .claude/agent-memory-local/<name>/ | Project-specific, not committed |
The agent automatically gets Read/Write/Edit tools + instructions for managing MEMORY.md.
Tip: Include in prompt: "Update your agent memory as you discover patterns, codepaths, and architectural decisions."
| Anti-Pattern | Fix | |--------------|-----| | Too many responsibilities | One agent, one job. Create separate agents for different tasks | | No description or vague description | Detailed description with "use proactively" | | Overly permissive tools | Grant only what's needed | | Expecting subagents to spawn subagents | Not supported. Use chains from main conversation | | Forgetting subagents lose parent context | They start fresh. Preload skills or provide full instructions |
name and description set (both required).claude/agents/ (project) or ~/.claude/agents/ (user)development
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
development
FastAPI modern Python web framework. Covers routing, Pydantic models, dependency injection, and async support. Use when building Python APIs. USE WHEN: user mentions "fastapi", "pydantic", "async python api", "python rest api", asks about "dependency injection python", "python openapi", "python swagger", "async endpoints", "python api validation", "fastapi middleware" DO NOT USE FOR: Django apps - use `django` instead, Flask apps - use `flask` instead, synchronous Python APIs without type hints, GraphQL-only APIs
tools
FastAPI integration testing specialist. Covers synchronous TestClient, async httpx AsyncClient, dependency injection overrides, auth testing (JWT, OAuth2, API keys), WebSocket testing, file uploads, background tasks, middleware testing, and HTTP mocking with respx, responses, and pytest-httpserver. USE WHEN: user mentions "FastAPI test", "TestClient", "httpx async test", "dependency override test", "respx mock", asks about testing FastAPI endpoints, authentication in tests, or HTTP client mocking. DO NOT USE FOR: Django - use `pytest-django`; pytest internals - use `pytest`; Container infrastructure - use `testcontainers-python`
development
Expert in FastAPI Python development with best practices for APIs and async operations