Agent skill
subagent-best-practices
Auto-injects subagent delegation best practices when agents, subagents, Task tool, or parallel execution is mentioned.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/subagent-best-practices-opensourcesam-v2-heras-garden
SKILL.md
Subagent Best Practices
Auto-inject when: User mentions "subagent", "Task tool", "spawn agent", "parallel"
Core Principle: Main Agent = Orchestrator ONLY
Main agents should NOT:
- Run Grep/Glob/Bash (delegate to subagents)
- Read files directly (ask subagents to extract info)
Main agents SHOULD:
- Decompose task into independent subtasks
- Spawn subagents with specific prompts
- Aggregate and synthesize results
Task Decomposition Pattern
Step 1: Break task into independent chunks Step 2: Ensure parallel independence Step 3: Define clear deliverables
Subagent Prompt Template
You are Subagent {N} tasked with:
{Specific subtask description}
Search scope: {directories/files}
Output format: {table/list/JSON}
Return ONLY specified output format.
Quick Reference
Before spawning: Can I decompose? Clear deliverables? Parallel independence? When spawning: Specific prompts, defined scope, single message (parallel) After spawning: Aggregate WITHOUT re-running, make decisions from reports
[Codex - 2026-01-24]
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?