This skill should be used when the user asks to "create a subagent", "validate a subagent", "generate subagent schema", "check subagent configuration", "write subagent specification", or mentions subagent development, validation, or protocol documentation for Claude Code.
Ships in example-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Comprehensive guidance for creating, validating, and documenting Claude Code subagents with schemas and protocol specifications.
This skill provides structured workflows for developing production-ready Claude Code subagents. Use when creating new subagents, validating existing configurations, generating JSON schemas for validation, or writing technical specifications for subagent protocols.
This skill should be used when:
Subagents are Markdown files with YAML frontmatter:
---
name: subagent-identifier
description: When and how to use this subagent
tools: Tool1, Tool2
model: sonnet
permissionMode: default
skills: skill1, skill2
---
System prompt content in Markdown format.
^[a-z0-9-]+$)sonnet, opus, haiku, or inheritdefault, acceptEdits, bypassPermissions, plan, ignoreDefine purpose and scope:
Use the subagent template:
cp assets/template.md .claude/agents/your-subagent.md
Configure frontmatter:
name (lowercase, hyphens)description with trigger phrasestools needed (or omit for all)model and permissionModeWrite system prompt:
Validate configuration:
scripts/validate-subagent.sh .claude/agents/your-subagent.md
Use the validation script to check:
scripts/validate-subagent.sh path/to/subagent.md
The script validates against the JSON schema in assets/subagent-schema.json.
When needing a validation schema for tooling:
assets/subagent-schema.jsonThe schema includes:
For technical documentation:
Reference the protocol spec: references/protocol-specification.md
Include key sections:
Adapt for your needs:
scripts/validate-subagent.sh checks:
Usage:
scripts/validate-subagent.sh <subagent-file>
Exit codes:
scripts/create-subagent.sh scaffolds a new subagent:
scripts/create-subagent.sh <name> <scope>
Arguments:
name: Subagent identifier (lowercase, hyphens)scope: project (.claude/agents/) or user (~/.claude/agents/)Creates file from template and opens in editor.
assets/subagent-schema.json provides:
Use with validation tools:
# With ajv-cli
ajv validate -s assets/subagent-schema.json -d your-subagent.json
# With Python jsonschema
python -c "import json, jsonschema; \
jsonschema.validate( \
json.load(open('subagent.json')), \
json.load(open('assets/subagent-schema.json')))"
Include specific trigger phrases:
Good:
description: Expert code reviewer. Use PROACTIVELY after code changes to review quality, security, and best practices. Checks for vulnerabilities, performance issues, style violations.
Poor:
description: Helps with code
Grant only necessary tools:
# Read-only analysis
tools: Read, Grep, Glob
# Code modification
tools: Read, Edit, Write
# Full workflow
tools: Read, Edit, Write, Bash
Structure prompts with:
Choose appropriate model:
Comprehensive documentation in references/:
protocol-specification.md: Complete subagent protocol spec (20,000+ words)
field-reference.md: Detailed field-by-field reference
best-practices.md: Advanced best practices
Production-ready examples in examples/:
code-reviewer.md: Comprehensive code review subagent
debugger.md: Systematic debugging specialist
test-runner.md: Test automation expert
Templates and schemas in assets/:
subagent-schema.json: Complete JSON Schema for validationtemplate.md: Base template for new subagents.claude/agents/name.md~/.claude/agents/name.mdplugin-dir/agents/name.mdWhen names conflict:
Common tools for subagents:
Task - Delegate to subagentsBash - Execute shell commandsRead, Edit, Write - File operationsGrep, Glob - Search operationsWebFetch, WebSearch - Web operationsTodoWrite - Task managementmcp__<server>__<tool>default: Standard permission flow (recommended)acceptEdits: Auto-approve edit operationsbypassPermissions: Skip all permissions (use cautiously)plan: Read-only explorationignore: Ignore permission dialogsCheck:
^[a-z0-9-]+$Run validation:
scripts/validate-subagent.sh path/to/subagent.md
Improve description:
Example:
description: Security auditor. Use PROACTIVELY when reviewing code, checking for vulnerabilities, or analyzing security. Checks OWASP Top 10, injection attacks, authentication issues.
Verify:
tools specifiedmcp__server__toolCheck available tools:
Task, Bash, Glob, Grep, Read, Edit, Write, NotebookEdit,
WebFetch, WebSearch, BashOutput, KillShell, AskUserQuestion,
TodoWrite, Skill, SlashCommand
Adjust permissionMode:
default: User approves operationsacceptEdits: Auto-approve edits onlybypassPermissions: Auto-approve all (use carefully)Or grant specific tools in tools field.
Before deploying a subagent:
Structure:
Configuration:
^[a-z0-9-]+$Content Quality:
Validation:
Testing:
README.md (opens in a new tab)assets/subagent-schema.json (opens in a new tab)assets/template.md (opens in a new tab)examples/code-reviewer.md (opens in a new tab)examples/debugger.md (opens in a new tab)examples/test-runner.md (opens in a new tab)references/best-practices.md (opens in a new tab)references/field-reference.md (opens in a new tab)references/protocol-specification.md (opens in a new tab)scripts/create-subagent.sh (opens in a new tab)scripts/validate-subagent.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/rafaelcalleja-example-skills-skills:claude-subagent-developmentfrom example-skills
Claude Code refuses to install this plugin
Claude Code refuses to add this marketplace: name: Marketplace name impersonates an official Anthropic/Claude marketplace
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
12 skills in this plugin
/codex-cliUse when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing/fabric-aiGuides pattern selection through decomposition, exploration, and diverse approach generation/Gemini-CLIGemini CLIConsult Google Gemini CLI for second opinions on architecture, debugging, and security audits. Use Gemini's 1M+
context window for comprehensive code analysis. Compare Flash (fast) vs Pro (thorough) vs 3-Pro-Preview (cutting-edge).
Use when: need second opinion on architectural decisions, stuck debugging after 2+ attempts, writing security-
sensitive code, planning refactors (5+ files), approaching 70%+ context capacity, unfamiliar with tech stack,
need peer review, or want Flash vs Pro vs 3-Pro-Preview comparison.
Keywords: gemini-cli, google gemini, gemini command line, second opinion, model comparison, gemini-2.5-flash, gemini-2.5-pro, gemini-3-pro-preview, architectural decisions, debugging assistant, code review gemini, security audit gemini, 1M context window, AI pair programming, gemini consultation, flash vs pro, AI-to-AI prompting, peer review, codebase analysis, gemini CLI tool, shell gemini, command line AI assistant, gemini architecture advice, gemini debug help, gemini security scan, gemini code compare
/hooks-masteryThis skill should be used when the user asks to "create a hook", "configure hooks", "validate hook configuration", "add a PreToolUse hook", "add a PostToolUse hook", "add a SessionStart hook", mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, UserPromptSubmit, PermissionRequest, Notification, PreCompact, SessionEnd), or needs help with Claude Code hooks protocol. Provides comprehensive guidance for creating, configuring, and validating hooks following the official protocol specification./makefile-assistantAutomatically capture Bash commands executed by Claude Code and convert them into documented, organized Makefile targets in .claude/makefiles/. Use when Claude executes any Bash command, when tempted to skip documentation ("too trivial", "one-time", "will do later"), or when user asks for Makefile generation. Process commands NOW while fresh, not later./mcp-builderGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).