fork-context-decision
Decide how much parent context to include in a sub-agent's `prompt` before spawning it. Pick "all / N turns / brief only" explicitly, not by accident. USE…
by MiniMax-AI★ 30 GitHub stars
Install fork-context-decision in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Fork Context Decision
How much parent context to pass to a sub-agent is the single largest cost lever in multi-agent work. Too much and you double the model's context; too little and the sub-agent cannot do its job because it cannot see what came before. Pick wrong either way, the work slows down or silently fails.
This Skill codifies the decision so the agent makes it explicitly, not by accident.
The hard fact about mcode 0.2.4
The mcode 0.2.4 task tool has no parameter for context sharing. The
canonical schema is:
task(
description: string, // 3-5 word label, required
prompt: string, // the task itself, required
agent_name: string, // "explore" | "worker" | "verifier", required
run_in_background?: boolean // optional
)
agent_name is accepted as a runtime alias (the normaliser at cli.js:j6c converts
it to subagent_type) but the canonical form is agent_name. There is no
history=, no fork_turns=, no context_size= — the calling agent has full
control of what the sub-agent sees by writing it into the prompt string. So
the 3 fork modes (all / N / none) become a prompt content decision, not a
parameter.
mcode 0.2.4 sub-agent types
The mcode 0.2.4 task tool accepts three sub-agent types as the value of
agent_name=. This plugin package ships NO sub-agent manifests; the
assets/agents/<name>/agent.md layout referenced in the table below is
the mcode 0.2.4 host install's on-disk layout (verified on the
maintainer's install; may vary across installs and platforms and is
not part of the mcode 0.2.4 public runtime contract). The Skills in
this plugin rely on the agent_name parameter for sub-agent selection,
NOT on any on-disk manifest lookup from this plugin's package.
agent_name |
Tools | Use when |
|---|---|---|
explore |
read, grep, glob, web_fetch |
Read-only investigation; cannot write or run commands. |
worker |
read, write, edit, bash, grep, glob, todowrite, web_fetch, website_deploy |
Implementation; full read/write/run. |
verifier |
read, grep, glob, bash, web_fetch |
Has bash but no write / edit / website_deploy: can run checks, cannot modify. |
mavis is the root agent (different layout: modes/, skills/,
persona files). It is not an agent_name value; the calling session
already is mavis. The v0.2.0 list that included mavis as a sub-agent
option is removed.
When to use
Activate when any of these is true:
- You are about to call
task(or any sub-agent spawn) to hand off a sub-task. - You are designing a multi-agent flow (
parallel-fanout,delegate-with-context). - A previous sub-agent failed and you are debugging whether the cause was over- or under-forking.
- You are about to spawn a sub-agent and feel unsure whether to pass context or not.
When NOT to use
- The sub-agent tool does not accept any context / fork parameter (then the decision is forced; skip).
- The sub-task is so trivial that the cost difference is noise (a one-line
read). - You have already decided "no context" (no decision to make).
The decision
Three choices, ordered by cost. Each is implemented by what you write into
the prompt field.
| Choice | What the sub-agent sees (in prompt) |
Use when |
|---|---|---|
all |
The full parent conversation history, inlined or attached. | Sub-agent must reason about a prior decision, debug an earlier failure, or reuse a result the parent has already computed. |
N (integer) |
The last N turns, inlined. | Sub-agent needs recent context but not the full history. |
none (or 0 / brief) |
Only the brief you write inline. | Sub-task is self-contained; the brief is enough. |
Pseudo-cost table
| Choice | Token cost | Sub-agent accuracy on context-dependent tasks | Sub-agent accuracy on self-contained tasks |
|---|---|---|---|
all |
100% | high | low (distracted by noise) |
N |
moderate | high (if N is enough) | high |
none |
minimal | low | high (focused) |
Process
- Classify the sub-task. Does it need to see any prior turn?
- If yes: choose
allorN. - If no: choose
noneand write a self-contained brief.
- If yes: choose
- If you chose
N: pick the smallest N that still works.- Start at 3. If the sub-agent asks for more context, bump to 5, then 10, then
all.
- Start at 3. If the sub-agent asks for more context, bump to 5, then 10, then
- Build the
promptfor the chosen level:all→ concatenate the entire prior conversation, then append the brief.N→ concatenate the last N turns verbatim, then append the brief.none→ just the brief, no prior content.
- Document the choice in the brief:
Context level: <all | N | none>Reason: <one sentence>
- If the sub-agent fails, retry with the next higher N before changing anything
else. A
nonethat failed is almost always a brief problem, not a context problem — but tryN=3first because the cost is
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the fork-context-decision skill do?
Decide how much parent context to include in a sub-agent's `prompt` before spawning it. Pick "all / N turns / brief only" explicitly, not by accident. USE WHEN: about to call `task()` to hand off work, designing a multi-agent flow, sub-agent failed and debugging whether cause was over- or under-forking, user said "give it the full history" / "no history" / "just the brief" / "don't carry context" / "深度 fork" / "不要带 context". TRIGGER PHRASES: "fork 深度", "give it the full history", "深 fork", "no history", "just the brief", "不要带 context", "fork 0", "fork all", "完全独立会话", "轻量 context". SKIP WHEN: sub-task is trivial (one-line read), you have already decided "no context" (no decision to make).
How do I install the fork-context-decision skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the fork-context-decision skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…