delegate
Skill1 starsChanged 14 months agoApache-2.0View on GitHub
Intelligently analyzes tasks and delegates them to the most appropriate AI system when delegation adds value (project, gitignored)
36 other projects use a version of this.
Adopted by
Most recently taken up by
- snjrusmn/multi-model-clitheir own version, first seen Oct 7, 2026
- andreilungeanu/cursor-delegate-mcptheir own version, first seen Oct 5, 2026
- Magnus-Gille/claude-skillstheir own version, first seen Oct 5, 2026
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- ShalomPrinz/go2-dispatchertheir own version, first seen Oct 4, 2026
- mifunedev/skillstheir own version, first seen Oct 3, 2026
Used with
Projects with it also use release.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
Other versions36 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 36
- Encod3d-Sec/TORCH★ 329same name
- prassanna-ravishankar/repowire★ 265same name
- HurricaHjz/second-yourself★ 105same name
- DannyMac180/astrable★ 42same name
- mhlaghari/stuntman★ 14same name
- victor-falcon/skills★ 14same name
- gyroid-eth/orrery-telemetry★ 9same name
- bitflight-devops/hallucination-detector★ 8same name
- Magnus-Gille/claude-skills★ 5same name
- AbdurRafay2004/handoff★ 4same name
26 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- app-runnerSkill
- env-managerSkill
- lexical-recall-guardSkill
- narrative-inventorySkill
- narrative-keywordsSkill
- narrative-mapsSkill
- obsidian-apiSkill
- obsidianSkill
- project-indexerSkill
- skill-api-conversionSkill
- skill-creatorSkill
- skill-distillSkill
- slipbox-integrationSkill
- story-structure-22-step-apiSkill
- story-structure-22-step-distilledSkill
- story-structure-22-stepSkill
- story-structure-7-stepsSkill
- story-structure-crime-distilledSkill
- story-structure-crimeSkill
- story-structure-myth-distilledSkill
- story-structure-mythSkill
- symbol-webSkill
- webapp-testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 23 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
23
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Non-negotiable rule: Every delegation to another AI system MUST be executed inside a tmux session.
- Distinctive: line 21
Enforcement: Before executing ANY delegation command, verify it starts with:
- Very specific: line 26
If you catch yourself about to run a delegation tool directly (e.g., opencode run, gemini -p, codex), STOP and wrap it in tmux first.
- Distinctive: line 57
Only if user explicitly requests a fresh Claude Code session
- Distinctive: line 61
Note: Not suitable for batch automation
- Distinctive: line 78
No stable non-interactive mode
- Distinctive: line 80
Recommendation: Only delegate if you can verify batch mode works
- Distinctive: line 86
Document analysis with visual components
- Distinctive: line 137
Before delegating, verify the tool exists and supports batch mode:
- Distinctive: line 147
If tool isn't available or doesn't support batch mode, inform user and offer alternatives.
- Distinctive: line 215
Verify it started without immediate errors
- Distinctive: line 216
Check if tool is responding
- Distinctive: line 230
Look for shell prompt return
- Distinctive: line 231
Look for "Done", "Completed", or error messages
- Distinctive: line 232
If uncertain, capture full scrollback:
- Distinctive: line 256
DO NOT retry more than once with the same approach
- Distinctive: line 268
DO NOT: Create tmux sessions, invoke other AIs, etc.
- Distinctive: line 281
Verify gemini is available
- Distinctive: line 282
Check if it supports image generation
- Distinctive: line 283
Use tmux to delegate with proper flags
- Distinctive: line 294
No special capabilities needed
- Distinctive: line 313
Efficiency first: Don't delegate trivial tasks
- Distinctive: line 314
Validate before executing: Check tools exist and support needed mode
- Distinctive: line 317
Clean execution: Use correct flags, proper escaping, error handling
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are running the delegation skill. Your job is to analyze tasks and determine if delegation to another AI system would provide value, and if so, delegate appropriately.
MANDATORY: All Delegations Must Use tmux
Non-negotiable rule: Every delegation to another AI system MUST be executed inside a tmux session. This applies to ALL tools (Gemini, OpenCode, Codex, etc.) regardless of whether they have "batch mode" or non-interactive flags.
Why this is mandatory:
- Delegation commands can take 2+ minutes to complete
- Running directly blocks the terminal and wastes context
- User cannot interact with Claude Code while blocked
- Violates the core principle of asynchronous delegation
Enforcement: Before executing ANY delegation command, verify it starts with:
tmux new-session -d -s delegate-[name]If you catch yourself about to run a delegation tool directly (e.g., opencode run, gemini -p, codex), STOP and wrap it in tmux first.
Critical: When NOT to Delegate
DO NOT delegate if any of these apply:
- Simple conversational requests (greetings, questions, explanations)
- Tasks that can be answered immediately without tools
- Trivial tasks that take less effort to do than to delegate
- Tasks where the current AI (Claude Code) is already optimal
- Tasks that don't involve coding, analysis, or content generation
- Single-file reads or simple searches
Examples of tasks to handle directly:
- "say hello" → Just respond "Hello!"
- "what time is it?" → Check and respond directly
- "explain what X does" → Explain directly
- "read file.py" → Use Read tool directly
When Delegation Makes Sense
Delegate when:
- Task requires specialized capabilities not available here
- Task benefits from a different model's strengths
- Task involves substantial work better suited to another system
- User explicitly requests a specific AI system
Available AI Systems
Claude Code (claude-code)
When to delegate:
- RARELY - You ARE Claude Code
- Only if user explicitly requests a fresh Claude Code session
- Complex multi-session workflows where isolation is needed
Invocation: Interactive CLI only Note: Not suitable for batch automation
Codex (codex)
When to delegate:
- Quick code generation when you need fast iteration
- User specifically requests Codex
- Simple scripts/utilities where speed > sophistication
Check availability first:
codex --helpInvocation for batch mode: Currently not reliable for tmux automation due to:
- Interactive approval prompts
- Model availability varies by account
- No stable non-interactive mode
Recommendation: Only delegate if you can verify batch mode works
Gemini (gemini)
When to delegate:
- Tasks requiring current web data/search
- Image generation or multimodal work
- Document analysis with visual components
- User specifically requests Gemini
Check availability:
gemini --helpInvocation for batch mode:
gemini -m gemini-2.5-pro -p "your prompt here"Flags:
-m MODEL: Specify model (gemini-2.5-pro, gemini-2.0-flash-exp)-p PROMPT: Prompt text (required for batch mode)-yor--yolo: Skip confirmations for autonomous operation
OpenCode (opencode)
When to delegate:
- Ultra-fast code generation
- User specifically requests OpenCode/Grok
- Rapid prototyping where speed is critical
Path: /Users/sbb/.opencode/bin/opencode
Check availability:
/Users/sbb/.opencode/bin/opencode --helpImportant: OpenCode expects to work with files/directories, not conversational queries. Only delegate actual coding tasks.
Delegation Process
Step 1: Task Classification
Analyze the task:
- What is the actual request?
- Can I handle this directly right now?
- Does delegation add real value?
- What type of work is required?
Decision tree:
- Is it conversational/trivial? → Handle directly, DO NOT delegate
- Is it a coding task and I'm already optimal? → Handle directly
- Does it need special capabilities (web search, image gen)? → Consider delegation
- Did user request specific AI? → Delegate to that system
Step 2: Verify Tool Availability
Before delegating, verify the tool exists and supports batch mode:
# Check if tool exists
command -v gemini >/dev/null 2>&1 && echo "Available" || echo "Not found"
# Check help/usage
gemini --helpIf tool isn't available or doesn't support batch mode, inform user and offer alternatives.
Step 3: Validate Task Suitability
For each AI system, verify the task type matches:
- Gemini: Has
-pflag for prompts, supports-yfor auto-approval - OpenCode: Expects directory/file context, not conversational
- Codex: May require interactive mode, check before delegating
Step 4: Execute Delegation (if appropriate)
CRITICAL RULE: ALL DELEGATIONS MUST USE TMUX - NO EXCEPTIONS
Delegation commands can take minutes to complete. Running them directly blocks the terminal and violates the core purpose of delegation. ALWAYS use tmux, even if the tool has a "batch mode" flag.
Standard tmux delegation pattern:
# 1. Create descriptive tmux session
tmux new-session -d -s delegate-[descriptive-name]
# 2. Send command to session
tmux send-keys -t delegate-[name] 'COMMAND_HERE' C-m
# 3. Wait briefly for startup
sleep 3
# 4. Check initial output for errors
tmux capture-pane -t delegate-[name] -p -S -50
# 5. Poll periodically until complete
# Then capture full outputPer-tool delegation commands:
Gemini:
tmux new-session -d -s delegate-gemini
tmux send-keys -t delegate-gemini 'gemini -m gemini-2.5-pro -y -p "task description"' C-m
sleep 3
tmux capture-pane -t delegate-gemini -p -S -50OpenCode:
tmux new-session -d -s delegate-opencode
tmux send-keys -t delegate-opencode 'cd /path/to/project && /Users/sbb/.opencode/bin/opencode run "task description"' C-m
sleep 3
tmux capture-pane -t delegate-opencode -p -S -50
# Note: OpenCode can take 2+ minutes, check periodicallyCodex:
tmux new-session -d -s delegate-codex
tmux send-keys -t delegate-codex 'cd /path/to/project && codex "task description"' C-m
sleep 3
tmux capture-pane -t delegate-codex -p -S -50Step 5: Monitor and Report
After launching in tmux, you must monitor the delegation:
- Initial check (after 3-5 seconds):
tmux capture-pane -t delegate-[name] -p -S -50- Verify it started without immediate errors
- Check if tool is responding
- Periodic polling (every 10-15 seconds):
# Check if still running tmux list-panes -t delegate-[name] -F "#{pane_pid}" 2>/dev/null # Capture recent output tmux capture-pane -t delegate-[name] -p -S -100- For quick tasks (Gemini): Poll 2-3 times
- For long tasks (OpenCode): Poll 5-10 times or until completion indicators appear
- Completion detection:
- Look for shell prompt return
- Look for "Done", "Completed", or error messages
- If uncertain, capture full scrollback:
tmux capture-pane -t delegate-[name] -p -S -10000
- Report to user:
- Session name for manual inspection:
delegate-[name] - Summary of what was accomplished
- Any errors or issues encountered
- Command to attach:
tmux attach -t delegate-[name]
- Session name for manual inspection:
DO NOT:
- Assume completion without checking output
- Kill sessions immediately (let user inspect if needed)
- Report success if errors occurred
Error Handling
If delegation fails:
- Capture the error message
- Determine if it's a:
- Tool availability issue → Inform user, suggest alternatives
- Syntax/flag issue → Try corrected syntax once
- Task unsuitability issue → Handle directly instead
- DO NOT retry more than once with the same approach
- Fall back to handling directly if delegation isn't working
Examples
Example 1: Trivial Task (Do NOT Delegate)
Task: "say hello"
Analysis: This is trivial conversational response.
Action: Respond directly with "Hello!"
DO NOT: Create tmux sessions, invoke other AIs, etc.
Example 2: Image Generation (Delegate to Gemini)
Task: "Generate an image of a sunset over mountains"
Analysis:
- Requires image generation capability
- Gemini supports this, Claude Code doesn't
- Clear value in delegation
Action:
- Verify gemini is available
- Check if it supports image generation
- Use tmux to delegate with proper flags
- Return result to user
Example 3: Code Refactoring (Handle Directly)
Task: "Refactor this component to use hooks"
Analysis:
- This is a coding task
- Claude Code (me) is excellent at this
- No special capabilities needed
- Delegation adds no value
Action: Handle directly using Edit/Read tools
Example 4: Web Research (Delegate to Gemini)
Task: "What are the latest features in React 19?"
Analysis:
- Requires current web data
- Gemini has web search capability
- Claude Code has knowledge cutoff
Action: Delegate to Gemini with web search enabled
Key Principles
- Efficiency first: Don't delegate trivial tasks
- Validate before executing: Check tools exist and support needed mode
- Fail fast: One retry max, then fall back
- User transparency: Explain why delegating or not delegating
- Clean execution: Use correct flags, proper escaping, error handling
- Know your limits: Be honest when you're the best tool for the job
Cleanup
After delegation completes:
# Kill session when done
tmux kill-session -t delegate-[name]Or inform user how to access session:
# User can attach to see full interaction
tmux attach -t delegate-[name]Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

