From claude-code
Knowledge bank for Claude Code sub-agents -- built-in agents, custom agent configuration, agent teams, context isolation, costs, model selection, and troubleshooting. Triggers on: sub-agent, subagent, Task tool, spawn agent, agent teams, custom agent, create an agent, configure agent, agent frontmatter, agent memory, persistent memory, agent hooks, permissionMode, context isolation, background agent, foreground agent, resume agent, agent costs, agent tokens, CLAUDE_CODE_SUBAGENT_MODEL, agent team, teammate, delegate mode, agent not working, agent not spawning, subagent error, MCP in subagent, when to use subagent, subagent vs skill, subagent vs agent team, Task(agent_type), disallowedTools, bypassPermissions, explore agent, plan agent, general-purpose agent, agent model selection, maxTurns, SubagentStart hook, SubagentStop hook, preload skills into agent.
npx claudepluginhub nathanvale/side-quest-plugins --plugin claude-codeThis skill is limited to using the following tools:
Authoritative guidance for configuring and using Claude Code sub-agents, extracted from
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
Authoritative guidance for configuring and using Claude Code sub-agents, extracted from Anthropic's official documentation. Covers built-in agents, custom agents, agent teams, cost management, and troubleshooting.
This skill draws from:
Reference files are the primary source. Community intel is opt-in via
/newsroom:investigate -- see Community Perspective below.
This skill does NOT maintain a community intel cache. It can hand off to
/newsroom:investigate for live community signal when the user wants real-world examples.
Auto-detect these signals -- if the user's question contains any of these, offer to run community research:
When detected:
/newsroom:investigate with a tailored queryDo NOT auto-invoke research for standard doc questions.
Parse the user's question into one or more intent categories.
| Intent | Trigger Signals | Reference File |
|---|---|---|
| Getting Started | what is a subagent, how do subagents work, Task tool, built-in agents, Explore agent, Plan agent, general-purpose agent, when to use subagent | fundamentals.md |
| Configuration | create agent, custom agent, agent frontmatter, agent YAML, tools field, disallowedTools, permissionMode, maxTurns, agent hooks, persistent memory, memory scope, preload skills, mcpServers, agent file, .claude/agents/, --agents flag | configuration.md |
| Agent Teams | agent team, teammate, delegate mode, shared task list, team lead, spawn teammate, parallel sessions, team coordination, in-process mode, split panes, tmux | agent-teams.md |
| Costs & Models | agent cost, agent tokens, pricing, model selection, haiku, sonnet, opus, CLAUDE_CODE_SUBAGENT_MODEL, prompt caching, auto-compaction, reduce cost, token usage, context window | costs-and-models.md |
| Patterns | best practices, when to use, subagent vs skill, subagent vs agent team, parallel research, chain agents, isolate output, permission scoping, foreground, background, resume agent | patterns-and-best-practices.md |
| Troubleshooting | agent not working, agent not spawning, subagent error, permission denied, MCP not available, background agent failed, agent stuck, orphaned session, team not appearing | troubleshooting.md |
Read the relevant reference file(s) based on the classification. For multi-intent questions, read all relevant files.
Every response should follow this structure:
User: What are subagents in Claude Code?
Skill: [Reads fundamentals.md]
Subagents are isolated AI workers that run in their own 200k context window.
They handle a task and return a summary to your main conversation.
Three built-in subagents:
| Agent | Model | Tools | Purpose |
|-------|-------|-------|---------|
| Explore | Haiku | Read-only | Codebase search |
| Plan | Inherits | Read-only | Research during plan mode |
| General-purpose | Inherits | All | Complex multi-step tasks |
You can also create custom agents as Markdown files in .claude/agents/:
---
name: code-reviewer
description: Reviews code for quality. Use proactively after code changes.
tools: Read, Grep, Glob, Bash
model: sonnet
---
You are a code reviewer. Analyze code for quality, security, and best practices.
Test: ask "What agents are available?" or invoke /agents.
Source: fundamentals.md
User: How do I restrict which tools a subagent can use?
Skill: [Reads configuration.md]
Use the `tools` field (allowlist) or `disallowedTools` field (denylist):
---
name: safe-researcher
description: Research agent with restricted capabilities
tools: Read, Grep, Glob, Bash
disallowedTools: Write, Edit
---
For finer control, use PreToolUse hooks to validate operations conditionally
(e.g., allow Bash but only for SELECT queries).
Verify: run /agents and check the agent's tool list.
Common failure: omitting the tools field entirely means the agent inherits ALL
tools from the main conversation.
Source: configuration.md
User: Should I use a subagent or a skill for my code review workflow?
Skill: [Reads patterns-and-best-practices.md]
Use a subagent if the review reads many files and you want to keep verbose
output out of your main context. Use a skill if the review is quick and you
want results inline with your conversation.
| | Subagent | Skill |
|---|---------|-------|
| Context | Isolated 200k window | Main conversation |
| Output | Summary returned | Full output inline |
| Best for | Verbose, self-contained tasks | Reference knowledge, quick workflows |
| Cost | Higher (separate context) | Lower (shared context) |
For a comprehensive code review across many files, a subagent with
model: sonnet and read-only tools is the better choice.
Source: patterns-and-best-practices.md
User: What are people building with custom agents?
Skill: [Detects community signal -> "what are people building"]
Skill: [Reads patterns-and-best-practices.md for official patterns first]
Here's what the official docs cover for agent patterns:
[brief summary of patterns from patterns-and-best-practices.md]
Let me check what the community is building...
Skill: [Invokes /newsroom:investigate "Claude Code custom agents subagents examples"]
From the community (last 30 days):
[research results with engagement metrics]