delegation-templates
Skill4 starsChanged 10 months agoMITView on GitHub
Context templates and examples for Main Orchestrator agent delegation. Standard delegation template, good/bad examples. Use when delegating tasks to specialized agents.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- Claude Agent SDK PatternsSkill
- deploymentSkill
- frontend-patternsSkill
- Google ADK PatternsSkill
- LLM Evaluation PatternsSkill
- LLM Observability PatternsSkill
- memory-workflowSkill
- orchestrator-workflowsSkill
- react-native-best-practicesSkill
- skill-creatorSkill
- testing-strategySkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
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 170
No background (why we need this)
- Distinctive: line 171
No mention of memory file or docs
- Very specific: line 182
Problem: Must use "Solution Architect" (capital letters + spaces)
- Distinctive: line 191
Problem: Should start with "Kai, I need you to build..."
- Distinctive: line 236
Vera: Add regression test
- Distinctive: line 243
Vera: Write failing test (RED)
- Distinctive: line 246
Vera: Add edge cases
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Delegation Templates
Templates and examples for delegating to specialized agents.
For mandatory protocol, see: .claude/rules/agent-delegation.md
Standard Delegation Template
[Nickname], I need your [specific expertise] on [topic].
BACKGROUND CONTEXT:
[Explain what led to this task - the agent cannot see conversation history]
- What problem are we solving?
- Why is this needed now?
- What decisions have already been made?
MEMORY & KNOWLEDGE:
1. Read your memory file (.claude/memory/memory-[agent-name].md) for project context
2. Load these docs for detailed specs:
- [doc1]: [what it contains]
- [doc2]: [what it contains]
3. These skills may be relevant:
- [skill1]: [what patterns it has]
- [skill2]: [what patterns it has]
TASK:
[Clear, specific task with numbered steps if applicable]
1. [Step 1]
2. [Step 2]
3. [Step 3]
DELIVERABLES:
- [Expected output 1]
- [Expected output 2]
CONSTRAINTS:
- [Any limitations, requirements, or must-follow patterns]
MEMORY UPDATE:
After completing the task, update your memory file with:
- Status/outcome
- Brief rationale for key decisions
- Lessons learned (using STAR format for bugs/issues)Good Example
Task(
subagent_type="Solution Architect",
prompt="""
Sage, I need your architecture expertise on testing infrastructure.
BACKGROUND CONTEXT:
The user wants production-ready testing for the backend before deployment.
We currently have 103 tests with 76% coverage, but no CI/CD pipeline.
A security audit identified vulnerabilities, highlighting the need for
robust testing before production.
MEMORY & KNOWLEDGE:
1. Read your memory file (.claude/memory/memory-solution-architect.md)
2. Load these docs for detailed specs:
- docs/current/PHASE_2_PLAN.md: Track A2 - Testing Infrastructure details
- docs/reference/ARCHITECTURE_DECISION_SUMMARY.md: Existing ADRs
3. These skills may be relevant:
- testing-strategy: Unit, integration, E2E testing patterns
- gcp-deployment: CI/CD options (GitHub Actions vs Cloud Build)
TASK:
Design a comprehensive testing architecture for our FastAPI + Google ADK backend:
1. Choose CI/CD platform (GitHub Actions vs Cloud Build) with rationale
2. Recommend integration testing approach (GCS emulator vs real bucket)
3. Define performance testing strategy (tools, targets)
4. Draft ADRs for key architectural decisions
5. Create implementation roadmap
DELIVERABLES:
- Testing architecture recommendation (written)
- ADR drafts for major decisions
- Phased implementation roadmap
CONSTRAINTS:
- Must use GCP Europe regions (europe-west1/west3)
- Follow existing project patterns (see PROJECT_GUIDELINES.md)
- Target: >70% coverage, all critical paths tested
MEMORY UPDATE:
After completing the task, update your memory file with:
- Testing architecture decision and brief rationale
- Link to ADRs created
- Lessons learned about testing ADK-based applications
"""
)Outcome-Focused Delegation (CRITICAL)
You define WHAT. Specialists decide HOW.
✅ Good: Outcome-Focused
TASK:
Implement session persistence for chat history.
1. Store conversation messages persistently
2. Allow users to retrieve their chat history
3. Handle session expiry gracefully
CONSTRAINTS:
- Use GCS for storage (existing bucket: your-project-sessions)
- Follow existing service patterns in backend/services/The specialist decides:
- File structure and modularization
- Specific function signatures
- Error handling approach
- Where code belongs
❌ Bad: Over-Prescriptive
TASK:
1. Add a get_messages function to main.py at line 200
2. Function should take session_id: str parameter
3. Query GCS bucket with prefix f"sessions/{session_id}"
4. Return List[Message] with timestamp, role, content
5. Add the endpoint at /sessions/{id}/messagesProblems:
- Dictates file placement (→ bloated main.py)
- Specifies implementation details
- Removes specialist judgment
- Misses opportunities for better patterns
The Difference
| Aspect | Outcome-Focused | Over-Prescriptive |
| File structure | "Follow existing patterns" | "Put in main.py line 200" |
| Function design | "Store/retrieve messages" | "Function X with params Y, Z" |
| Implementation | Agent's expertise | Your guesses |
| Result | Clean, modular code | Bloated, unidiomatic code |
Bad Examples
Missing Context
Task(
subagent_type="Solution Architect",
prompt="Design the testing architecture"
)Problems:
- No background (why we need this)
- No mention of memory file or docs
- No deliverables specified
- Agent works in a vacuum
Wrong subagent_type
Task(
subagent_type="solution-architect", # Wrong!
prompt="..."
)Problem: Must use "Solution Architect" (capital letters + spaces)
No Nickname
Task(
subagent_type="AI Engineer",
prompt="Build a poem generator agent..."
)Problem: Should start with "Kai, I need you to build..."
Imperative Skill Language
prompt="""
...
3. Invoke the google-adk-patterns skill for patterns
...
"""Better:
prompt="""
...
3. The google-adk-patterns skill has relevant agent setup patterns
...
"""Agent Quick Reference
| Nickname | subagent_type | Expertise |
| Scout | General Worker | Research, exploration, file ops, context gathering |
| Sage | Solution Architect | Architecture, GCP services, ADRs |
| Kai | AI Engineer | Python, FastAPI, Google ADK, data layer |
| Iris | Frontend Engineer | React, TypeScript, Vite, accessibility |
| Devo | DevOps Engineer | Cloud Run, Terraform, CI/CD |
| Vera | QA Tester | pytest, Playwright, AI testing |
| Luna | Frontend QA Specialist | Vitest, a11y testing, visual regression |
Common Delegation Scenarios
Building a New Feature
- Sage: Design architecture
- Kai: Implement backend/API
- Iris: Build frontend (if needed)
- Vera: Write tests
Fixing a Bug
- Kai/Iris: Investigate and fix
- Vera: Add regression test
Infrastructure Setup
- Sage: Architecture decision
- Devo: Terraform + deployment
Test-Driven Development
- Vera: Write failing test (RED)
- Kai: Implement to pass (GREEN)
- Kai: Refactor (REFACTOR)
- Vera: Add edge cases
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.

