# Subagent Creator

Guide for creating AI subagents with isolated context for complex multi-step workflows.

- Repository: https://github.com/tech-leads-club/agent-skills (7121 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add tech-leads-club/agent-skills --skill subagent-creator -g -a claude-code -y`
Codex: `npx skills add tech-leads-club/agent-skills --skill subagent-creator -g -a codex -y`
Cursor: `npx skills add tech-leads-club/agent-skills --skill subagent-creator -g -a cursor -y`
Gemini CLI: `npx skills add tech-leads-club/agent-skills --skill subagent-creator -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add tech-leads-club/agent-skills`

## Description

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". Do NOT use for Cursor-specific subagents (use cursor-subagent-creator instead).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```markdown
---
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.

```yaml
name: security-auditor
```

#### description (critical)

CRITICAL for automatic delegation. Explains when to use this subagent.

The rest: https://github.com/tech-leads-club/agent-skills/blob/HEAD/packages/skills-catalog/skills/(creation)/subagent-creator/SKILL.md
