creating-subagents
Use when need to create specialized subagent for recurring tasks, domain-specific work, or pipeline automation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when need to create specialized subagent for recurring tasks, domain-specific work, or pipeline automation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when approach is chosen and need a detailed implementation plan before coding. After researching, before implementer
Use when idea is vague, multiple interpretations exist, scope is undefined, or stakeholders need alignment before technical work begins
Use when requirements are fuzzy, multiple technical approaches exist, or change affects architecture, API, data, or security
Use when an approved implementation blueprint exists and you are about to start implementation
Use when code needs behavior-preserving restructuring to improve clarity, reduce duplication, or enable safer changes without altering outputs
Use when need to create reusable technique, pattern, or reference guide for AI agents
| name | creating-subagents |
| description | Use when need to create specialized subagent for recurring tasks, domain-specific work, or pipeline automation |
Subagents are specialized AI instances with focused expertise, isolated context, and scoped tool access.
Skip if: one-off task, no specialization needed.
| Field | Required | Purpose |
|---|---|---|
name | Yes | Lowercase, hyphens only |
description | Yes | When to delegate (triggers) |
tools | No | Allowlist; omit = inherit all |
disallowedTools | No | Denylist; removed from inherited |
permissionMode | No | default, acceptEdits, plan, etc. |
skills | No | Preload skill content into context |
hooks | No | Lifecycle hooks (PreToolUse, Stop) |
color | No | Background color for UI identification |
Before writing code, answer:
Description determines when agent is invoked. Write it before the prompt.
Pattern: [Role]. [Trigger condition]. Use proactively [when].
# ❌ BAD: Vague, no trigger
description: Helps with code
# ❌ BAD: Describes process, not trigger
description: Reviews code and provides feedback
# ✅ GOOD: Clear role + trigger + proactive hint
description: Code quality reviewer. Use proactively after code changes.
Start with the smallest prompt that works:
---
name: code-reviewer
description: Code quality reviewer. Use proactively after code changes.
tools: Read, Glob, Grep, Bash
color: blue
---
You are a code reviewer. When invoked:
1. Run git diff to see changes
2. Review modified files
3. Report: Critical → Warnings → Suggestions
Include fix examples.
Run the agent on real tasks. Document:
When agent fails, identify the gap:
| Symptom | Fix |
|---|---|
| Doesn't activate | Improve description triggers |
| Wrong scope | Add constraints to prompt |
| Missing context | Add required tools or skills |
| Unstructured output | Define output format in prompt |
| Does too much | Split into focused agents |
| Role | Tools |
|---|---|
| Read-only | Read, Grep, Glob |
| Research | Read, Grep, Glob, WebFetch, WebSearch |
| Code modification | Read, Write, Edit, Bash, Glob, Grep |
| Full access | (omit field — inherits all) |
| Mistake | Fix |
|---|---|
| Vague description | Specific triggers: "after code changes" |
| Tool inheritance by default | Explicit tools field for security |
| No structured output | Define format in prompt |
| Monolithic mega-agent | Split into single-purpose agents |
| Missing "Use proactively" | Add to description for auto-delegation |
| Prompt before description | Write description first — it's the API |
Chain agents for multi-stage workflows:
pm-spec → architect-review → implementer-tester
Each agent: