This skill should be used when the user asks to "プロジェクトを解析して", "コードベースを調べてドキュメント化して", "移行作業の準備をして", "新機能実装の前にプロジェクトを整理して", "analyze this codebase", "document the project structure", "既存プロジェクトのCLAUDE.mdを作って", or wants to prepare CLAUDE.md and architecture docs before a migration, feature development, or onboarding.
subagent-strategy
サブエージェントを活用した並列実行・調査委譲・コンテキスト管理の戦略。複雑な問題への対処、調査・探索タスク、複数の選択肢の比較検討、大規模なリファクタリングなどでこのスキルを参照する。「調べて」「比較して」「並列で」「複数のアプローチを試して」といったリクエストや、メインのコンテキストが肥大化しそうな場面で使う。
インストール方法を見る含まれるファイル(2)
- SKILL.md3.1 KB
- README.md1.3 KB
SKILL.md(原文)
インストールする前に、エージェントに与えられる指示の中身を確認できます。
サブエージェント戦略
基本方針
メインのコンテキストウィンドウをクリーンに保つため、サブエージェントを積極的に活用する。
いつサブエージェントを使うか
以下のタスクはサブエージェントに委譲する。
- 調査・探索: ドキュメント調査、コードベースの検索、ライブラリの比較検討
- 並列分析: 複数のアプローチを同時に試す、複数ファイルの解析
- 独立した作業単位: テストの実行、リンターの修正、フォーマットの適用
使い方のルール
1サブエージェントにつき1タスク
サブエージェントには焦点を絞った単一のタスクを与える。複数のタスクを1つのサブエージェントに詰め込まない。
良い例:
- 「
src/components/配下で未使用のインポートを検出してリストアップせよ」 - 「
react-queryとswrの API 比較表を作成せよ」
悪い例:
- 「コードベースを調査して問題を見つけ、修正案を作成し、テストも書け」
モデル選択
構造化されたタスク(探索→計画→実装→検証のようなレシピに沿う作業)は model: "sonnet" を指定する。
Opus が必要なのは、アーキテクチャ判断や複雑な設計判断を伴うタスクに限定する。
コンテキスト効率
- CLAUDE.md を渡さない: サブエージェントは自動的に CLAUDE.md を読み込む。明示的に渡すと二重になる
- コードスニペットを埋め込まない: ファイルパスと行番号のリストを渡し、サブエージェント側で Read させる
- Reference ファイルは該当フェーズで読む: サブエージェントのプロンプトに参考資料の全文を含めない
サブエージェントへの指示に含めること
- 具体的なタスク内容
- 参照すべきファイルパスと行番号(コード本文ではなくパスのみ)
- 期待する出力形式
- 制約条件(変更禁止のファイルなど)
結果の統合
サブエージェントの結果はメインコンテキストで統合する。複数のサブエージェントの結果を比較・統合して、最終的な判断を下す。
使わない場合
以下の場合はサブエージェントを使わず、メインコンテキストで直接対応する。
- 単一ファイルの小さな修正
- 既にコンテキストに必要な情報が揃っている場合
- ユーザーとの対話的なやり取りが必要な場合
レビュー
まだレビューはありません。使ってみた感想をお寄せください。
同じリポジトリのスキル
概要と使いどころ
This skill should be used when the user asks to "このエラーを直して", "help me debug this", "fix this stack trace", "なぜこのエラーが出るの", "CI が落ちた", or pastes an error message or stack trace and wants help diagnosing it. Classifies the error type, identifies related files, and proposes up to three root-cause hypotheses with concrete fix plans.
This skill should be used when the user asks to "ドキュメントを更新して", "sync the docs", "update CLAUDE.md after this change", "実装に合わせてドキュメントを直して", or notices that docs have drifted from the codebase. Diffs git history to identify what changed, proposes targeted updates to CLAUDE.md, docs/architecture.md, docs/requirements.md, and README.md, then applies only approved changes.
explain
無料Explain selected code or a specified file/function in plain language, including what it does, why it exists, and potential pitfalls
日本語の概要は準備中です。原文の説明を表示しています。
This skill should be used when the user asks to "このファイルを変えたら何が壊れる?", "what depends on this function", "影響範囲を調べて", "show me what imports this module", or wants to understand the blast radius before modifying a shared utility, exported type, or public API. Traces import/require references up to two levels deep and lists affected test files.
This skill should be used when the user asks to "このIssueを実装して", "implement this issue", "fix this bug", "このタスクをやって", "Issue