your-sub-agent-name
This tool creates modular sub-agents with specific prompts, permissions, and tool access for specialized domain tasks.
Install
mkdir -p .claude/skills/your-sub-agent-name && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3144" && unzip -o skill.zip -d .claude/skills/your-sub-agent-name && rm skill.zipInstalls to .claude/skills/your-sub-agent-name
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create and manage specialized Claude Code subagents for task-specific workflows. Use when delegating work to specialized agents, configuring agent permissions, or understanding subagent architecture and best practices.Key capabilities
- →Create specialized subagents for specific tasks
- →Configure custom system prompts and tool access
- →Delegate tasks to agents with isolated context
- →Manage agent permissions and scope
How it works
Subagents are defined as Markdown files with YAML frontmatter, allowing them to operate within their own context windows and tool sets.
Inputs & outputs
When to use your-sub-agent-name
- →Delegating complex sub-tasks to specialized agents
- →Managing agent tool permissions
- →Reducing context window pollution by using subagents
About this skill
Subagent System
When to Use
- Creating specialized subagents for task-specific work
- Delegating work to pre-configured agents
- Managing subagent tool permissions and scope
- Understanding when to use agent delegation vs. direct work
What Are Subagents?
Pre-configured AI personalities that Claude Code can delegate tasks to. Each:
- Has specific purpose and expertise area
- Uses separate context window (prevents pollution)
- Can be configured with specific tools
- Includes custom system prompt
Benefits:
- Context preservation — Each operates in own context, keeping main conversation focused
- Specialized expertise — Fine-tuned instructions for specific domains
- Reusability — Use across projects and share with team
- Flexible permissions — Different tool access levels per agent
Creating Subagents
File Locations
| Type | Location | Scope |
|---|---|---|
| Project subagents | .claude/agents/ | Current project only |
| User subagents | ~/.claude/agents/ | All projects |
Project-level subagents take precedence over user-level when names conflict.
File Format
Each subagent is a Markdown file with YAML frontmatter:
---
name: your-sub-agent-name
description: When this subagent should be invoked
tools: tool1, tool2, tool3 # Optional - inherits all if omitted
model: sonnet # Optional - specify model or 'inherit'
---
Your subagent's system prompt goes here. Multiple paragraphs.
Include role, capabilities, approach, best practices, constraints.
Configuration Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier (lowercase + hyphens) |
description | Yes | Natural language purpose description |
tools | No | Comma-separated tools (inherits all if omitted) |
model | No | Model alias (sonnet, opus, haiku) or 'inherit' |
Using Subagents Effectively
Automatic Delegation
Claude Code proactively delegates based on:
- Task description in your request
descriptionfield in subagent configuration- Current context and available tools
To encourage proactive use, include "use PROACTIVELY" or "MUST BE USED" in description.
Explicit Invocation
Request specific subagents by name:
> Use the test-runner subagent to fix failing tests
> Have the code-reviewer subagent look at my recent changes
Management
Using /agents Command (Recommended)
Interactive menu for:
- View all available subagents
- Create new subagents with guided setup
- Edit existing custom subagents
- Delete custom subagents
- Manage tool permissions
Direct File Management
mkdir -p .claude/agents
cat > .claude/agents/test-runner.md << 'EOF'
---
name: test-runner
description: Use proactively to run tests and fix failures
---
You are a test automation expert. When you see code changes, proactively run the appropriate tests. If tests fail, analyze failures and fix them.
EOF
Best Practices
- Start with Claude-generated agents, then customize
- Design focused subagents with single, clear responsibility
- Write detailed prompts with specific instructions, examples, constraints
- Limit tool access to only necessary tools
- Version control project subagents for team collaboration
Performance Notes
- Context efficiency: Agents preserve main context, enabling longer sessions
- Latency: Subagents start with clean slate, may add latency gathering context
When not to use it
- →When a task is simple enough to be handled by the main agent
Limitations
- →Subagents start with a clean slate, which may add latency
- →Requires manual configuration of tool access and prompts
How it compares
It enables modular task delegation, preventing context window pollution by offloading work to specialized agents.
Compared to similar skills
your-sub-agent-name side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| your-sub-agent-name (this skill) | 1 | 10mo | Review | Intermediate |
| ava | 0 | 4mo | No flags | Advanced |
| ask-suggest-priority-batching | 0 | 2mo | No flags | Intermediate |
| workflow-router | 1 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by CaptainCrouton89
View all by CaptainCrouton89 →You might also like
ava
protoLabsAI
Codex-native operational orchestration for protoLabs Studio. Use when the user wants autonomous triage, backlog supervision, board operations, agent coordination, or multi-step operational decision-making across the portfolio.
ask-suggest-priority-batching
kiexpert
Reduce ask-gpt calls when triaging wkappbot suggest backlogs. Use when you have a page of suggestions and want one GPT ranking pass, then one ask per suggestion in priority order.
workflow-router
parcadei
Goal-based workflow orchestration - routes tasks to specialist agents based on user goals
loki-mode
davila7
Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention. Features Task tool for subagent dispatch, parallel code review with 3 specialized reviewers, severity-based issue triage, distributed task queue with dead letter handling, automatic deployment to cloud providers, A/B testing, customer feedback loops, incident response, circuit breakers, and self-healing. Handles rate limits via distributed state checkpoints and auto-resume with exponential backoff. Requires --dangerously-skip-permissions flag.
wg
graphwork
Use this skill for task coordination with WG. Triggers include "wg", task graphs, multi-step projects, tracking dependencies, coordinating agents, or when you see a .wg directory.
run-tasks
JeremyKalmus
Orchestrate task execution via beads and sub-agents. Gets ready work from beads, spawns appropriate agents based on labels, monitors completion, and updates status. Use after /approve-spec has created tasks.