subagent-factory
ユーザーが「エージェント作成」などを指示した際に、適切な設定や指示、利用ツール範囲などをガイドし、特定の業務に特化したClaude Codeエージェントをその場で作れるように支援するSkill。
📜 元の英語説明(参考)
Create specialized Claude Code agents on-the-fly. Guides through agent definition file creation with proper frontmatter, effective prompts, and tool scoping. USE WHEN user says 'create agent', 'new subagent', 'make an agent for', 'build agent', 'spawn agent', or wants to define custom agents for specific tasks.
🇯🇵 日本人クリエイター向け解説
ユーザーが「エージェント作成」などを指示した際に、適切な設定や指示、利用ツール範囲などをガイドし、特定の業務に特化したClaude Codeエージェントをその場で作れるように支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o subagent-factory.zip https://jpskill.com/download/16894.zip && unzip -o subagent-factory.zip && rm subagent-factory.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16894.zip -OutFile "$d\subagent-factory.zip"; Expand-Archive "$d\subagent-factory.zip" -DestinationPath $d -Force; ri "$d\subagent-factory.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
subagent-factory.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
subagent-factoryフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 5
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Subagent Factory
特化した Claude Code エージェントを作成するためのファクトリです。適切な構成、効果的なシステムプロンプト、および適切なツールアクセスを備えたエージェント定義ファイルを生成します。
この Skill をアクティブ化するタイミング
- ユーザーが「エージェントを作成」、「新しいサブエージェント」、「エージェントを構築」と言う場合
- ユーザーが特定のタスク用のカスタムエージェントを必要としている場合
- ユーザーがエージェント定義ファイル、システムプロンプト、ツール構成を必要としている場合
- ユーザーが特化したエージェントの作成方法、作業の委任方法を尋ねる場合
2つの作成モード
クイックモード (直接作成)
経験豊富なユーザー向けの高速パスです。最小限の質問で、ファイルを直接生成します。
使用時: 必要なエージェントが正確にわかっている場合。
参照: workflows/quick-create.md
インタビューモード (ガイド付き作成)
各ステップで質問とカスタマイズを行うインタラクティブなワークフローです。
使用時: エージェントの設計を検討している場合、プロセスを学習している場合、または複雑なエージェントを作成している場合。
参照: workflows/interview-create.md
クイックリファレンス: エージェントスキーマ
必須の Frontmatter フィールド
---
name: agent-name # 必須: kebab-case 識別子
description: When to use this agent # 必須: 自然言語トリガー
---
オプションの Frontmatter フィールド
tools: Read, Write, Bash # カンマ区切り、すべてを継承する場合は省略
model: sonnet # sonnet|opus|haiku|inherit
permissionMode: default # 許可処理モード
skills: skill-name # Skill の自動ロード
システムプロンプト (Markdown 本文)
frontmatter の後の Markdown コンテンツは、エージェントのシステムプロンプトです。
主要な要素:
- アイデンティティ/役割の定義
- 明確な責任
- ステップバイステップのワークフロー
- 具体的なチェックリスト
- 出力形式の仕様
- 境界 (DO/DO NOT)
コア原則
1. 単一責任
各エージェントは、複数の緩やかに関連するタスクではなく、1つの明確な目的を持つ必要があります。
2. 適切な高度
過度に規範的 (壊れやすい if-else ロジック) ではなく、曖昧すぎない (役に立たない紋切り型の言葉)。エージェントが考えられるように明確なガイダンスを提供します。
3. 明示的なツールスコープ
最小限必要なツールを付与します。読み取り専用エージェントは Write を必要としません。レビュー担当者は Bash を必要としません。
4. 段階的な例
望ましい動作パターンを示す3〜5個の具体的な例を含めます。
5. 実行可能な指示
命令形を使用します: 「テストを実行」、「コードを分析」、「レポートを生成」(「テストが実行されます」ではない)。
ナビゲーション
詳細なドキュメント
references/agent-schema.md- 完全な frontmatter リファレンスreferences/task-tool-reference.md- タスクツールのパラメータと使用法references/prompt-patterns.md- 効果的なプロンプトエンジニアリングパターンreferences/advanced-features.md- フック、スラッシュコマンド、MCP 統合
ワークフロー
workflows/quick-create.md- 高速なエージェント作成ステップworkflows/interview-create.md- インタラクティブなガイド付き作成
ツールアクセスによるエージェントタイプ
読み取り専用エージェント (レビュー担当者、監査人)
tools: Read, Grep, Glob
用途: コードレビュー、セキュリティ監査、コンプライアンスチェック
調査エージェント (アナリスト)
tools: Read, Grep, Glob, WebFetch, WebSearch, Write (調査結果を保存する必要がある場合)
用途: 技術調査、ドキュメント検索、ベストプラクティス
コードライター (実装者)
tools: Read, Write, Edit, Bash, Grep, Glob
用途: 機能実装、バグ修正、リファクタリング
フルスタックエージェント (エンドツーエンド)
tools: Read, Write, Edit, Bash, Grep, Glob, WebFetch
# 必要に応じて MCP ツールを追加
用途: 完全な機能の提供、統合作業
一般的なエージェントパターン
セキュリティレビュー担当者
目的: 脆弱性についてコードを分析する ツール: Read, Grep, Glob 主要なチェックリスト: 入力検証、認証、シークレット、SQL インジェクション、XSS、CSRF
テストランナー
目的: テストを実行し、失敗を診断し、修正を提案する ツール: Read, Edit, Write, Bash, Grep, Glob 主要なワークフロー: テストを実行 → 失敗を診断 → 修正を提案 → 検証
テクニカルリサーチャー
目的: テクノロジー、API、ベストプラクティスを調査する ツール: Read, Grep, Glob, WebFetch, WebSearch 主要な出力: 比較マトリックス、根拠のある推奨事項、次のステップ
コード実装者
目的: 仕様に従って機能を構築する ツール: Read, Write, Edit, Bash, Grep, Glob 主要なワークフロー: 要件を理解 → 設計 → 実装 → テスト → ドキュメント化
ファイルの場所
エージェント定義は以下に配置します:
- プロジェクトレベル:
.claude/agents/(バージョン管理され、チームで共有) - ユーザーレベル:
~/.claude/agents/(個人用エージェント)
優先順位: プロジェクトエージェントは、同じ名前のユーザーエージェントよりも優先されます。
タスクツール統合
エージェントは Task ツールを介して呼び出されます:
Use the security-reviewer agent to analyze the authentication module for vulnerabilities.
組み込みのエージェントタイプ:
general-purpose- フルツール、Sonnet モデルexplore- 読み取り専用、Haiku モデル (高速検索)plan- 計画中の調査と分析
カスタムエージェント: .claude/agents/ から名前で参照
並列実行: 最大10個の同時エージェント (それ以上は自動的にキューイング)
主要な洞察
- システムプロンプトは Markdown 本文であり、frontmatter ではない - よくある間違い
- ツールの継承 - すべてを継承するには
toolsフィールドを省略します。制限するには指定します。 - モデルの選択 - 高速検索には
haiku、バランスの取れた作業にはsonnet、複雑な推論にはopusを使用します。 - トークンオーバーヘッド - 各エージェントの生成には約20kトークンかかります。並列化のバランスを取ります。
- コンテキストの分離 - 各エージェントは独立したコンテキストウィンドウを持ちます (相互汚染を防ぎます)。
クイックスタート
簡単な例:
# .claude/agents/test-runner.md
---
name: test-runner
description: Run tests, diagnose failures, propose fixes. Use after code changes.
tools: Read, Edit, Bash, Grep
model: sonnet
---
You are a test automation specialist.
## Workflow
1. Run test suite using project test command
2. If failures: capture output, read test files, diagnose root cause
3. Propose minimal fix with rationale
4. Re-run to verify
## Output Fo 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Subagent Factory
Factory for creating specialized Claude Code agents. Generates agent definition files with proper configuration, effective system prompts, and appropriate tool access.
When to Activate This Skill
- User says: "create agent", "new subagent", "build agent"
- User wants: Custom agents for specific tasks
- User needs: Agent definition files, system prompts, tool configuration
- User asks: How to make specialized agents, how to delegate work
Two Creation Modes
Quick Mode (Direct Creation)
Fast path for experienced users. Minimal questions, direct file generation.
Use when: You know exactly what agent you need.
See: workflows/quick-create.md
Interview Mode (Guided Creation)
Interactive workflow with questions and customization at each step.
Use when: Exploring agent design, learning the process, or creating complex agents.
See: workflows/interview-create.md
Quick Reference: Agent Schema
Required Frontmatter Fields
---
name: agent-name # REQUIRED: kebab-case identifier
description: When to use this agent # REQUIRED: natural language triggers
---
Optional Frontmatter Fields
tools: Read, Write, Bash # Comma-separated, omit to inherit all
model: sonnet # sonnet|opus|haiku|inherit
permissionMode: default # Permission handling mode
skills: skill-name # Auto-load skills
System Prompt (Markdown Body)
The Markdown content after frontmatter is the agent's system prompt.
Key elements:
- Identity/role definition
- Clear responsibilities
- Step-by-step workflow
- Concrete checklists
- Output format specification
- Boundaries (DO/DO NOT)
Core Principles
1. Single Responsibility
Each agent should have ONE clear purpose, not multiple loosely-related tasks.
2. Right Altitude
Not too prescriptive (brittle if-else logic), not too vague (unhelpful platitudes). Give clear guidance that lets the agent think.
3. Explicit Tool Scoping
Grant minimum necessary tools. Read-only agents don't need Write. Reviewers don't need Bash.
4. Progressive Examples
Include 3-5 concrete examples showing desired behavior patterns.
5. Actionable Instructions
Use imperative form: "Run tests", "Analyze code", "Generate report" (not "The tests are run").
Navigation
Deep Documentation
references/agent-schema.md- Complete frontmatter referencereferences/task-tool-reference.md- Task tool parameters and usagereferences/prompt-patterns.md- Effective prompt engineering patternsreferences/advanced-features.md- Hooks, slash commands, MCP integration
Workflows
workflows/quick-create.md- Fast agent creation stepsworkflows/interview-create.md- Interactive guided creation
Agent Types by Tool Access
Read-Only Agents (Reviewers, Auditors)
tools: Read, Grep, Glob
Use for: Code review, security audits, compliance checks
Research Agents (Analysts)
tools: Read, Grep, Glob, WebFetch, WebSearch, Write (if need to save research)
Use for: Technology research, documentation lookup, best practices
Code Writers (Implementers)
tools: Read, Write, Edit, Bash, Grep, Glob
Use for: Feature implementation, bug fixes, refactoring
Full-Stack Agents (End-to-End)
tools: Read, Write, Edit, Bash, Grep, Glob, WebFetch
# Plus MCP tools as needed
Use for: Complete feature delivery, integration work
Common Agent Patterns
Security Reviewer
Purpose: Analyze code for vulnerabilities Tools: Read, Grep, Glob Key checklist: Input validation, authentication, secrets, SQL injection, XSS, CSRF
Test Runner
Purpose: Execute tests, diagnose failures, propose fixes Tools: Read, Edit, Write, Bash, Grep, Glob Key workflow: Run tests → Diagnose failures → Propose fixes → Verify
Tech Researcher
Purpose: Investigate technologies, APIs, best practices Tools: Read, Grep, Glob, WebFetch, WebSearch Key output: Comparison matrix, recommendation with rationale, next steps
Code Implementer
Purpose: Build features following specifications Tools: Read, Write, Edit, Bash, Grep, Glob Key workflow: Understand requirements → Design → Implement → Test → Document
File Location
Agent definitions go in:
- Project-level:
.claude/agents/(version controlled, team-shared) - User-level:
~/.claude/agents/(personal agents)
Precedence: Project agents override user agents with same name.
Task Tool Integration
Agents are invoked via the Task tool:
Use the security-reviewer agent to analyze the authentication module for vulnerabilities.
Built-in agent types:
general-purpose- Full tools, Sonnet modelexplore- Read-only, Haiku model (fast searches)plan- Research and analysis during planning
Custom agents: Reference by name from .claude/agents/
Parallel execution: Up to 10 concurrent agents (automatic queuing for more)
Key Insights
- System prompt is Markdown body, NOT frontmatter - Common mistake
- Tool inheritance - Omit
toolsfield to inherit all; specify to restrict - Model selection - Use
haikufor fast searches,sonnetfor balanced work,opusfor complex reasoning - Token overhead - Each agent spawn costs ~20k tokens; balance parallelization
- Context isolation - Each agent has independent context window (prevents cross-contamination)
Quick Start
Simple example:
# .claude/agents/test-runner.md
---
name: test-runner
description: Run tests, diagnose failures, propose fixes. Use after code changes.
tools: Read, Edit, Bash, Grep
model: sonnet
---
You are a test automation specialist.
## Workflow
1. Run test suite using project test command
2. If failures: capture output, read test files, diagnose root cause
3. Propose minimal fix with rationale
4. Re-run to verify
## Output Format
- Test results summary
- Failure analysis (if any)
- Proposed fixes with evidence
For detailed examples and patterns, see reference documentation.
Next Steps
- Choose creation mode (quick or interview)
- Define agent purpose and responsibilities
- Select appropriate tools
- Write effective system prompt
- Test with realistic scenarios
- Iterate based on failures
Start with workflows/quick-create.md for direct creation or workflows/interview-create.md for guided process.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (6,873 bytes)
- 📎 references/advanced-features.md (15,006 bytes)
- 📎 references/agent-schema.md (11,854 bytes)
- 📎 references/prompt-patterns.md (26,145 bytes)
- 📎 references/task-tool-reference.md (16,626 bytes)