SkillReducer: Optimizing LLM Agent Skills for Token Efficiency¶
🕒 Published (v1): 2026-03-31 15:57 UTC · Source: Arxiv · link
Ask a follow-up
Open an assistant pre-loaded with this paper's context.
💬 Ask ChatGPT✦ Ask Claude
TL;DR¶
SkillReducer is a two-stage framework that debloats LLM agent skills—pre-packaged instruction sets injected into context windows—by compressing routing descriptions via adversarial delta debugging and restructuring skill bodies via taxonomy-driven progressive disclosure. On 600 skills it achieves 48% description compression and 39% body compression while improving functional quality by 2.8%, confirming a less-is-more effect in context management.
Problem¶
LLM coding agents (Claude Code, Cursor, Windsurf) load "skills" (Markdown instruction sets) into the context window on every invocation. An empirical study of 55,315 public skills reveals systemic bloat: 26.4% of skills have no routing description, >60% of body content is non-actionable (background, examples, templates), and reference-heavy skills can inject tens of thousands of tokens per call. This inflates API costs and dilutes agent attention without improving task performance.
Method¶
SkillReducer operates in two stages, each targeting a distinct structural component of a skill \(s = (s.d, s.b, s.R)\) with total token cost \(\text{Cost}(s) = |s.d| + |s.b| + \sum_{r \in s.R}|r|\).
Stage 1 — Routing Layer Optimization. The description \(s.d\) is segmented into semantic clauses. A simulated routing oracle \(O(d, Q, C) \to \{0,1\}\) is constructed by pairing the target skill against four TF-IDF-similar distractors plus one LLM-generated adversarial "shadow" skill in the same domain. The DDMIN algorithm runs over the clause set in \(O(n \log n)\) oracle calls to find the 1-minimal subset \(U^* \subseteq U\) that preserves routing correctness. Each retained clause is individually paraphrased shorter. Phase 2 then validates the compressed description by deploying it into the real Claude Code CLI and replaying queries; a greedy selective-restore loop (up to 3 steps) recovers any routing regressions before falling back to the original. Skills missing descriptions have them generated from three extracted routing signals (primary capability, trigger condition, unique identifiers).
Stage 2 — Body Restructuring via Progressive Disclosure. Paragraph-level items are classified by an LLM into five types: core rule, background, example, template, redundant. Only core rules populate the always-loaded module \(b^*\); the rest become on-demand reference modules \(R^*\) (e.g., examples.md, background.md). Type-specific compression then applies: core rules are merged and tightened into bullet points; examples are grouped by concept, retaining one representative per concept (60–70% count reduction); background is summarized preserving all factual claims (numbers, thresholds, API endpoints); redundant items are discarded. Cross-file deduplication removes overlap between \(s.b\) and external references \(s.R\), annotating survivors with "when"-clause routing metadata for selective loading. Quality is enforced by a faithfulness check (concept coverage) followed by a task-based evaluation with a self-correcting feedback loop that promotes erroneously deferred items back to core.
Key Contributions¶
- Large-scale empirical study of 55,315 public skills quantifying bimodal description failure and the 60%+ non-actionable body content problem.
- Two-stage SkillReducer framework: delta-debugging description compression (Stage 1) + taxonomy-driven progressive disclosure body restructuring (Stage 2).
- Demonstration of a less-is-more effect: removing non-essential content from longer skills improves functional quality by 2.8% beyond the original.
- Cross-model generalization study across five models from four families (mean retention 0.965) and one independent agent framework.
- SkillsBench evaluation showing 100% pass-rate retention alongside 39% body token reduction.
Results¶
- Description compression: 48% mean token reduction across 600 skills; 100% routing preservation after selective restore.
- Body compression: 39% mean token reduction; 86.0% pass rate on internal task-based evaluation (versus originals); 100% pass rate on SkillsBench.
- Functional quality delta: +2.8% improvement over originals, largest gains on verbose/long skills.
- Cross-model: mean functional retention of 0.965 across five models (four families); qualitative generalization to an independent (non-Claude Code) agent framework.
- Baselines (equivalent token budget): SkillReducer significantly outperforms LLMLingua, direct LLM compression, truncation, and random removal.
- Adversarial oracle ablation: adversarial "shadow" skill addition meaningfully increases oracle difficulty, validating its inclusion.
Limitations¶
- Evaluation is limited to 600 skills plus SkillsBench; the 55,315-skill empirical study is descriptive, not end-to-end optimized.
- The simulated oracle (Phase 1) can be overly optimistic; Phase 2 real-trigger validation is applied to only a sampled subset for description-generation cases, not all.
- Taxonomy classifier relies on an LLM (DeepSeek-V3) with a silhouette score of 0.393—moderate cluster separation—so content-type boundaries are not crisp; a conservative fallback to "core rule" may under-compress.
- Scripts (executable tool-callable code in skills) are out of scope; their token dynamics are unaddressed.
- Cross-file deduplication and reference annotation are only evaluated on the 14.8% of skills that include reference files; cost savings for this subset are reported in aggregate (1.67M tokens across 100 SkillHub skills) rather than per-optimized-skill.
- The self-correcting feedback loop is bounded (finite promote steps), so missed dependencies could in principle remain deferred.
Relevance to Harnesses / Meta-Harnesses¶
SkillReducer directly addresses the prompt-layer substrate of agent harnesses: the skills/instruction sets that harnesses inject into LLM context windows are precisely the artifacts being optimized. For meta-harness designers who compose multiple skills per invocation, the cumulative token cost identified here—and the automated monolithic-to-tiered architecture transformation—is a practical optimization pass applicable as a build-time preprocessing step. The progressive disclosure pattern (always-loaded core + on-demand supplementary modules fetched via read_file) is a formalized, empirically validated instantiation of the layered-context-management architecture that many harness frameworks implement informally. The less-is-more finding has direct implications for harness prompt engineering: verbose system-prompt skill blocks may actively hurt the agents they are meant to guide.