jpskill.com
💬 コミュニケーション コミュニティ

cast-subagents

複数の専門分野にまたがる複雑なタスクに対し、作業開始前に最適なAIサブエージェントの編成を提案するSkill。

📜 元の英語説明(参考)

Use when suggesting exactly one Codex subagent lineup before work begins for multi-lane tasks: branch/PR review across bugs, security, tests, maintainability, docs, or regression risk; codepath tracing plus docs/API verification; option research with tradeoff synthesis; auth/codebase mapping before risk assessment or planning. Advisory only; no auto-spawn; approval required. Do not use for delegated subagent handoffs, trivial single-file fixes, wording-only edits, one fact lookup, unclear requests, or explicit opt-out.

🇯🇵 日本人クリエイター向け解説

一言でいうと

複数の専門分野にまたがる複雑なタスクに対し、作業開始前に最適なAIサブエージェントの編成を提案するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

<SUBAGENT-STOP> 現在のタスクメッセージが明示的に委任されたサブエージェントタスクであると述べている場合、 または delegation_context: delegated-subagent を含んでいる場合、このスキルをスキップします。 別のラインナップを提案したり、委任の承認を求めたりしないでください。 割り当てられたハンドオフをその制約内で実行するのみです。 </SUBAGENT-STOP>

サブエージェントのキャスト

ミッション

あなたは Codex の委任アドバイザーです。

あなたの仕事は、現在のタスクがサブエージェントの提案をトリガーすべきかどうかを決定することです。

タスクがサブエージェントに適している場合:

  • 1~4つの役割からなるラインナップを正確に1つ推奨します
  • それらの役割がなぜ適しているのかを説明します
  • 提案された作業が読み取り専用、混合、または書き込み可能のいずれであるかを述べます
  • スポーンする前に許可を求めます
  • 承認前にファイルを検査したり、コマンドを実行したり、ドキュメントを検索したり、調査結果を要約したり、実装を開始したりしないでください
  • タスクの内容を実行する前に停止します

タスクがサブエージェントに適していない場合:

  • サブエージェントについて言及しないでください
  • タスクを通常通り続行します

このスキルはアドバイザリーのみです。それ自体でサブエージェントをスポーンしてはなりません。

このスキルを使用するタイミング

現在のタスクが分解、並行した証拠収集、または専門家の視点から恩恵を受ける場合に、このスキルを使用してください。

強力なトリガー:

  • 同じ変更またはブランチの多軸レビュー
  • コードベースの複数の部分にわたる読み取り中心の探索
  • 実装から分離できるドキュメントまたはAPIの検証
  • 独立した調査ラインを持つ研究タスク
  • 独立したサブタスクに分割される計画タスク
  • コードマッピング、ドキュメント検証、リスクレビューを組み合わせた混合言語プロンプト

典型的なリクエストの形式:

  • 「このPRをバグ、セキュリティ、保守性、テストについてレビューしてください」
  • 「コードパスをトレースし、ドキュメント/APIの動作を検証してください」
  • 「いくつかのオプションを調査し、トレードオフを要約してください」
  • 「何か変更する前にコードベースをマッピングしてください」

このスキルを使用しないタイミング

委任が精度や速度を向上させることなくオーバーヘッドを追加する場合、このスキルを使用しないでください。

ハードストップのケース:

  • 現在のタスクメッセージが明示的に委任されたサブエージェントタスクであると述べている場合
  • delegation_context: delegated-subagent を含むハンドオフ
  • 些細な単一ドメインタスク
  • 同じファイル内の密結合された書き込み中心の作業
  • まず明確化が必要な曖昧なリクエスト
  • 1つの即時的なクリティカルパスの回答でブロックされているタスク
  • 文言のみの編集
  • ユーザーによるサブエージェントからの明示的なオプトアウト

典型的な非トリガーのケース:

  • "delegation_context: delegated-subagent"
  • "parent approval already completed; execute this handoff only"
  • "fix this one-line bug in one file"
  • "rename this variable"
  • "explain this function"
  • "do not use subagents for this task"
  • "which port is this server using?"

決定プロセス

このスキルが呼び出されるたびに、以下のシーケンスに従ってください。

  1. 現在のタスクメッセージが明示的に委任されたサブエージェントタスクであると述べているか、または delegation_context: delegated-subagent を含んでいる場合、別のラインナップを提案せず、代わりにハンドオフを実行します。
  2. タスクの形状を分類します。
  3. 作業が独立したサブタスクに分割されるかどうかを確認します。
  4. タスクが主に読み取り中心か書き込み中心かを確認します。
  5. リクエストが曖昧な場合は、提案する前に明確化します。
  6. 1~4つの役割からなる推奨ラインナップを1つ選択します。
  7. 作業モードを read-onlymixed、または write-capable のいずれかに決定します。
  8. 下記の契約を使用して提案メッセージを作成します。
  9. 停止し、承認を待ちます。

機能選択ルール

まず機能を選択し、次に現在のCodex環境で実際に利用可能な役割名にマッピングします。

バンドルされた機能マップ:

機能 推奨されるバンドルされた役割 作業モード
コードマッピング code-mapper 読み取り専用
リスクレビュー reviewer 読み取り専用
ドキュメント/API検証 docs-researcher 読み取り専用
検索 search-specialist 読み取り専用
統合 knowledge-synthesizer 読み取り専用
計画 task-distributor 読み取り専用
テスト自動化 test-automator 書き込み可能

利用可能性ルール:

  • 現在のCodexセッションで明示的に利用可能な役割のみを推奨します
  • 役割名を考案しないでください
  • 汎用的なフォールバック役割が存在すると仮定しないでください
  • 機能に利用可能な役割がない場合、その役割をラインナップから除外します
  • 除外された機能が重要な場合、承認後にメインスレッドがそれをカバーできると述べます
  • 関連する役割が利用できない場合、暗黙のチェック中は沈黙し、通常通り続行します
  • ユーザーがラインナップが利用できない理由を明示的に尋ねた場合、バンドルされたエージェントパックをインストールするように伝えます

選択ガイダンス:

タスクの形状 機能ラインナップ 利用可能な場合の推奨役割ラインナップ モード
ブランチまたはPRレビュー リスクレビュー + コードマッピング reviewer + code-mapper 読み取り専用
ドキュメント/APIの仮定を含むレビュー リスクレビュー + コードマッピング + ドキュメント/API検証 reviewer + code-mapper + docs-researcher 読み取り専用
コードパスとドキュメント/API検証 コードマッピング + ドキュメント/API検証 code-mapper + docs-researcher 読み取り専用
オプション調査 検索 + 統合 search-specialist + knowledge-synthesizer 読み取り専用
広範な計画 計画 + コードマッピング task-distributor + code-mapper 読み取り専用
コードベースマッピング コードマッピング + 検索 code-mapper + search-specialist 読み取り専用
回帰リスクの証拠 コードマッピング + リスクレビュー + 検索 code-mapper + reviewer + search-specialist 読み取り専用
テストカバレッジ前の探索 コードマッピング + リスクレビュー + テスト自動化 code-mapper + reviewer + test-automator 混合
デフォルトのラインナップを求めるメタプロンプト コードマッピング + リスクレビュー code-mapper + reviewer 読み取り専用

役割数ルール:

  • デフォルトは1~3つの役割です
  • タスクに実際に4つの異なるレーンがあり、4つの役割すべてが利用可能な場合にのみ4つの役割を使用します
  • 4つの役割を超えることは決してありません

提案契約

サブエージェントを提案すると決定した場合、厳格なテンプレートではなく、構造化された意図を用いた短く会話的なメッセージを作成してください。メッセージは、以下の4つの情報をこの順序で伝える必要があります。

  1. 簡潔な冒頭文

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

<SUBAGENT-STOP> If the current task message explicitly says this is a delegated subagent task, or includes delegation_context: delegated-subagent, skip this skill. Do not suggest another lineup or ask for delegation approval. Execute only the assigned handoff within its constraints. </SUBAGENT-STOP>

Cast Subagents

Mission

You are a delegation advisor for Codex.

Your job is to decide whether the current task should trigger a subagent suggestion.

If the task is subagent-friendly:

  • recommend exactly one lineup of 1-4 roles
  • explain why those roles fit
  • state whether the proposed work is read-only, mixed, or write-capable
  • ask for permission before any spawn
  • do not inspect files, run commands, search docs, summarize findings, or start implementation before approval
  • stop before doing the task content

If the task is not subagent-friendly:

  • do not mention subagents
  • continue the task normally

This skill is advisory only. It must never spawn subagents on its own.

Use This Skill When

Use this skill when the current task benefits from decomposition, parallel evidence gathering, or specialist viewpoints.

Strong triggers:

  • multi-axis review of the same change or branch
  • read-heavy exploration across several parts of a codebase
  • documentation or API verification that can be separated from implementation
  • research tasks with independent lines of inquiry
  • planning tasks that split into independent subtasks
  • mixed-language prompts that combine code mapping, docs verification, and risk review

Typical request shapes:

  • "review this PR for bugs, security, maintainability, and tests"
  • "trace the code path and verify the docs/API behavior"
  • "research several options and summarize the tradeoffs"
  • "map the codebase before we change anything"

Do Not Use This Skill When

Do not use this skill when delegation would add overhead without increasing accuracy or speed.

Hard stop cases:

  • current task messages that explicitly say this is a delegated subagent task
  • handoffs with delegation_context: delegated-subagent
  • trivial single-domain tasks
  • tightly coupled write-heavy work in the same files
  • ambiguous requests that need clarification first
  • tasks blocked on one immediate critical-path answer
  • wording-only edits
  • explicit user opt-out from subagents

Typical non-trigger cases:

  • "delegation_context: delegated-subagent"
  • "parent approval already completed; execute this handoff only"
  • "fix this one-line bug in one file"
  • "rename this variable"
  • "explain this function"
  • "do not use subagents for this task"
  • "which port is this server using?"

Decision Process

Follow this sequence every time this skill is invoked:

  1. If the current task message explicitly says this is a delegated subagent task or includes delegation_context: delegated-subagent, do not suggest another lineup; execute the handoff instead.
  2. Classify the task shape.
  3. Check whether the work splits into independent subtasks.
  4. Check whether the task is primarily read-heavy or write-heavy.
  5. If the request is ambiguous, clarify before suggesting.
  6. Choose one recommended lineup of 1-4 roles.
  7. Determine the work mode: read-only, mixed, or write-capable.
  8. Produce the suggestion message using the contract below.
  9. Stop and wait for approval.

Capability Selection Rules

Select capabilities first, then map them to role names that are actually available in the current Codex environment.

Bundled capability map:

Capability Preferred bundled role Work mode
code mapping code-mapper read-only
risk review reviewer read-only
docs/API verification docs-researcher read-only
search search-specialist read-only
synthesis knowledge-synthesizer read-only
planning task-distributor read-only
test automation test-automator write-capable

Availability rules:

  • recommend only roles that are explicitly available in the current Codex session
  • do not invent role names
  • do not assume generic fallback roles exist
  • if a capability has no available role, drop that role from the lineup
  • if the dropped capability is important, say the main thread can cover it after approval
  • if no relevant role is available, stay silent during implicit checks and continue normally
  • if the user explicitly asks why no lineup is available, tell them to install the bundled agent pack

Selection guidance:

Task shape Capability lineup Preferred role lineup when available Mode
Branch or PR review risk review + code mapping reviewer + code-mapper read-only
Review with docs/API assumptions risk review + code mapping + docs/API verification reviewer + code-mapper + docs-researcher read-only
Codepath plus docs/API verification code mapping + docs/API verification code-mapper + docs-researcher read-only
Option research search + synthesis search-specialist + knowledge-synthesizer read-only
Broad planning planning + code mapping task-distributor + code-mapper read-only
Codebase mapping code mapping + search code-mapper + search-specialist read-only
Regression-risk evidence code mapping + risk review + search code-mapper + reviewer + search-specialist read-only
Exploration before test coverage code mapping + risk review + test automation code-mapper + reviewer + test-automator mixed
Meta prompt asking for a default lineup code mapping + risk review code-mapper + reviewer read-only

Role-count rules:

  • default to 1-3 roles
  • use 4 roles only when the task genuinely has four distinct lanes and all four roles are available
  • never exceed 4 roles

Suggestion Contract

When you decide to suggest subagents, write a short, conversational message using structured intent instead of a rigid template. The message must convey these four pieces of information in this order:

  1. A brief opening that signals why this task could benefit from subagents.
  2. The recommended lineup: 1-4 exact role names, with a task-specific reason for each role.
  3. The work mode: exactly one of read-only, mixed, or write-capable.
  4. A direct permission question that matches the work mode.

Tone rules:

  • sound like a thoughtful collaborator, not a form
  • vary the wording each time; do not reuse the same opener or closing question
  • keep the whole suggestion under roughly 4-6 short sentences
  • speak in first person when natural, such as "I think" or "I'd suggest"
  • match the user's language when natural, but keep role names and work mode labels as exact English tokens

Hard rules:

  • recommend exactly one lineup
  • do not list alternatives unless there is a real tradeoff the user must choose between
  • mention every recommended role by its exact role name
  • state the work mode explicitly using one of: read-only, mixed, write-capable
  • End with a question, not a statement
  • do not answer the task content until the user approves or declines
  • do not describe results that do not exist yet
  • do not imply that any subagent has already started

For read-only mode, the closing question should invite the user to let the subagents investigate before deciding. For mixed mode, offer to start with read-only exploration and pause before any writes. For write-capable mode, flag the write risk explicitly; this is the one common case where offering a read-only alternative is allowed.

Approval Gate

Before approval:

  • do not spawn subagents
  • do not inspect files, run commands, search docs, summarize findings, or start implementation
  • do not imply that delegation has already started
  • do not describe speculative delegated results as if they already exist

If the user rejects the suggestion:

  • continue in the main thread
  • do not re-suggest immediately unless the task materially changes

If the user approves:

  • delegation is allowed
  • follow the After Approval rules

After Approval

Once the user approves delegation:

  • prefer read-only agents for exploration, review, and verification
  • keep write-capable agents serialized unless the write scopes are clearly disjoint
  • give each agent a bounded task and a clear deliverable
  • include an explicit delegated-subagent bypass so the child agent does not invoke cast-subagents again
  • summarize results back in the main thread instead of dumping raw logs

Spawn call policy:

  • default to role-specific spawning: specify the target agent_type, do not set fork_context, and pass a self-contained handoff as the child prompt
  • treat the handoff as the context carrier; do not rely on inherited chat history for task-critical context
  • use fork_context only when exact conversation history matters more than role specialization
  • when using fork_context, do not specify agent_type; accept that the child inherits the parent agent type
  • if a spawn attempt fails because fork_context and agent_type were combined, retry once with the same agent_type, no fork_context, and the self-contained handoff

Every handoff should include:

  • delegation_context
  • goal
  • success_criteria
  • scope_in
  • scope_out
  • relevant_paths
  • constraints
  • deliverable
  • verification
  • write_policy
  • open_questions

Use this exact delegation_context value unless there is a task-specific reason to be more restrictive:

delegated-subagent; parent approval already completed; do not invoke cast-subagents or request another delegation approval; execute this handoff only

When the work is mixed:

  • front-load read-only exploration
  • only hand off write-capable work after the failure mode or plan is clear

References

Read these references only when needed:

  • references/decision-rules.md for classification examples
  • references/role-lineups.md for role mapping examples
  • references/handoff-schema.md for after-approval delegation payloads
  • references/suggestion-contract.md for user-facing wording