本文へスキップ
Skillpedia
エージェント29k · #9774

agent-delegation

できること

ある AIエージェントが別のエージェントに作業を渡すときの、良いプロンプトの書き方の参考資料です。役に立つ作業を得たいマルチエージェントの構成を作ったり動かしたりする人向けです。

使う場面

  • ✓サブエージェントに、調査やコードの作成を頼もうとしているとき。
  • ✓委任された作業が浅く一般的な結果になり、より良いプロンプトがほしいとき。
  • ✓サブエージェントが一人で作業するために、どの詳細が必要かを決めたいとき。

スキルのリンク

https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/agent-delegation/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/agent-delegation/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“この調査をヘルパーのエージェントに渡す前に、何を返してほしいかを説明する明確な指示書を書く手伝いをしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、良い指示書に含まれるもの、たとえば目標、既に分かっていること、作業の範囲、期待される出力を説明します。また、ヘルパーに理解そのものを任せるような曖昧なプロンプトを避けるよう警告します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Delegation prompt reference

Everything below is about writing the prompt. Whether to delegate at all, how a background agent reports back, and the rules for running agents concurrently stay in the Agent tool's description — this reference does not repeat them.

Writing the prompt

Brief the agent like a smart colleague: make the delegated task, boundaries, and expected output explicit. Regular subagents have not seen this conversation; forks inherit all or the selected recent window.

  • Explain what you're trying to accomplish and why.
  • Describe what you've already learned or ruled out.
  • Give enough context about the surrounding problem that the agent can make judgment calls rather than just following a narrow instruction.
  • If you need a short response, say so explicitly.
  • For lookups, provide the exact target. For investigations, provide the actual question rather than an over-prescribed sequence of steps.
  • Provide clear, detailed prompts so the agent can work autonomously and return exactly the information you need.
  • Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent.

Terse command-style prompts produce shallow, generic work.

Never delegate understanding. Do not write prompts like "based on your findings, fix the bug" or "based on the research, implement it." Those phrases push synthesis onto the agent instead of doing it yourself. Write prompts that prove you understood the task: include relevant file paths, constraints, what specifically needs to be learned or changed, and what is out of scope.

A custom subagent's own definition outranks your prompt. When subagent_type names a subagent someone defined, that definition already fixes its scope, its tools and its output contract; your prompt adds task context, not a new contract. Asking one confined to a single file to search the repository does not widen it — the dispatch simply cannot succeed. If the contract is too narrow for what you need, the definition is what has to change, not the prompt.

Writing a fork prompt

With the default full history, the prompt is a directive — what to do, not what the situation is. When fork_turns limits history, include any older context the fork still needs. Be specific about scope: what's in, what's out, what another agent is handling.

Worked example

<example_agent_descriptions> "test-runner": use this agent after you are done writing code to run tests </example_agent_descriptions> <example> user: "Please write a function that checks if a number is prime" assistant: I'm going to use the Write tool to write the following code: <code> function isPrime(n) { if (n <= 1) return false for (let i = 2; i * i <= n; i++) { if (n % i === 0) return false } return true } </code> <commentary> Since a significant piece of code was written and the task was completed, now use the test-runner agent to run the tests </commentary> assistant: Uses the agent tool to launch the test-runner agent </example>
よくある質問

委任のプロンプトには必ず何を含めるべきですか?

目標とその重要性、既に分かっていること、作業の範囲、期待する出力を含めるべきです。

問題全体を丸ごと任せるべきですか?

いいえ。ヘルパーに、まだ渡していない調査結果に基づいてバグを直すよう頼むなど、理解の委任を避けるよう警告しています。

いつ委任するかも決めますか?

いいえ。プロンプトの書き方を扱い、サブエージェントを起動するルールは別の場所で説明されています。

詳細

作者による元の説明

Reference for briefing a subagent or a fork — what to put in the prompt, what not to delegate, and a worked example. Load before writing a delegation prompt; the Agent tool's own description carries the launch rules and the background-agent rules.

repo: QwenLM/qwen-code

人気

GitHubのスター
29k
ランキング
#9774
ライセンス
Apache-2.0
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル