blackbelttechnology/pi-agent-dashboard/skill-to-subagent
Claude Code and agent skill by blackbelttechnology/pi-agent-dashboard
- community
Checking that the SKILL.md file is still in the repository.
Turn an existing pi skill into an isolated subagent and wire it into a project''s implementation pipeline. Decides fitness first, writes the bridge agent, routes the model, tunes context inheritance, and wires a spawn checkpoint. Use on "wrap this skill as a subagent", "turn X into a subagent", "should this be a subagent or a skill", "subagentize this", "add a subagent to the pipeline".
Install
npx vskill@latest install blackbelttechnology/pi-agent-dashboard/skill-to-subagentSKILL.md
The same SKILL.md was published earlier as blackbelttechnology/pi-agent-dashboard/skill-to-subagent.
Skill → Subagent
Overview
A skill is instructions loaded into the main agent's context (progressive disclosure: name+description always present, body on trigger). A subagent is a worker spawned beside the main agent in an isolated context window that returns a distilled report, then burns its context. They are orthogonal.
Converting a skill to a subagent is worth it when the skill's work is read-heavy or write-light, self-contained, and returns a distilled artifact — because running it inline would bloat the parent's context and degrade its reasoning. It is harmful when the work is coherence-critical (decisions later steps depend on), because a subagent only sees a compressed snapshot and can make conflicting assumptions.
This skill is the repeatable procedure for that conversion, plus wiring the result into a project's implementation loop. It is tech-stack independent (the target project can be any language) but pi-platform-specific.
When to Use
- You have a skill whose work would bloat the main context if run inline
- A phase of an implementation loop is read-heavy (audit, lookup, summarize) or write-light (docs) and self-contained
- You are designing which parts of a pipeline should run isolated vs inline
- Triggers: "wrap this skill as a subagent", "subagentize this", "should this be a subagent"
When NOT to use:
- Authoring a brand-new skill from scratch →
skill-creator - The work is coherence-critical (the builder/decider, review+fix, anything whose choices later steps depend on) → keep it an inline skill
- A one-shot trivial task where spawn overhead > benefit
Step 1 — DECIDE: subagent or inline skill?
Apply the discriminator first. It is the whole game.
Then confirm fitness — a subagent must clear all of these, or it is negative value:
- Context-cost-if-inline is high — running it inline would meaningfully bloat the parent.
- Clear input→distilled-output contract — you can name the inputs and the ≤2KB output shape.
- Low interactivity — it does not need
ask_userloops mid-task (those belong in the parent). - Self-contained — it does not mutate shared state the parent must then reconcile.
- Clears the token bar — multi-agent runs burn ~15× the tokens of a single chat; the context it saves must exceed the tokens it spends.
If it fails any, keep it an inline skill. Most "writer" and "reviewer" phases fail the coherence test and should stay inline.
Step 2 — BRIDGE: write the thin agent .md
The skill stays the single source of truth. The agent is a thin spawn shell that loads it. Write to <project>/.pi/agents/<Name>.md (project tier) or a package's agents/ dir (shipped tier).
Step 3 — ROUTE: pick the model by FUNCTION, via role alias
Use role aliases, never literal model ids — the agent then tracks the operator's role config and stays portable across machines.
| Function | Role | Why | |
|---|---|---|---|
| Deterministic pipeline / glue / lookup / exploration | @fast | Cheap, fast; cost dominates | |
| Long-context synthesis (transcripts, big docs) | @research | Strong synthesis / long window | |
| Reasoning-heavy analysis (security audit, root-cause) | @research (or a reasoning model role) | Careful step-by-step over code | |
| Map-reduce | chunk workers @fast, merge @compact/@research | Cheap per chunk, strong merge | |
| Mechanical writing (doc rows, merges) | @compact | Cheap-but-capable | |
| Visual / screenshot review | @vision | Multimodal |
Step 4 — TUNE: inherit_context
- `false` + explicit inputs (default, most reliable). The child starts clean; the parent passes every input in the spawn prompt. Dodges the compression-drop trap. Use for self-contained batch/analysis jobs.
- `true` only when the child's judgement genuinely needs the surrounding decision context — and even then, still pass exact paths + intent in the prompt, because the inherited snapshot is compressed and can drop the one detail the specialist needs.
Step 5 — WIRE: spawn checkpoint into the pipeline
pi has no automatic delegation — a subagent runs only on an explicit Agent tool call. Make delegation mechanical by adding a checkpoint table to the project's implementation skill (and/or AGENTS.md): map an observable signal in the diff/task to a spawn, so the main agent reaches for it without needing to remember.
Keep the builder/decider inline in that table's preamble — only read/write-light phases get spawned.
Step 6 — VERIFY
Spawn on a real task and check the output, do not trust it blind.
Pitfalls
- YAML `": "` trap — an unquoted
descriptioncontaining an inner": "(colon-space) parses as a nested mapping and the loader silently drops the agent. Quote the whole value, or reword to remove the": ". - Compression-drop —
inherit_context: truegives a lossy snapshot; never rely on it to carry a specific path/snippet. Pass inputs explicitly. - Fresh ResourceLoader — a spawned subagent re-discovers skills from disk (its own loader), so the wrapped skill must be discoverable on disk, not just loaded in the parent.
- Telephone game — cap output at ≤2KB and cite paths; a subagent that dumps raw files defeats its own purpose.
- Over-privilege — least-privilege
tools; addwrite/editonly if the subagent legitimately emits files. - Isolating coherence — never subagent the builder, the review+fix loop, or any decider; that is the documented multi-agent failure mode.
Verification
- [ ] The discriminator was applied — the phase is genuinely non-coherence-critical
- [ ] The agent
.mdfrontmatter parses (no": "trap);modelis a role alias - [ ]
toolsare least-privilege;inherit_contextmatches the input strategy - [ ] The prompt names every required input and a ≤2KB output contract
- [ ] A spawn checkpoint (signal → spawn) exists in the pipeline so it is reached mechanically
- [ ] A real spawn returned a distilled report, not raw dumps
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 repositoryCheckingpackages/authoring-toolkit/.pi/skills/skill-to-subagent/SKILL.md
Popularity
- Repository stars
- 313
- Repository forks
- 47
- 7-day trend score
- 34
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/blackbelttechnology/pi-agent-dashboard/skill-to-subagent)