/bear-common:sub-agents-patternsfrom Bear Craft — Common
Guides using sub-agents (Explore, Plan, General-Purpose) for parallel work, background tasks, and complex multi-file updates in Claude Code.
Ships in Bear Craft — Common. 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.
None: SKILL.md is the whole skill.
Guide for using sub-agents effectively in Claude Code for parallel and complex tasks.
Use for fast codebase exploration and information gathering.
Task tool with subagent_type: "Explore"
- Quick file pattern searches
- Keyword searches in code
- Understanding codebase structure
When to use:
Use for multi-step tasks requiring autonomy.
Task tool with subagent_type: "general-purpose"
- Complex refactoring
- Multi-file updates
- Research and implementation
When to use:
Use for designing implementation strategies.
Task tool with subagent_type: "Plan"
- Implementation planning
- Architecture decisions
- Trade-off analysis
When to use:
Launch multiple explore agents for different aspects:
# Launch in parallel (single message with multiple tool calls):
- Agent 1: Search for authentication patterns
- Agent 2: Search for API endpoints
- Agent 3: Search for database models
For independent file updates across languages/modules:
# Launch in parallel:
- Agent 1: Update French templates
- Agent 2: Update Spanish templates
- Agent 3: Update German templates
- Agent 4: Update Portuguese templates
Run different quality checks simultaneously:
# Launch in parallel:
- Agent 1: Run linter
- Agent 2: Run tests
- Agent 3: Check types
- Agent 4: Security audit
Use run_in_background: true for long-running tasks:
Task tool with:
run_in_background: true
Benefits:
- Continue working while agent runs
- Check progress via output file
- Notification when complete
Best for:
Background agents request permissions before launching, preventing mid-execution blocks:
Launching background task: "Analyze and fix code"
This task will need permissions for:
- Read (all files)
- Edit (src/**)
- Bash (npm run lint:fix)
Approve all? [y/N/select]
Response options:
| Option | Action |
|---|---|
y | Approve all requested permissions |
N | Refuse and cancel launch |
select | Choose permissions individually |
Benefits:
Task tool results now include execution metrics:
| Metric | Description |
|---|---|
| Token count | Total tokens consumed by the sub-agent |
| Tool uses | Number of tool invocations during execution |
| Duration | Total elapsed time for task completion |
Benefits:
# Task: Update all i18n templates to new format
## Parallel Execution:
1. Launch 4 agents (FR, ES, DE, PT) with run_in_background: true
2. Continue working on other phases
3. Check results when notified
## Each agent receives:
- List of files to update
- Template format to follow
- Instructions to read before write
For tasks that have dependencies:
1. Agent A completes task A
2. Check result
3. Agent B uses result for task B
4. Check result
5. Continue...
For parallel work with combined results:
1. Fan-out: Launch N parallel agents
2. Wait: All agents complete
3. Fan-in: Combine/verify results
4. Continue with merged state
${CLAUDE_PLUGIN_ROOT}/rules/01-workflow-analysis.md for analysis patterns.claude/settings.json for permission configurationWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thebeardedbearsas/bear-craft --plugin bear-common11 skills in this plugin
/documentationDocumentation standards, API docs, and technical writing guidelines/dynamic-workflowsOrchestrate many subagents via Dynamic Workflows (`ultracode`). Use when a task exceeds one agent/ecosystem-toolsThird-party Claude Code token/context/review tools. Use when picking an external tool to save tokens/git-workflowGit workflow best practices, branching strategies, and commit conventionsOther plugins' skills for the same job