
Agent Delegation Prompt Guide
Guides the agent to write clear, well-scoped prompts when handing tasks to subagents
- Repository
- QwenLM/qwen-code
- Stars
- 28,880
- Licence
- Apache-2.0
- Files
- 2 files
What it does
This is a reference document that the coding agent loads before it hands a task to a helper agent (a subagent or a forked copy of itself). It tells the agent what a good delegation prompt contains: the goal and why, what has already been ruled out, clear boundaries, the expected output, and whether the helper should write code or only research. It also warns against lazy prompts such as 'based on your findings, fix the bug', and notes that a custom subagent's own definition limits what it can do regardless of the prompt.
Great for
- Developers using Qwen Code who run multiple agents on a larger coding task
- Teams building custom subagent definitions who want consistent delegation behaviour
- Anyone who wants fewer shallow results from delegated agent work
Skip it if
- Simple single-step tasks where delegating adds overhead and no benefit
- Non-developers looking for a standalone tool; it only changes how the agent writes prompts and does nothing on its own
Try asking
- “Break this refactor into parts and hand the test updates to a subagent with clear file boundaries”
- “Delegate a repository search to a helper agent and tell it to report back a short list”
- “Fork the current session to investigate a bug while I keep working on the UI”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the Apache-2.0 licence and an attribution note.
agent-delegation.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip agent-delegation.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip agent-delegation.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Ask for a specific output format or length in the task so the helper's report is easy to use
- State clearly whether the helper should edit code or only read and search
- If a custom subagent cannot do the job, change its definition rather than overloading the prompt
What's inside
- SKILL.md
- SKILL.test.ts
Redistributed unmodified from QwenLM/qwen-code under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.