primeline-ai/primeline-skills/delegation
Claude Code and agent skill by primeline-ai/primeline-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when facing any non-trivial task to decide whether to handle it yourself or delegate to a subagent. Provides score-based routing, model selection, and structured prompt templates for effective delegation.
Install
npx vskill@latest install primeline-ai/primeline-skills/delegationSKILL.md
Smart Delegation
Route tasks to the right agent at the right model tier. Stop wasting Opus tokens on file searches and Haiku tokens on architecture decisions.
Announce: "Using smart-delegation to route this task."
Quick Start
Before starting any task, score it:
Scoring (add up what applies):
| Factor | Points | |
|---|---|---|
| Touches 3+ files | +2 | |
| Bulk/repetitive operation | +2 | |
| Research or learning task | +2 | |
| Code review | +2 | |
| Exploration or search | +3 | |
| Independent (no shared state) | +2 |
Subtract:
| Factor | Points | |
|---|---|---|
| Contains: production, deploy, secret, password | -10 | |
| User said "show me" or "explain" | -5 |
Score >= 3? Delegate. Move on.
The Full System
Step 1: Score the Task
Run the scoring table above. If the score is negative or zero, do it yourself.
Step 2: Pick the Model
Match complexity to model. Don't overthink this.
| Complexity | Model | Use For | |
|---|---|---|---|
| 1-2 | Haiku | File search, pattern finding, simple lookups | |
| 3-6 | Sonnet | Bug fixes, research, planning, code review | |
| 7+ | Don't delegate | Deep architecture, multi-system reasoning |
Why not delegate 7+? Complex tasks need your full context window. Subagents start fresh with zero context - they'll miss critical connections.
Step 3: Pick the Agent Type
| Task | Agent Type | Why | |
|---|---|---|---|
| Find files, explore code | Explore | Built for fast codebase search | |
| Debug failing tests | debugger | Structured hypothesis testing | |
| Plan implementation | Plan | Architecture-first thinking | |
| Everything else | general-purpose | Full tool access |
Step 4: Write the Prompt
Every delegation prompt needs 6 sections. No exceptions.
Why 6 sections? Subagents have zero context about your project. The prompt IS their entire world. Vague prompts produce vague results.
Step 5: Set Effort Level
| Effort | max_turns | When | |
|---|---|---|---|
| Low | 3 | File search, quick lookups | |
| Medium | 6 | Standard tasks (default) | |
| High | 12 | Thorough review, edge cases | |
| Max | 25 | Security audit, full architecture |
Step 6: Verify the Result
After every delegation, check:
- [ ] Does the result match EXPECTED OUTCOME?
- [ ] Were all MUST DO items addressed?
- [ ] Were all MUST NOT DO items respected?
No verification = task not complete. Trusting without checking is the #1 delegation failure.
When to Use
- Task scores >= 3 on the scoring table
- You're running low on context window (delegation saves ~90% of tokens vs doing it yourself)
- Multiple independent tasks can run in parallel
- The task is well-defined enough to describe in 6 sections
When NOT to Use
- Task involves secrets, credentials, or production systems
- User explicitly wants to see the process ("show me", "walk me through")
- Task requires deep cross-file reasoning with shared state
- You can't clearly define the expected outcome (if you can't describe it, don't delegate it)
Examples
Example 1: Delegating a Code Search
Score: Exploration (+3) + Independent (+2) = 5. Delegate.
Agent: Explore | Model: Haiku | Effort: Low (3 turns)
Example 2: Delegating a Bug Investigation
Score: Exploration (+3) + 3+ files (+2) + Independent (+2) = 7. Delegate.
Agent: debugger | Model: Sonnet | Effort: Medium (6 turns)
Example 3: Parallel Delegation
Three independent tasks? Launch them simultaneously:
All three run in parallel. You get results from all three before deciding next steps.
Anti-Patterns
| Pattern | Problem | Fix | |
|---|---|---|---|
| "Just look into this" | No expected outcome | Define what "done" looks like | |
| Delegating with full context | Agent gets 200K tokens of noise | Give only relevant context | |
| Not verifying results | Agent may hallucinate or miss things | Always run Step 6 | |
| Delegating 7+ complexity | Agent lacks your mental model | Do it yourself | |
| Sequential when parallel works | Wastes time | Launch independent tasks together |
Security Guardrails
Never delegate tasks involving:
- API keys, tokens, passwords, secrets
- Production database operations
- Deployment or release processes
- User data access or PII handling
- Payment or financial operations
These require your direct attention and the user's explicit approval.
With Starter System
If you have the Starter System installed:
- Use
/rememberto log delegation patterns that work well - Check
/context-statsbefore delegating - high context usage makes delegation more valuable - Use
/handoffto pass delegation insights to the next session
With Kairn (Course)
When Kairn is configured, delegation gains:
- Adaptive scoring - learns which tasks delegate well and which don't from your history
- Outcome tracking - records delegation success/failure to refine routing over time
- Cross-session patterns - "Last 5 times you delegated auth reviews to Sonnet, 4 succeeded"
Without Kairn: scoring is manual and each session starts fresh. Still valuable, just not adaptive.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/delegation/SKILL.md
Popularity
- Repository stars
- 1
- Repository forks
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/primeline-ai/primeline-skills/delegation)