Agent skill
subagent-creator
Guide for creating effective subagents (custom agents). Use when users want to create a new subagent that can be dispatched via Task tool for autonomous work. Covers frontmatter fields (name, description, tools, model, permissionMode, skills), prompt design, and when to use subagents vs skills.
Install this agent skill to your Project
npx add-skill https://github.com/timequity/vibe-coder/tree/main/skills/subagent-creator
SKILL.md
Subagent Creator
Create effective subagents that handle autonomous tasks via the Task tool.
Subagents vs Skills
| Aspect | Subagent | Skill |
|---|---|---|
| Invocation | Explicit via Task tool | Auto-triggered by context |
| Context | Isolated (fresh context window) | Shared with parent |
| Complexity | Single .md file | Folder with resources |
| Use case | Autonomous discrete tasks | Guidance and procedures |
| Nesting | Cannot spawn other subagents | Can reference other skills |
Use subagent when:
- Task is discrete and autonomous
- Fresh context window is beneficial
- Task can run in parallel with other work
- Specialized tool restrictions needed
Use skill when:
- Guidance needed throughout conversation
- Context sharing is important
- Multiple resources (scripts, references) needed
Subagent Structure
agents/
└── agent-name.md
├── YAML frontmatter (metadata)
└── Markdown body (system prompt)
Frontmatter Fields
| Field | Required | Description |
|---|---|---|
name |
Yes | Lowercase, hyphens only (e.g., code-reviewer) |
description |
Yes | When to use - this triggers dispatch decisions |
tools |
No | Comma-separated: Bash, Glob, Grep, Read, Edit, Write |
model |
No | sonnet, opus, haiku, or inherit (default: inherit) |
permissionMode |
No | default, acceptEdits, bypassPermissions, plan |
skills |
No | Comma-separated skills to auto-load |
Tools Reference
Read-only: Glob, Grep, Read, WebFetch, WebSearch
Write: Edit, Write, NotebookEdit
Execute: Bash
All: * (or omit field)
Permission Modes
| Mode | Description |
|---|---|
default |
Normal permission prompts |
acceptEdits |
Auto-accept file edits |
bypassPermissions |
Skip all permission prompts |
plan |
Plan mode - explore but don't modify |
Writing Effective Prompts
Structure
---
name: agent-name
description: When to use this agent. Be specific about triggers.
tools: Tool1, Tool2
model: sonnet
---
# Agent Name
One-line role description.
## Input Required
What the agent expects to receive.
## Process
Step-by-step what the agent does.
## Output Format
Exact format of the response.
## Rules
- Constraints and boundaries
- What to avoid
Best Practices
- Be specific about role - First line defines identity
- Define clear inputs - What must be provided
- Structure the process - Numbered steps
- Specify output format - Use code blocks for templates
- Set boundaries - What NOT to do
Description Guidelines
The description field triggers when the agent is suggested. Include:
- Primary use case
- Required inputs
- Expected output type
# Good
description: Use after completing a task to review code changes. Provide BASE_SHA, HEAD_SHA, and requirements. Returns issues with file:line references.
# Bad
description: Reviews code.
Examples
Minimal Subagent
---
name: summarizer
description: Use to summarize long documents or conversations. Provide the content to summarize.
tools: Read
model: haiku
---
# Summarizer
Summarize the provided content in 3-5 bullet points.
Focus on: key decisions, action items, conclusions.
Skip: greetings, filler, obvious context.
Full Subagent
See references/subagent-examples.md for complete examples.
Creation Process
- Define the task - What autonomous work does this agent do?
- Choose tools - Minimum needed (prefer restrictive)
- Choose model - haiku for simple, sonnet for complex, opus for critical
- Write prompt - Role, process, output, rules
- Test - Dispatch via Task tool, iterate
Init Script
scripts/init_subagent.py <agent-name> --path <output-directory>
Creates template agent file with proper structure.
Anti-Patterns
- Too broad - Agent tries to do everything
- Too many tools - Give minimum necessary
- Vague output - Always specify exact format
- No boundaries - Must define what NOT to do
- Wrong model - Don't use opus for simple tasks
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
mvp-help
Help and documentation for Idea to MVP plugin. Use when: user asks about building MVPs, vibe coding, or available commands. Triggers: "help", "what can you do", "mvp help", "how to build".
verification-gate
Hidden quality gate that runs before showing "Done!" to user - ensures all tests pass, build succeeds, and requirements met before claiming completion
brainstorming
Refine ideas into detailed designs through Socratic dialogue. Use when: user has rough idea, needs to clarify requirements, explore approaches. Triggers: "brainstorm", "discuss idea", "I'm thinking about", "what if", "help me think through", "explore options", "/brainstorm".
backend-rust
Modern Rust backend with Axum, SQLx, tokio + CI/CD automation. Use when: building Rust APIs, high-performance services, or needing build/test/lint/audit automation. Triggers: "axum", "rust backend", "rust api", "sqlx", "tokio", "cargo build", "cargo test", "clippy", "rustfmt", "cargo-audit", "cross-compile", "rust ci", "release build", "rust security", "shuttle", "actix".
test-driven-development
Write failing test first, then minimal code to pass. Red-Green-Refactor cycle. Use when: implementing features, fixing bugs, refactoring code. Triggers: "implement", "add feature", "fix bug", "tdd", "test first", "write tests", "test-driven".
deploy-automation
One-click deploy to production. User just says "deploy". Use when: user wants to publish their app. Triggers: "deploy", "publish", "go live", "опубликуй".
Didn't find tool you were looking for?