Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/bjcoombs/ai-native-toolkit/semantic-compressnpx skills add bjcoombs/ai-native-toolkit --skill semantic-compressgit clone --depth 1 https://github.com/bjcoombs/ai-native-toolkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bjcoombs/ai-native-toolkit/semantic-compress)<a href="https://agentmods.dev/skills/bjcoombs/ai-native-toolkit/semantic-compress"><img src="https://agentmods.dev/badge/skills/bjcoombs/ai-native-toolkit/semantic-compress.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00176 | $0.05028 |
| Opus 5 | $0.00088 | $0.02514 |
| Sonnet 5 | $0.00035 | $0.01006 |
| Haiku 4.5 | $0.00018 | $0.00503 |
Grade A, and why
semantic-compress scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Semantic Compress
Make a document written for an LLM reader smaller while preserving what it does. The essence of an LLM-directed document is behavioural, not textual - the behaviour it induces in the reading model across the tasks it handles. Compression splits content into two kinds and treats each correctly:
- Core knowledge - anything in the model's training (named concepts, standard definitions, common-domain background). Replace the explanation with a pointer: the bare concept name or a short cue that activates the right knowledge. A pointer costs a few tokens and reliably switches on the model's existing understanding; a full explanation is wasted tokens, and deleting the concept entirely gambles that it is already active in the model's reasoning - often it is not, and disambiguation suffers.
- Project / bespoke knowledge - anything the model cannot know from training: specific facts, local decisions, constraints, and non-standard twists on a known concept. Keep these explicit and verbatim. The model has no other source for them.
Compression is therefore point at core, spell out bespoke. Pointing is not deletion and it is not full explanation; it is the minimum that both activates the right core knowledge and preserves every bespoke detail.
Mode Selection
This skill operates in one of two modes, selected deterministically:
| Input | Mode | What happens |
|---|---|---|
| Short snippet with an obvious local swap, no behavioural surface | Local | Quick core->pointer pass, no A/B |
| Whole document / skill / system prompt | Distill | Full A/B-validated loop |
Default to distill when:
- The input is a skill, system prompt, or instruction document
- Behaviour preservation matters
- The user asks for "smaller but same behaviour"
Local is permitted only when all hold:
- The input is a short span (< 500 chars)
- There is an obvious single core->pointer swap
- No downstream behaviour depends on it
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/battle-scar-classifier.md 6.8 KB
- references/cognitive-ergonomics.md 5.2 KB
- references/directive-clarity-patterns.md 7.3 KB
- references/directive-clarity-rewrites.md 6.9 KB
- references/distill-loop.md 18 KB
- references/distillation-report-template.md 8.4 KB
- references/transfer-set-design.md 11 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 230 lines · 176 tokens per session scan A 6af22bf230a5
semantic-compress is a skill published in the GitHub repository bjcoombs/ai-native-toolkit (30 stars, last pushed yesterday), licensed Apache-2.0. It adds 176 tokens to every session and 5,028 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
prompt-writing
Create, refine, and optimize high-quality YAML prompts for AI assistants. Use when working with prompt templates, system prompts, agent prompts, or any prompt engineering tasks. Provides structure guidelines, template patterns, and quality standards for YAML-based prompts.
chain-of-thought-prompts
Chain-of-thought and step-by-step reasoning prompts for complex problem solving.
few-shot-example-gen
Few-shot example generation and optimization for improved LLM performance.
llm-classifier
LLM-based zero-shot and few-shot classification for flexible intent detection.
software-ai-integration
Applies production AI integration patterns for chat, structured output, guardrails, provider routing, and AI UX. Use when adding LLM-powered features to an application.
oracle
Designing and evaluating AI/ML systems: prompt engineering, RAG design, LLM application patterns, AI safety, evaluation frameworks, MLOps, cost optimization. Use for AI pipelines or eval harnesses.