Agent skill

Subagent Brief Discipline

by LichAmnesia in LichAmnesia/lich-skills

Checks every subagent prompt before spawning, swapping pasted files and context for paths and short summaries and trimming the brief, to avoid multiplied token cost.

MITAuto-check passedAgent Workflows

Install Subagent Brief Discipline

skills CLI
$ npx skills add LichAmnesia/lich-skills --skill subagent-brief -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LichAmnesia/lich-skills subagent-brief --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/subagent-brief .claude/skills/subagent-brief && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
subagent-brief
GitHub stars
234
Token cost
~1.6k tokens
SKILL.md length
787 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Checks every subagent prompt before spawning, swapping pasted files and context for paths and short summaries and trimming the brief, to avoid multiplied token cost.

  • Works in 5 steps: Strip your own context → Replace files with paths → Replace context with summaries → …
  • About to spawn several parallel subagents on similar tasks
  • SKILL.md covers When to Use, When NOT to Use, The Discipline and The Brief Template, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill is a pre-flight checklist for the moment an agent is about to call the Task or Agent tool. Its premise, stated in the skill, is that subagents do not share a prompt prefix cache, so each one re-tokenizes everything it is handed and a fan-out of many agents with large context multiplies token cost. The burden of compression therefore falls on the orchestrating agent.

The checklist applies its rules in order to each subagent: strip your own conversation history and reasoning trail, replace file contents with absolute paths the subagent can read itself, replace big context dumps with a summary of one to three sentences, and compress the final brief to 200 words or fewer. It applies when a prompt is growing long, a full repo dump or PRD is about to be embedded, or many parallel subagents will do similar work on a metered plan. It does not apply to one-line tasks, jobs that truly need the full document, or briefs the user already compressed.

When your agent uses it

  • About to spawn several parallel subagents on similar tasks
  • A subagent prompt is growing past a couple of hundred words
  • Preparing to paste a long file or a full PRD into a subagent prompt
  • Working on a metered plan where token usage matters

Example prompts

  • “Fan out five subagents to review these modules, but keep each brief short.”
  • “Before spawning a subagent for the migration audit, compress the prompt and pass file paths instead of contents.”
  • “Spawn parallel agents to summarize the docs folder without pasting the files into their prompts.”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Strip your own context
  2. Replace files with paths
  3. Replace context with summaries
  4. Compress to ≤200 words
  5. Fan-out check

What it can do on your machine

Read from SKILL.md and the folder at commit ebbc355. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Subagent Brief Discipline loads about 1.6k tokens when it runs. Until then it costs about 157 tokens; SKILL.md has 787 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~157
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LichAmnesia/lich-skills at commit ebbc355, republished under its MIT licence (© LichAmnesia). 787 words, ~1,564 tokens.

Download SKILL.mdSave it as .claude/skills/subagent-brief/SKILL.md (or your agent's skills folder).
name
subagent-brief
description
Use BEFORE invoking the Task or Agent tool to spawn a subagent. Anthropic does NOT share prefix cache across subagents — every subagent cold-starts and re-tokenizes its full prompt (system prompt + tool definitions + the context you handed it). Spawning N subagents with full context = N× token cost; a single fan-out can burn an entire Max-plan day. This skill enforces a pre-flight discipline: compress every subagent prompt into a ≤200-word brief before spawning. Triggers when the agent is about to call Task / Agent tool, especially with long files, full repo dumps, or N parallel subagents on similar work.

Subagent Brief Discipline

Pre-flight checklist for spawning subagents in Claude Code. The single most expensive mistake in multi-agent workflows is treating subagents as free threads. They are not. Each subagent is an independent LLM call that re-tokenizes the entire prompt you hand it.

There is no prefix sharing across subagents in Anthropic's serving stack today. The multi-agent topology is a known optimization opportunity (see arXiv 2604.25899 Pythia: Predictability-Driven Agent-Native LLM Serving, 2026-04) but has not yet shipped in production. Until it does, the burden of compression falls on the orchestrating agent.

The math: 20 subagents × 50K shared context = ~1M tokens per fan-out. One careless Task call exhausts a Max-plan daily quota.

When to Use

  • About to invoke the Task tool or any subagent-spawning tool
  • About to fan out N parallel subagents on similar tasks
  • Subagent prompt is shaping up longer than ~200 words
  • About to embed a long file, full repo dump, or full PRD in a subagent prompt
  • The user is on a metered plan (Max / Pro / API) and has not signaled "burn budget"

When NOT to Use

  • Spawning a single subagent with a one-line task ("read X and summarize")
  • The subagent genuinely needs the full document (translation, full audit, line-by-line review)
  • Throwaway exploration where token cost truly does not matter
  • The orchestrator already received a compressed brief from the user — pass it through, do not re-compress

The Discipline

For every subagent you are about to spawn, apply these five rules in order.

1. Strip your own context

The subagent gets its own system prompt, its own tool list, and its own task framing automatically. Do not paste your own conversation history, your TODO list, or your reasoning trail into the subagent prompt unless the subagent literally needs them to do its job.

2. Replace files with paths
BAD:  Here is the full content of foo.py: <800 lines>
GOOD: Read /abs/path/to/foo.py and report the public API.

The subagent has Read access. One Read call is cheaper than re-tokenizing 800 lines on every spawn.

3. Replace context with summaries
BAD:  <entire 50K context window dump> — now look for X
GOOD: Project context: <3-line summary>. Look for X in <specific path>.

If you genuinely synthesized something useful from your context, summarize it in 1-3 sentences and pass that summary. Never paste the raw window.

4. Compress to ≤200 words

The brief should fit in a tweet-length window. If it does not, you are either dumping context the subagent can fetch itself, or handing over a task too large for one subagent — split it.

5. Fan-out check

Before spawning N parallel subagents, ask: do they all share the same long context? If yes, you are about to multiply cost by N. Either:

  • Spawn 1 subagent that handles all N items sequentially, or
  • Pre-compute a shared brief once and hand each subagent only the delta (the per-item task), not the shared context.

The Brief Template

ROLE:    <one line — what this subagent is>
GOAL:    <one line — what it should produce>
INPUTS:
  - <path or 1-line summary, never raw content>
  - <path or 1-line summary>
CONSTRAINTS:
  - <output format, what NOT to do>
RETURN:  <one line — what to report back>

Total ≤ 200 words. If it does not fit, the task is too large for one subagent. Split it.

Show full SKILL.md (326 more words)Show less

Rationalizations to Reject

ExcuseReality
"Faster to just paste the whole file."Faster for you. The subagent re-tokenizes 800 lines on every spawn.
"Parallelism will be 5× faster."5× faster wall-clock, 5× more tokens — and Max plan caps are daily, not hourly. The hourly speedup costs you the rest of the day.
"The subagent needs context."It needs information. A summary is information. The raw window is dump.
"I'll just pass the whole repo, it's small.""Small" repos compound across 10 subagents into a Max-plan kill.
"I don't have time to summarize."Summarizing forces you to clarify what the subagent should do — which is 80% of why subagents fail anyway.
"The user wanted parallel."The user wanted fast. Token-budget parallel ≠ wall-clock parallel. Default to sequential unless tasks are genuinely independent.

After the Brief

Spawn the subagent. Then evaluate:

  • Returned with hallucinated assumptions → brief was too vague. Add a constraint and re-spawn (rare).
  • Asked for more context → brief was too thin. Add the missing fact and re-spawn (rare).
  • Succeeded → brief was right-sized. This is the common case if you followed the five rules.

Most "subagent failures" are brief failures, not subagent failures.

Red Flags in Your Own Output

If you catch yourself writing any of these in a subagent prompt, stop and re-compress:

  • Three or more paragraphs of background before the actual task
  • Verbatim file contents longer than 20 lines
  • The phrase "for context, here is..."
  • Lists of things the subagent "might want to know"
  • More than one task per subagent (split into separate Task calls instead)

Why This Skill Exists

Multi-agent serving is a 2026 research topic, not a shipped feature. arXiv 2604.25899 (Pythia, 2026-04) demonstrates that exposing multi-agent topology to the serving layer can recover 3-5× of wasted tokens via prefix sharing — but no production LLM provider has shipped this yet. Anthropic, OpenAI, Codex: every subagent today is a cold-start, full-prefix re-tokenization.

Until that changes, the brief is the only knob you have. Use it.

© LichAmnesia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/subagent-brief of LichAmnesia/lich-skills.

Open the folder on GitHubat commit ebbc355

Compare with similar skills

Subagent Brief Discipline next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Subagent Brief Discipline compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Subagent Brief Discipline this skillLichAmnesia/lich-skills234—~1.6kAutomated safety check: PassMIT
Code Context Slicingtrailofbits/skills7.4k—~2.1kAutomated safety check: PassCC-BY-SA-4.0
Claude Code Masteryborghei/Claude-Skills881—~1.9kAutomated safety check: PassMIT
Context DoctorjzOcb/context-doctor119—~642Automated safety check: PassMIT
Caveman Learn Token FixesJuliusBrussee/caveman110k—~2.8kAutomated safety check: PassApache-2.0
Fable Foremanolsenbrands/fable-foreman142—~5.2kAutomated safety check: PassMIT

Similar skills

  • Code Context Slicing

    trailofbits/skills

    Official

    Picks a small, graph-based slice of source with Trailmark and hands a focused code task to a smaller or local model without exposing the whole repository.

    7.4k GitHub stars~2.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Claude Code Mastery

    borghei/Claude-Skills

    A skill your agent uses when the user asks to "optimize CLAUDE.md", "create a new skill", "write a custom agent", "configure hooks", "manage context window", "set up MCP servers", "scaffold a skill…

    881 GitHub stars~1.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Doctor

    jzOcb/context-doctor

    Visualize and diagnose OpenClaw context window usage. An agent skill from jzOcb/context-doctor.

    119 GitHub stars~642 tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed
  • Caveman Learn Token Fixes

    JuliusBrussee/caveman

    Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.

    110k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Fable Foreman

    olsenbrands/fable-foreman

    Turns the lead model into a foreman that plans, routes and verifies while cheaper Claude, Codex or Grok workers do the typing, using a per-machine routing card.

    142 GitHub stars~5.2k tokensUpdated 13 days ago
    Agent WorkflowsAuto-check passed
  • Claudish Usage

    MadAppGang/claudish

    CRITICAL - Guide for using Claudish CLI ONLY through sub-agents to run Claude Code with any AI model (OpenRouter, Gemini, OpenAI, local models).

    1k GitHub stars~9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from LichAmnesia/lich-skills

All 11 skills in this repo
  • Google Analytics 4 Analysis

    LichAmnesia/lich-skills

    Pulls Google Analytics 4 data through the Data API with TypeScript scripts and turns it into a daily SEO report or prioritized traffic and bounce-rate recommendations.

    234 GitHub stars~2k tokensUpdated 4 mo ago
    Auto-check: notes
  • Nano Banana Image Generator

    LichAmnesia/lich-skills

    Generates or edits PNG images with Google's Nano Banana 2 model through a small script, with a choice of 512, 1K, 2K or 4K output.

    234 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check: notes
  • Spec-Driven Development v2

    LichAmnesia/lich-skills

    Organizes long-running agent work into a Project, Sprint and Task hierarchy with per-task state files, isolated worktrees, review loops and script-checked rules.

    234 GitHub stars~3.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Tavily Web Search

    LichAmnesia/lich-skills

    Runs headless web searches and single-page extraction through the Tavily API from a Python script, returning cited, summarized results without a browser.

    234 GitHub stars~1k tokensUpdated 4 mo ago
    Auto-check: notes
  • Build Until Pass Loop

    LichAmnesia/lich-skills

    Drives a failing build, typecheck, lint or test command to a passing exit code through small, one-fix-at-a-time rounds, stopping at a hard attempt cap instead of looping forever.

    234 GitHub stars~2.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Hypothesis-Driven Debugging

    LichAmnesia/lich-skills

    Replaces trial-and-error fixing with an observe, hypothesize, experiment and conclude loop kept in DEBUG.md, where no fix is allowed before evidence supports a cause.

    234 GitHub stars~2.5k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Subagent Brief Discipline

What does Subagent Brief Discipline do?

Checks every subagent prompt before spawning, swapping pasted files and context for paths and short summaries and trimming the brief, to avoid multiplied token cost. This skill is a pre-flight checklist for the moment an agent is about to call the Task or Agent tool. Its premise, stated in the skill, is that subagents do not share a prompt prefix cache, so each one re-tokenizes everything it is handed and a fan-out of many agents with large context multiplies token cost.

When should I use Subagent Brief Discipline?

Subagent Brief Discipline fits situations like: about to spawn several parallel subagents on similar tasks; A subagent prompt is growing past a couple of hundred words; preparing to paste a long file or a full PRD into a subagent prompt; working on a metered plan where token usage matters.

How do I install Subagent Brief Discipline in Claude Code?

Run `npx skills add LichAmnesia/lich-skills --skill subagent-brief -a claude-code`. Or copy the skill folder (skills/subagent-brief in LichAmnesia/lich-skills) into .claude/skills/subagent-brief in your project. Claude Code loads it when a task matches its description.

How do I install Subagent Brief Discipline in Codex?

Run `npx skills add LichAmnesia/lich-skills --skill subagent-brief -a codex`. Or copy the skill folder (skills/subagent-brief in LichAmnesia/lich-skills) into .agents/skills/subagent-brief in your project. Codex loads it when a task matches its description.

Can I use Subagent Brief Discipline in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LichAmnesia/lich-skills --skill subagent-brief -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/subagent-brief, .gemini/skills/subagent-brief, .github/skills/subagent-brief and .opencode/skills/subagent-brief in your project.

What does Subagent Brief Discipline need to run?

SKILL.md names no scripts, command-line tools or credentials: Subagent Brief Discipline is instructions for the agent only.

Does Subagent Brief Discipline access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Subagent Brief Discipline safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Subagent Brief Discipline use?

Subagent Brief Discipline is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Subagent Brief Discipline use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Subagent Brief Discipline?

Skills that share tags, products or a category with Subagent Brief Discipline: Code Context Slicing (trailofbits/skills, 7.4k stars), Claude Code Mastery (borghei/Claude-Skills, 881 stars), Context Doctor (jzOcb/context-doctor, 119 stars) and Caveman Learn Token Fixes (JuliusBrussee/caveman, 110k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Subagent Brief Discipline?

LichAmnesia (a GitHub user) maintains it in LichAmnesia/lich-skills, which has 234 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on June 9, 2026.

Source: LichAmnesia/lich-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.