Skip to content

Trim bloated 4,000-token SKILL.md files down to lean instructions without losing accuracy

Stuffing basic Python tutorials and repetitive 'BE CAREFUL!' warnings into SKILL.md wastes context and dilutes real project rules.

Copy the prompt and paste it into the AI assistant you already use.

What to cut immediately from overweight SKILL.md files

  1. 01

    Delete generic explanations the base LLM already knows

    Never spend 600 tokens explaining what REST APIs, Git branches, or Pandas DataFrames are; state only non-obvious domain deltas.

  2. 02

    Keep core SKILL.md under 500 lines (~1,500–2,000 tokens)

    Move rare dialect tables, edge-case schemas, and API reference lists into separate references/*.md files loaded only when needed.

  3. 03

    Replace 20 prose edge-case warnings with 1 validation script

    A 30-line validate_output.py script enforces complex schema rules deterministically using zero prompt tokens.

  4. 04

    Keep YAML frontmatter descriptions crisp (<120 words)

    Frontmatter loads into session startup for every installed skill; bloated descriptions tax every unrelated conversation.

How it works in practice

Ablation compression test

Refactor 4,200-token internal dbt-modeling SKILL.md into 850-token core SKILL.md + 3 on-demand reference files + 1 linter script.

Before vs after benchmark

Monolithic 4,200-tok SKILL.md: 83% pass rate, 29k avg total tokens/task. Lean 850-tok + progressive refs: 90% pass rate (+7%), 14k avg total tokens/task (-52%).

Pruning redundant tutorials didn't just halve token usage—it raised accuracy by 7% because critical naming rules stopped getting buried.

Questions and answers

Why can shortening a SKILL.md actually increase accuracy?

Attention dilution: when 80% of a prompt restates obvious programming basics, models miss the 3 subtle project-specific rules buried in the middle.

How does progressive disclosure work in SKILL.md standards?

Tier 1 loads only ~100 tokens of name+description at startup; Tier 2 loads SKILL.md on trigger; Tier 3 reads references/ files only if required.

Does SkillMarket show exact token counts for every listed SKILL.md?

Yes, every package card displays startup frontmatter tokens, core SKILL.md body tokens, and average full-trajectory token usage.