Agent skill

Create Subagents

by glittercowboy in glittercowboy/taches-cc-resources

Expert guidance for creating, building, and using Claude Code subagents and the Task tool.

MITAuto-check passedAgent Workflows

Install Create Subagents

skills CLI
$ npx skills add glittercowboy/taches-cc-resources --skill create-subagents -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install glittercowboy/taches-cc-resources create-subagents --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/glittercowboy/taches-cc-resources.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/create-subagents .claude/skills/create-subagents && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-subagents
GitHub stars
2k
Used in
1 other repo
Token cost
~2.6k tokens
SKILL.md length
899 words
Files
8 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Expert guidance for creating, building, and using Claude Code subagents and the Task tool.

  • Works in 5 steps: Run /agents command → Select "Create New Agent" → Choose project-level (.claude/agents/)… → …
  • Working with subagents
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Setting up agent configurations

What it does

Create Subagents is an agent skill from glittercowboy/taches-cc-resources. Expert guidance for creating, building, and using Claude Code subagents and the Task tool. Use when working with subagents, setting up agent configurations, understanding how agents work, or using the Task tool to launch specialized agents.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/context-management.md`, `references/debugging-agents.md` and `references/error-handling-and-recovery.md`).

It sits in Agent Workflows, covering Subagents. The repository describes itself as: A collection of my favorite custom Claude Code resources to make life easier. The licence is MIT.

When your agent uses it

  • Working with subagents
  • Setting up agent configurations
  • Understanding how agents work
  • Using the Task tool to launch specialized agents

Example prompts

  • “/create-subagents”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run /agents command
  2. Select "Create New Agent"
  3. Choose project-level (.claude/agents/) or user-level (~/.claude/agents/)
  4. Define the subagent
  5. Write the system prompt (the subagent's instructions)

What it can do on your machine

Read from SKILL.md and the folder at commit 1757615. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create Subagents loads about 2.6k tokens when it runs, and up to ~29k if it reads all its reference files. Until then it costs about 64 tokens; SKILL.md has 899 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~29k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from glittercowboy/taches-cc-resources at commit 1757615, republished under its MIT licence (© glittercowboy). 899 words, ~2,591 tokens.

Download SKILL.mdSave it as .claude/skills/create-subagents/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
create-subagents
description
Expert guidance for creating, building, and using Claude Code subagents and the Task tool. Use when working with subagents, setting up agent configurations, understanding how agents work, or using the Task tool to launch specialized agents.
<objective>
Subagents are specialized Claude instances that run in isolated contexts with focused roles and limited tool access. This skill teaches you how to create effective subagents, write strong system prompts, configure tool access, and orchestrate multi-agent workflows using the Task tool.

Subagents enable delegation of complex tasks to specialized agents that operate autonomously without user interaction, returning their final output to the main conversation. </objective>

<quick_start> <workflow>

  1. Run /agents command
  2. Select "Create New Agent"
  3. Choose project-level (.claude/agents/) or user-level (~/.claude/agents/)
  4. Define the subagent:
    • name: lowercase-with-hyphens
    • description: When should this subagent be used?
    • tools: Optional comma-separated list (inherits all if omitted)
    • model: Optional (sonnet, opus, haiku, or inherit)
  5. Write the system prompt (the subagent's instructions)
    </workflow>
<example>
```markdown
---
name: code-reviewer
description: Expert code reviewer. Use proactively after code changes to review for quality, security, and best practices.
tools: Read, Grep, Glob, Bash
model: sonnet
---
<role>
You are a senior code reviewer focused on quality, security, and best practices.
</role>

<focus_areas>

  • Code quality and maintainability
  • Security vulnerabilities
  • Performance issues
  • Best practices adherence </focus_areas>

<output_format> Provide specific, actionable feedback with file:line references. </output_format>

</example>
</quick_start>

<file_structure>
| Type | Location | Scope | Priority |
|------|----------|-------|----------|
| **Project** | `.claude/agents/` | Current project only | Highest |
| **User** | `~/.claude/agents/` | All projects | Lower |
| **Plugin** | Plugin's `agents/` dir | All projects | Lowest |

Project-level subagents override user-level when names conflict.
</file_structure>

<configuration>
<field name="name">
- Lowercase letters and hyphens only
- Must be unique
</field>

<field name="description">
- Natural language description of purpose
- Include when Claude should invoke this subagent
- Used for automatic subagent selection
</field>

<field name="tools">
- Comma-separated list: `Read, Write, Edit, Bash, Grep`
- If omitted: inherits all tools from main thread
- Use `/agents` interface to see all available tools
</field>

<field name="model">
- `sonnet`, `opus`, `haiku`, or `inherit`
- `inherit`: uses same model as main conversation
- If omitted: defaults to configured subagent model (usually sonnet)
</field>
</configuration>

<execution_model>
<critical_constraint>
**Subagents are black boxes that cannot interact with users.**

Subagents run in isolated contexts and return their final output to the main conversation. They:
- ✅ Can use tools like Read, Write, Edit, Bash, Grep, Glob
- ✅ Can access MCP servers and other non-interactive tools
- ❌ **Cannot use AskUserQuestion** or any tool requiring user interaction
- ❌ **Cannot present options or wait for user input**
- ❌ **User never sees subagent's intermediate steps**

The main conversation sees only the subagent's final report/output.
</critical_constraint>

<workflow_design>
**Designing workflows with subagents:**

Use **main chat** for:
- Gathering requirements from user (AskUserQuestion)
- Presenting options or decisions to user
- Any task requiring user confirmation/input
- Work where user needs visibility into progress

Use **subagents** for:
- Research tasks (API documentation lookup, code analysis)
- Code generation based on pre-defined requirements
- Analysis and reporting (security review, test coverage)
- Context-heavy operations that don't need user interaction

**Example workflow pattern:**

Main Chat: Ask user for requirements (AskUserQuestion) ↓ Subagent: Research API and create documentation (no user interaction) ↓ Main Chat: Review research with user, confirm approach ↓ Subagent: Generate code based on confirmed plan ↓ Main Chat: Present results, handle testing/deployment

</workflow_design>
</execution_model>

<system_prompt_guidelines>
<principle name="be_specific">
Clearly define the subagent's role, capabilities, and constraints.
</principle>

<principle name="use_pure_xml_structure">
Structure the system prompt with pure XML tags. Remove ALL markdown headings from the body.

```markdown
---
name: security-reviewer
description: Reviews code for security vulnerabilities
tools: Read, Grep, Glob, Bash
model: sonnet
---

<role>
You are a senior code reviewer specializing in security.
</role>

<focus_areas>
- SQL injection vulnerabilities
- XSS attack vectors
- Authentication/authorization issues
- Sensitive data exposure
</focus_areas>

<workflow>
1. Read the modified files
2. Identify security risks
3. Provide specific remediation steps
4. Rate severity (Critical/High/Medium/Low)
</workflow>
</principle>
<principle name="task_specific">
Tailor instructions to the specific task domain. Don't create generic "helper" subagents.

❌ Bad: "You are a helpful assistant that helps with code" ✅ Good: "You are a React component refactoring specialist. Analyze components for hooks best practices, performance anti-patterns, and accessibility issues." </principle> </system_prompt_guidelines>

<subagent_xml_structure> Subagent.md files are system prompts consumed only by Claude. Like skills and slash commands, they should use pure XML structure for optimal parsing and token efficiency.

<recommended_tags> Common tags for subagent structure:

  • <role> - Who the subagent is and what it does
  • <constraints> - Hard rules (NEVER/MUST/ALWAYS)
  • <focus_areas> - What to prioritize
  • <workflow> - Step-by-step process
  • <output_format> - How to structure deliverables
  • <success_criteria> - Completion criteria
  • <validation> - How to verify work </recommended_tags>

<intelligence_rules> Simple subagents (single focused task):

  • Use role + constraints + workflow minimum
  • Example: code-reviewer, test-runner

Medium subagents (multi-step process):

  • Add workflow steps, output_format, success_criteria
  • Example: api-researcher, documentation-generator

Complex subagents (research + generation + validation):

  • Add all tags as appropriate including validation, examples
  • Example: mcp-api-researcher, comprehensive-auditor </intelligence_rules>

<critical_rule> Remove ALL markdown headings (##, ###) from subagent body. Use semantic XML tags instead.

Keep markdown formatting WITHIN content (bold, italic, lists, code blocks, links).

For XML structure principles and token efficiency details, see @skills/create-agent-skills/references/use-xml-tags.md - the same principles apply to subagents. </critical_rule> </subagent_xml_structure>

<invocation>
<automatic>
Claude automatically selects subagents based on the `description` field when it matches the current task.
</automatic>
Show full SKILL.md (271 more words)Show less
<explicit>
You can explicitly invoke a subagent:
> Use the code-reviewer subagent to check my recent changes
> Have the test-writer subagent create tests for the new API endpoints
</explicit>
</invocation>
<management>
<using_agents_command>
Run `/agents` for an interactive interface to:
- View all available subagents
- Create new subagents
- Edit existing subagents
- Delete custom subagents
</using_agents_command>

<manual_editing> You can also edit subagent files directly:

  • Project: .claude/agents/subagent-name.md
  • User: ~/.claude/agents/subagent-name.md </manual_editing>
    </management>
<reference>
**Core references**:

Subagent usage and configuration: references/subagents.md

  • File format and configuration
  • Model selection (Sonnet 4.5 + Haiku 4.5 orchestration)
  • Tool security and least privilege
  • Prompt caching optimization
  • Complete examples

Writing effective prompts: references/writing-subagent-prompts.md

  • Core principles and XML structure
  • Description field optimization for routing
  • Extended thinking for complex reasoning
  • Security constraints and strong modal verbs
  • Success criteria definition

Advanced topics:

Evaluation and testing: references/evaluation-and-testing.md

  • Evaluation metrics (task completion, tool correctness, robustness)
  • Testing strategies (offline, simulation, online monitoring)
  • Evaluation-driven development
  • G-Eval for custom criteria

Error handling and recovery: references/error-handling-and-recovery.md

  • Common failure modes and causes
  • Recovery strategies (graceful degradation, retry, circuit breakers)
  • Structured communication and observability
  • Anti-patterns to avoid

Context management: references/context-management.md

  • Memory architecture (STM, LTM, working memory)
  • Context strategies (summarization, sliding window, scratchpads)
  • Managing long-running tasks
  • Prompt caching interaction

Orchestration patterns: references/orchestration-patterns.md

  • Sequential, parallel, hierarchical, coordinator patterns
  • Sonnet + Haiku orchestration for cost/performance
  • Multi-agent coordination
  • Pattern selection guidance

Debugging and troubleshooting: references/debugging-agents.md

  • Logging, tracing, and correlation IDs
  • Common failure types (hallucinations, format errors, tool misuse)
  • Diagnostic procedures
  • Continuous monitoring
    </reference>

<success_criteria> A well-configured subagent has:

  • Valid YAML frontmatter (name matches file, description includes triggers)
  • Clear role definition in system prompt
  • Appropriate tool restrictions (least privilege)
  • XML-structured system prompt with role, approach, and constraints
  • Description field optimized for automatic routing
  • Successfully tested on representative tasks
  • Model selection appropriate for task complexity (Sonnet for reasoning, Haiku for simple tasks) </success_criteria>

© glittercowboy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/create-subagents of glittercowboy/taches-cc-resources.

  • SKILL.md
  • references/context-management.md
  • references/debugging-agents.md
  • references/error-handling-and-recovery.md
  • references/evaluation-and-testing.md
  • references/orchestration-patterns.md
  • references/subagents.md
  • references/writing-subagent-prompts.md

Open the folder on GitHubat commit 1757615

Used in 1 other repository

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in glittercowboy/taches-cc-resources, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Create Subagents next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create Subagents compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create Subagents this skillglittercowboy/taches-cc-resources2k1 repos~2.6kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official38k8 repos~2.8kAutomated safety check: PassApache-2.0
Subagent Driven DevelopmentAsvarox/allkaraoke26138 repos~1.2kAutomated safety check: PassNone
Dispatching Parallel Agentsultralisp/ultralisp25841 repos~1.5kAutomated safety check: PassNone
Paseo Advisor Second Opiniongetpaseo/paseo20k1 repos~756Automated safety check: PassCustom licence
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Subagent Driven Development

    Asvarox/allkaraoke

    A skill your agent uses when executing implementation plans with independent tasks in the current session

    261 GitHub starsUsed in 38 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Dispatching Parallel Agents

    ultralisp/ultralisp

    A skill your agent uses when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

    258 GitHub starsUsed in 41 repos~1.5k tokens
    Agent WorkflowsAuto-check passed
  • Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.

    20k GitHub starsUsed in 1 repo~756 tokens
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from glittercowboy/taches-cc-resources

All 12 skills in this repo
  • Create MCP Servers

    glittercowboy/taches-cc-resources

    Create Model Context Protocol (MCP) servers that expose tools, resources, and prompts to Claude.

    2k GitHub stars~1.5k tokensUpdated 6 mo ago
    Auto-check passed
  • The Pirate Bay

    glittercowboy/taches-cc-resources

    Search The Pirate Bay for torrents and extract magnet links via the apibay.org JSON API.

    2k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • Create Meta Prompts

    glittercowboy/taches-cc-resources

    Create optimized prompts for Claude-to-Claude pipelines with research, planning, and execution stages.

    2k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Create Agent Skills

    glittercowboy/taches-cc-resources

    Expert guidance for creating, writing, building, and refining Claude Code Skills.

    2k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Create Plans

    glittercowboy/taches-cc-resources

    Create hierarchical project plans optimized for solo agentic development.

    2k GitHub starsUsed in 1 repo~4.4k tokens
    Auto-check: notes
  • Create Hooks

    glittercowboy/taches-cc-resources

    Expert guidance for creating, configuring, and using Claude Code hooks.

    2k GitHub stars~2.4k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Create Subagents

What does Create Subagents do?

Expert guidance for creating, building, and using Claude Code subagents and the Task tool. Create Subagents is an agent skill from glittercowboy/taches-cc-resources. Expert guidance for creating, building, and using Claude Code subagents and the Task tool.

When should I use Create Subagents?

Create Subagents fits situations like: working with subagents; setting up agent configurations; understanding how agents work; using the Task tool to launch specialized agents.

How do I install Create Subagents in Claude Code?

Run `npx skills add glittercowboy/taches-cc-resources --skill create-subagents -a claude-code`. Or copy the skill folder (skills/create-subagents in glittercowboy/taches-cc-resources) into .claude/skills/create-subagents in your project. Claude Code loads it when a task matches its description.

How do I install Create Subagents in Codex?

Run `npx skills add glittercowboy/taches-cc-resources --skill create-subagents -a codex`. Or copy the skill folder (skills/create-subagents in glittercowboy/taches-cc-resources) into .agents/skills/create-subagents in your project. Codex loads it when a task matches its description.

Can I use Create Subagents in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add glittercowboy/taches-cc-resources --skill create-subagents -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-subagents, .gemini/skills/create-subagents, .github/skills/create-subagents and .opencode/skills/create-subagents in your project.

What does Create Subagents need to run?

SKILL.md names no scripts, command-line tools or credentials: Create Subagents is instructions for the agent only.

Does Create Subagents access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Create Subagents safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Create Subagents use?

Create Subagents is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create Subagents use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 26k tokens, read only when the agent opens those files.

What are the alternatives to Create Subagents?

Skills that share tags, products or a category with Create Subagents: Claude Code Agent Development (anthropics/claude-plugins-official, 38k stars), Subagent Driven Development (Asvarox/allkaraoke, 261 stars), Dispatching Parallel Agents (ultralisp/ultralisp, 258 stars) and Paseo Advisor Second Opinion (getpaseo/paseo, 20k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create Subagents?

glittercowboy (a GitHub user) maintains it in glittercowboy/taches-cc-resources, which has 1,980 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on April 1, 2026.

Source: glittercowboy/taches-cc-resources on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.