Agent skill · Workflow & Productivity

sub-agent-patterns

Comprehensive guide to sub-agents in Claude Code: built-in agents (Explore, Plan, general-purpose), custom agent creation, configuration, and delegation patterns. Use when: creating custom sub-agents, delegating bulk operations, parallel research, understanding built-in agents, or configuring agent tools/models.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill sub-agent-patterns-dennislee928-smart-zone-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 33 KB
Bundled scripts: none
Path: skills/agent/sub-agent-patterns-dennislee928-smart-zone-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Provides a comprehensive guide to sub-agents in Claude Code, detailing built-in sub-agents (Explore, Plan, General-Purpose), how to create custom sub-agents, configuration fields, tool usage, and orchestration patterns for multi-agent workflows.

How it works

Describes three built-in sub-agents with their models, modes, and tools:

  • Explore Agent: Haiku, read-only, tools include Glob, Grep, Read, Bash (read-only subset)
  • Plan Agent: Sonnet, read-only research, tools Read, Glob, Grep, Bash
  • General-Purpose Agent: Sonnet, read and write, tools All tools It explains custom sub-agent creation via Markdown with YAML frontmatter, including required fields (name, description) and optional fields (tools, model, permissionMode, hooks, skills). It outlines file locations for project, user, and CLI, and notes a session restart requirement when adding new agents mid-session. It lists available tools and recommended patterns by agent type, plus guidance on avoiding Bash approval spam. It also covers agent orchestration using the Task tool to spawn and coordinate multiple sub-agents, with examples of release orchestration and multi-specialist workflows. Finally, it presents advanced patterns like Background Agents (Async Delegation).

When to use it

Use when designing or selecting sub-agents for workflows, delegation, or parallel research, and when configuring or understanding built-in vs custom agents; triggers include creating custom sub-agents, delegating bulk operations, parallel research, understanding built-in agents, or configuring agent tools/models.

What it can touch

Lists tools that sub-agents can access, such as Read, Write, Edit, Glob, Grep, LS, Bash, Task, WebFetch, WebSearch, and others; details include which agent types should have which tools for different tasks (Read-only reviewers, Script runners, Orchestrators, etc.).

Caveats

Notes that session restart is required to discover newly created agents; Bash usage can cause approval spam if included in an agent’s tools list; guidance to drop Bash if not needed. It emphasizes careful tool access, especially for orchestrators and multi-agent coordination, to avoid unwanted prompts and complex context management.

From the SKILL.md

# Sub-Agents in Claude Code **Status**: Production Ready ✅ **Last Updated**: 2026-01-14 **Source**: https://code.claude.com/docs/en/sub-agents Sub-agents are specialized AI assistants that Claude Code can delegate tasks to. Each sub-agent has its own context window, configurable tools, and custom system prompt. --- ## Why Use Sub-Agents: Context Hygiene The primary value of sub-agents isn't specialization—it's **keeping your main context clean**. **Without agent** (context bloat): ``` Main context accumulates: ├─ git status output (50 lines) ├─ npm run build output (200 lines) ├─ tsc --noEmit output (100 lines) ├─ wrangler deploy output (100 lines) ├─ curl health check responses ├─ All reasoning about what to do next └─ Context: 📈 500+ lines consumed ``` **With agent** (context hygiene): ``` Main context: ├─ "Deploy to cloudflare" ├─ [agent summary - 30 lines] └─ Context: 📊 ~50 lines consumed Agent context (isolated): ├─ All verbose tool outputs ├─ All intermediate reasoning └─ Discarded after returning summary ``` **The math**: A deploy workflow runs ~10 tool calls. That's 500+ lines in main context vs 30-line summary with an agent. Over a session, this compounds dramatically. *

What's inside
Steps it walks through
  1. Why Use Sub-Agents: Context Hygiene
  2. Built-in Sub-Agents
  3. Explore Agent
  4. Plan Agent
  5. General-Purpose Agent
  6. Creating Custom Sub-Agents
  7. File Locations
  8. File Format
  9. Configuration Fields
  10. Available Tools Reference
  11. Avoiding Bash Approval Spam (CRITICAL)
  12. Using /agents Command (Recommended)
  13. CLI Configuration
  14. Using Sub-Agents
Ships with 1 file
  • metadata.json
Commands it runs
claude --agents '{
claude --disallowedTools "Task(Explore)"
git add [files] && git commit -m "$(cat <<'EOF'
More from claude-skill-registry
All skills →
About this skill
What does the sub-agent-patterns skill do?

Comprehensive guide to sub-agents in Claude Code: built-in agents (Explore, Plan, general-purpose), custom agent creation, configuration, and delegation patterns. Use when: creating custom sub-agents, delegating bulk operations, parallel research, understanding built-in agents, or configuring agent tools/models.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill sub-agent-patterns-dennislee928-smart-zone-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going