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 skills add LuuOW/meridian-mcp --skill context-compactiongit clone --depth 1 https://github.com/LuuOW/meridian-mcpWrote 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/luuow/meridian-mcp/context-compaction)<a href="https://agentmods.dev/skills/luuow/meridian-mcp/context-compaction"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/context-compaction.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.00033 | $0.00546 |
| Opus 5 | $0.00016 | $0.00273 |
| Sonnet 5 | $0.00007 | $0.00109 |
| Haiku 4.5 | $0.00003 | $0.00055 |
Grade A, and why
context-compaction 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 7d 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 — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
context-compaction
Compaction is not summarization for its own sake. It is energy recovery.
The goal is to preserve decision-useful signal while discarding stale context mass.
1) Use When
- a task has shifted phases
- earlier exploration is no longer needed in full
- repeated tool results are crowding out active work
- a worker or route is carrying too much irrelevant history
- token burn is rising faster than useful progress
2) Keep vs Drop
Keep:
- chosen approach
- file paths that still matter
- constraints and assumptions
- exact failures still being debugged
- verification commands and outcomes
Drop:
- dead-end explorations
- duplicate file summaries
- verbose tool output once the conclusion is known
- alternative approaches already rejected
- long prose that can be collapsed into one line
3) Compaction Pattern
Before:
- 8 files explored
- 4 rejected theories
- 3 repeated test outputs
- 1 active fix path
After:
- active fix path
- 2 relevant files
- exact failing test
- 1 sentence on rejected theory only if it prevents rework
4) Phase Boundary Rule
Compact aggressively at:
- research -> implementation
- implementation -> verification
- pre-release handoff
- after a large failed attempt
Do not carry research noise into implementation unless it is still causally relevant.
5) High-Value Compaction Formats
- decision log
- current target files
- active hypothesis
- exact next command
- known no-go paths
6) Anti-Patterns
- compressing away the one error string that matters
- keeping giant excerpts "just in case"
- summarizing every explored file equally
- treating compaction as archival completeness instead of operational focus
7) Checklist
- Removed stale exploration from the active context
- Preserved the chosen path and why
- Kept exact errors and commands still needed for verification
- Dropped duplicate summaries and obsolete alternatives
- Reduced token load without reducing decision quality
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.
- 7d ago First seen · 89 lines · 33 tokens per session scan A 933337b8c86c
context-compaction is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed 3d ago), licensed MIT. It adds 33 tokens to every session and 546 once invoked, about $0.0002 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-31.
Other skills, from other repositories
context-budget
Use when you need to check the current session's context usage and get recommendations for compaction or continuation.
memory-orchestrator
Implementation of the "Five-Layer Memory Reliability Pattern" (arXiv/OpenSpace Inspired). Covers observer-reflector-recovery-watcher-safeguard pipelines for cost-efficient AI agents. This skill implements the project's Memory and Cost Policy.
project-wiki
A system for creating and maintaining a project wiki: a set of organized documents that explain a software project's plans, rules, references, and progress.
mindos-zh
A local knowledge-base assistant for storing and finding decisions, meeting notes, procedures, troubleshooting lessons, and preferences across conversations and coding agents. It works only with the MindOS knowledge base.
mindos
MindOS: local knowledge assistant & shared KB. Keeps decisions, notes, SOPs, debugging lessons, research findings, preferences across sessions/agents. Core: save notes, search KB, organize files, run workflows, review, append CSV, hand off context, distill lessons. NOT for app source or paths outside KB. Triggers…
mindos-max
MindOS: local knowledge assistant & global memory layer. Keeps decisions, notes, SOPs, debugging lessons, architecture choices, research findings, preferences, conversation summaries for all connected agents. PROACTIVE: (1) search MindOS first for past context, (2) offer to save after valuable work, (3) persist key…