subagent-creator

21
0
Source

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. Triggers on "create subagent", "new agent", "specialized assistant", "create verifier".

Install

mkdir -p .claude/skills/subagent-creator && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1182" && unzip -o skill.zip -d .claude/skills/subagent-creator && rm skill.zip

Installs to .claude/skills/subagent-creator

About this skill

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

Is the task complex with multiple steps?
├─ YES → Does it require isolated context?
│         ├─ YES → Use SUBAGENT
│         └─ NO → Use SKILL
│
└─ NO → Use SKILL

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:

---
name: agent-name
description: Description of when to use this subagent.
model: inherit # or fast, or specific model ID
readonly: false # true to restrict write permissions
---

You are an [expert in X].

When invoked:

1. [Step 1]
2. [Step 2]
3. [Step 3]

[Detailed instructions about expected behavior]

Report [type of expected result]:

- [Output format]
- [Metrics or specific information]

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.

name: security-auditor

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)

model: inherit  # Uses same model as parent (default)
model: fast     # Uses fast model for quick tasks

readonly (optional)

readonly: true # Restricts write permissions

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:

You are an [expert in X] specialized in [Y].

When invoked:

1. [First action]
2. [Second action]
3. [Third action]

[Detailed instructions about approach]

Report [type of result]:

- [Specific format]
- [Information to include]
- [Metrics or criteria]

[Philosophy or principles to follow]

Common Subagent Patterns

1. Verification Agent

Purpose: Independently validates that completed work actually works.

---
name: verifier
description: Validates completed work. Use after tasks are marked done.
model: fast
---

You are a skeptical validator.

When invoked:

1. Identify what was declared as complete
2. Verify the implementation exists and is functional
3. Execute tests or relevant verification steps
4. Look for edge cases that may have been missed

Be thorough. Report:

- What was verified and passed
- What is incomplete or broken
- Specific issues to address

2. Debugger

Purpose: Expert in root cause analysis.

---
name: debugger
description: Debugging specialist. Use when encountering errors or test failures.
---

You are a debugging expert.

When invoked:

1. Capture the error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify the solution works

For each issue, provide:

- Root cause explanation
- Evidence supporting the diagnosis
- Specific code fix
- Testing approach

3. Security Auditor

Purpose: Security expert auditing code.

---
name: security-auditor
description: Security specialist. Use for auth, payments, or sensitive data.
---

You are a security expert.

When invoked:

1. Identify security-sensitive code paths
2. Check for common vulnerabilities
3. Confirm secrets are not hardcoded
4. Review input validation

Report findings by severity:

- **Critical** (must fix before deploy)
- **High** (fix soon)
- **Medium** (address when possible)
- **Low** (suggestions)

4. Code Reviewer

Purpose: Code review with focus on quality.

---
name: code-reviewer
description: Code review specialist. Use when changes are ready for review.
---

You are a code review expert.

When invoked:

1. Analyze the code changes
2. Check readability, performance, patterns, error handling
3. Identify code smells and potential bugs
4. Suggest specific improvements

Report:
**✅ Approved / ⚠️ Approved with caveats / ❌ Changes needed**

**Issues Found:**

- **[Severity]** [Location]: [Issue]
  - Suggestion: [How to fix]

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:

✅ Subagent created successfully!

📁 Location: .agent/subagents/[name].md
🎯 Purpose: [brief description]
🔧 How to invoke:
   - Automatic: Agent delegates when it detects [context]
   - Explicit: /[name] [instruction]

💡 Tip: Include keywords like "use proactively" to encourage delegation.

More by tech-leads-club

View all →

perf-lighthouse

tech-leads-club

Run Lighthouse audits locally via CLI or Node API, parse and interpret reports, set performance budgets. Use when measuring site performance, understanding Lighthouse scores, setting up budgets, or integrating audits into CI. Triggers on: lighthouse, run lighthouse, lighthouse score, performance audit, performance budget.

261

domain-analysis

tech-leads-club

Identifies subdomains and suggests bounded contexts in any codebase following DDD Strategic Design. Use when analyzing domain boundaries, identifying business subdomains, assessing domain cohesion, mapping bounded contexts, or when the user asks about DDD strategic design, domain analysis, or subdomain classification.

10

accessibility

tech-leads-club

Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

180

component-common-domain-detection

tech-leads-club

Identifies duplicate domain functionality across components and suggests consolidation opportunities. Use when finding common domain logic, detecting duplicate functionality, analyzing shared classes, planning component consolidation, or when the user asks about common components, duplicate code, or domain consolidation.

20

cursor-skill-creator

tech-leads-club

Creates Cursor-specific AI agent skills with SKILL.md format. Use when creating skills for Cursor editor specifically, following Cursor's patterns and directories (.cursor/skills/). Triggers on "cursor skill", "create cursor skill".

240

cursor-subagent-creator

tech-leads-club

Creates Cursor-specific AI subagents with isolated context for complex multi-step workflows. Use when creating subagents for Cursor editor specifically, following Cursor's patterns and directories (.cursor/agents/). Triggers on "cursor subagent", "cursor agent".

280

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

282789

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

206415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

201286

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

211231

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

169197

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

165173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.