semantic-compress

Compresses LLM-directed documents by replacing explanations with pointers while preserving constraints via deterministic or validated loops.

30|5|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/bjcoombs/ai-native-toolkit --skill semantic-compress
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: semantic-compress
Source: https://github.com/bjcoombs/ai-native-toolkit/tree/main/skills/semantic-compress
Command: npx skills add https://github.com/bjcoombs/ai-native-toolkit --skill semantic-compress

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill solves the problem of token bloat in LLM-directed documents. It reduces the size of system prompts, instructions, and skill definitions by replacing redundant explanations with precise pointers, ensuring the model remains efficient without losing critical project-specific context.

Core Features & Use Cases

  • Distill Mode: Performs an A/B-validated loop to produce the smallest possible document that maintains identical behavioral output.
  • Local Mode: Executes a rapid core-to-pointer pass for short snippets, replacing standard definitions with concise cues.
  • Use Case: If you have a massive, verbose CLAUDE.md file that is consuming too many tokens, use this skill to distill it into a minimal, behaviorally equivalent version that still enforces all your project rules.

Quick Start

Use the semantic-compress skill to distill the attached CLAUDE.md file into the smallest version that maintains the same behavior.

Frequently Asked Questions about semantic-compress

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I shrink LLM prompts while preserving behavior?▼

To shrink LLM prompts while preserving behavior, replace standard conceptual explanations with minimal pointers and validate the compressed output against a defined transfer set of test cases to ensure identical model behavior.

What is the best way to reduce token bloat in a verbose CLAUDE.md file?▼

The best way to reduce token bloat in a verbose CLAUDE.md file is to use A/B-validated distillation loops that produce the smallest possible document while maintaining identical behavioral output and enforcing all project rules.

How does A/B-validated distillation work for prompt engineering?▼

A/B-validated distillation works by iteratively compressing LLM-directed documents and testing the reduced output against a transfer set of test cases to verify it induces the exact same model behavior as the original.

Do I need test cases to compress system prompts without losing project-specific context?▼

Yes, you need a defined transfer set of test cases to verify that the compressed system prompt induces the same model behavior as the original document and preserves all bespoke project constraints.

Can I do a rapid core-to-pointer pass for short instruction snippets?▼

Yes, you can execute a rapid local mode core-to-pointer pass for short snippets that replaces standard conceptual definitions with concise cues, ensuring your instruction set remains efficient.

What are the limitations of semantic compression for LLM instruction sets?▼

The main limitation is the requirement for a defined transfer set of test cases; without these test cases to verify behavioral equivalence, the compression cannot guarantee the model will adhere to bespoke project constraints.