AI Skill Report Card

Reducing Skill Token Bloat

Analyzes and restructures LLM agent skill files (SKILL.md-style documents) to minimize token consumption while preserving routing accuracy and functional quality. Use when a skill description is missing, too short, or overly verbose; when a skill body mixes actionable rules with background/examples/templates that could be deferred via progressive disclosure; or when reference files are bloating context injection size. Applies a two-stage debloating pipeline: delta-debugging-based description compression and taxonomy-driven body restructuring.

A86·Nov 2, 2026·Source: Extension-page

Reducing Skill Token Bloat

Optimizes LLM agent skill files for token efficiency without degrading routing or task performance, based on the SkillReducer methodology (empirically validated on 55,315+ skills: 48% description compression, 39% body compression, +2.8% functional quality).

14 / 15

Given a skill file with a description and body, apply both stages:

Markdown
BEFORE (verbose, 82 tokens): --- description: This skill helps you write, format, and validate JSON schemas for API responses, including generating examples, checking compliance with JSON Schema Draft 7, and providing helpful error messages when validation fails. Use this whenever you need to work with JSON schemas in any context. --- AFTER (1-minimal, 19 tokens): --- description: Validates and generates JSON Schema (Draft 7) for API responses. Use when checking schema compliance or validation errors. ---
Markdown
BEFORE (monolithic body, 3,200 tokens — all loaded every time):
Recommendation▾
Add a counter-example showing a 'bad' restructuring outcome (e.g., over-aggressive compression that breaks routing) for contrast

[core rules mixed with 5 worked examples and background on JSON Schema history]

AFTER (tiered, 420 tokens loaded by default):

[actionable rules only]

For examples and background, see references/examples.md (loaded on demand).

14 / 15

Progress checklist for processing one skill:

  • Stage 0: Tokenize description and body (cl100k_base); flag missing/short descriptions (<20 tokens) and oversized bodies
  • Stage 1: Compress/generate description via delta-debugging against a routing oracle
  • Stage 2a: Classify body paragraphs into taxonomy (core rule / background / example / template / redundant)
  • Stage 2b: Restructure into tiered architecture (core rules inline, rest in on-demand reference files)
  • Validate: faithfulness check + task-based functional test
  • Report: compression ratio, retained pass rate, any regressions

Stage 1 — Description Optimization (Routing Layer)

If description is missing or <20 tokens: Generate one by distilling the skill body into the minimal set of semantic clauses that distinguish this skill from plausible competing skills. A good description states: (a) what domain/task the skill handles, (b) concrete trigger phrases/conditions for invocation. Avoid feature lists, examples, or redundant phrasing.

If description exists: Apply delta-debugging minimization:

  1. Decompose the description into independent semantic clauses (split on commas, "and", enumerated items).
  2. Construct an adversarial oracle: a set of representative user queries this skill SHOULD match, and near-miss queries it should NOT match (from competing/similar skills).
  3. Binary-partition the clause set; test whether each half alone preserves correct routing against the oracle.
  4. Recursively discard clauses that don't affect routing outcomes, keeping only the 1-minimal set — every remaining clause is individually necessary for routing.
  5. Stop when no further clause can be removed without breaking at least one oracle query.

Stage 2 — Body Restructuring (Progressive Disclosure)

  1. Segment the body into paragraph-level items (headers, bullet groups, code blocks treated as atomic units).
  2. Classify each item into one of five categories:
    • core_rule — actionable instruction the agent must follow (ALWAYS keep inline)
    • background — explanation/rationale/history (defer)
    • example — code snippets, I/O pairs, worked demonstrations (defer)
    • template — boilerplate/scaffolding (defer unless directly copy-pasted by agent every time)
    • redundant — duplicates another item (delete)
  3. Cross-validate classifications by re-checking each item's label against its neighbors' labels (catches misclassified transitional content); run up to 2 correction passes.
  4. Restructure:
    • Keep only core_rule items in the main body (always loaded).
    • Move background, example, template items into separate reference files (e.g. references/examples.md, references/background.md), linked from the main body with a one-line pointer ("See references/X.md for Y").
    • Delete redundant items entirely.
  5. Faithfulness check: verify no core rule was dropped and no reference file is orphaned (unreferenced) or unreachable.
  6. Task-based validation: run the skill against representative tasks; if pass rate drops vs. baseline, restore the highest-uncertainty-classification items (self-correcting feedback loop) and re-test.

File Composition Cleanup

If the skill bundles reference files/scripts:

  • Audit total reference token count; if it exceeds ~5-10x the core body size, confirm each reference is reachable via an explicit on-demand load path (not auto-injected).
  • Scripts (executable, not injected as context) are out of scope for token reduction — leave as-is.
Recommendation▾
Include a concrete oracle query set example to illustrate delta-debugging mechanics more tangibly
17 / 20

Example 1 — Missing description: Input: A skill body about generating React component boilerplate with no description field. Output: description: Generates React functional component boilerplate with TypeScript props and hooks. Use when scaffolding new React components or converting class components to functional.

Example 2 — Verbose description minimization: Input: description: This skill is for all things related to database migrations, including creating migration files, running migrations up and down, checking migration status, rolling back failed migrations, and generating migration reports for teams, use this for any Postgres or MySQL related schema change work. Output: description: Creates and runs database migrations (up/down/status/rollback) for Postgres/MySQL. Use for schema change tasks. (Delta-debugging removes "reports for teams" since it didn't affect routing outcomes against the oracle query set.)

Example 3 — Body restructuring: Input: A 4,500-token skill body: 30% core rules, 45% background on why the approach works, 20% examples, 5% redundant repetition of the same warning. Output: Core body reduced to ~1,350 tokens (core rules only + brief pointers); references/background.md (~2,025 tokens) and references/examples.md (~900 tokens) created; redundant warning repetition deleted. Net default-load reduction: ~70%.

Recommendation▾
Trim some overlapping content between Workflow and Best Practices/Pitfalls sections to tighten conciseness further
  • Treat description compression and body restructuring as independent stages — don't conflate routing optimization with content optimization.
  • Always validate against an oracle/task set, never compress blindly on token count alone.
  • Prefer deferring content (progressive disclosure) over deleting it — reversibility matters when functional regressions appear.
  • Re-run cross-validation on classification boundaries; items near category boundaries (e.g., "background that doubles as a rule") cause the most faithfulness errors.
  • When in doubt about whether an item is a core rule, keep it inline — false negatives (dropping a real rule) are more costly than false positives (keeping a borderline background item).
  • Report compression metrics (token reduction %) alongside functional retention (pass rate) — never report one without the other.
  • Test across multiple models/frameworks when possible; optimized skills should generalize, not overfit to one agent's routing quirks.
  • Don't uniformly truncate or randomly remove tokens — this performs far worse than structure-aware classification (confirmed against LLMLingua, truncation, and random-removal baselines).
  • Don't compress descriptions using simple summarization without an oracle — summarization can drop the exact trigger phrase a router depends on.
  • Don't delete examples/background entirely — move them to on-demand references; agents sometimes need this content for edge cases.
  • Don't skip the faithfulness check — a technically "shorter" skill that silently drops a core rule is a regression, not an optimization.
  • Don't assume all skills need restructuring — a short, already-tight skill (mostly core rules) may need no Stage 2 changes.
  • Don't treat scripts the same as body/reference content — they aren't injected as context tokens the same way and shouldn't be subject to the same compression pressure.
0
Grade AAI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
14/15
Workflow
14/15
Examples
17/20
Completeness
19/20
Format
15/15
Conciseness
13/15