subagent-creator

Guide for creating AI subagents with isolated context for complex multi-step workflows. Use when users want to create a subagent, specialized agent, verifier, debugger, or orchestrator that requires isolated context and deep specialization. Works with any agent that supports subagent delegation. Tri

By tech-leads-club · 797 installs

npx skills add tech-leads-club/agent-skills --skill subagent-creator

Source repository · Upstream listing

Subagent Creator This skill provides guidance for creating effective, agent agnostic subagents. What are Subagents? Subagents are specialized assistants that an AI agent can delegate tasks to. Characteristics: Isolated context : Each subagent has its own context window Parallel execution : Multiple subagents can run simultaneously Specialization : Configured with specific prompts and expertise Reusable : Defined once, used in multiple contexts When to Use Subagents vs Skills Use Subagents for: Complex workflows requiring isolated context Long running tasks that benefit from specialization Verification and auditing (independent perspective) Parallel workstreams Use Skills for: Quick, one off actions Domain knowledge without context isolation Reusable procedures that don't need isolation Subagent Structure A subagent is typically a markdown file with frontmatter metadata: Subagent Creation Process 1. Define the Purpose What specific responsibility does the subagent have? Why does it need isolated context? Does it involve multiple complex steps? Does it require deep specialization? 2. Configure the Metadata name (required) Unique identifier. Use kebab case. description (critical) CRITICAL for automatic delegation. Explains when to use this subagent. Good descriptions: "Security specialist. Use when implementing auth, payments, or handling sensitive data." "Debugging specialist for errors and test failures. Use when encountering issues." "Validates completed work. Use after tasks are marked done." Phrases that encourage automatic delegation: "Use proactively when..." "Always use for..." "Automatically delegate when..." model (optional) readonly (optional) 3. Write the Subagent Prompt Define: 1. Identity : "You are an [expert]..." 2. When invoked : Context of use 3. Process : Specific steps to follow 4. Expected output : Format and content Template: Common Subagent Patterns 1. Verification Agent Purpose : Independently validates that completed work actually works. 2. Debugger Purpose : Expert in root cause analysis. 3. Security Auditor Purpose : Security expert auditing code. 4. Code Reviewer Purpose : Code review with focus on quality. Best Practices ✅ DO Write focused subagents : One clear responsibility Invest in the description : Determines when to delegate Keep prompts concise : Direct and specific Share with team : Version control subagent definitions Test the description : Check correct subagent is triggered ❌ AVOID Vague descriptions : "Use for general tasks" gives no signal Prompts too long : 2000 words don't make it smarter Too many subagents : Start with 2 3 focused ones Quality Checklist Before finalizing: [ ] Description is specific about when to delegate [ ] Name uses kebab case [ ] One clear responsibility (not generic) [ ] Prompt is concise but complete [ ] Instructions are actionable [ ] Output format is well defined [ ] Model configuration appropriate Output Messages When creating a subagent: