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 j4flmao/agent-skills --skill context-compressorgit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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/j4flmao/agent-skills/context-compressor)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/context-compressor"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/context-compressor.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00072 | $0.05694 |
| Opus 5 | $0.00036 | $0.02847 |
| Sonnet 5 | $0.00014 | $0.01139 |
| Haiku 4.5 | $0.00007 | $0.00569 |
Grade A, and why
core-context-compressor 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 4d 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 — 501 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Core Context Compressor
Purpose
Compress long conversation histories into structured, token-efficient summaries for continuing work within context window limits. Extracts decisions, file changes, configuration values, and next steps into bullet-point format optimized for AI agent consumption.
LLMs have finite context windows (~32K-200K tokens). As conversations grow over dozens of exchanges, quality degrades because relevant information is buried. This skill produces a lossy-but-critical compression sacrificing implementation detail while preserving every decision, file change, configuration value, and unresolved question.
Agent Protocol
Trigger
"compress context", "context summary", "token save", "compression", "condense", "summarize conversation", "context budget", "reduce tokens", "context window"
Input Context
- Full conversation history up to this point
- List of files modified with absolute or relative paths and change descriptions
- Key decisions with rationale and alternatives considered and rejected
- Configuration values: env vars, port numbers, URLs, feature flags
- User preferences: code style, naming conventions, formatting rules
- Current task state: what phase is complete, what is in progress
- Blocking issues and unresolved open questions
- Next steps stated or implied at the end of last exchange
Output Artifact
Structured compressed summary with exactly 5 sections: Decisions, Files Changed, Current State, Next Steps, Open Questions. Maximum 50 lines.
Response Format
- Decisions — each bullet contains: decision made, rationale, alternatives considered and rejected
- Files Changed — format:
path/file.ts:startLine-endLine+ brief change description - Current State — exactly one line describing position relative to overall plan
- Next Steps — numbered list ordered by dependency. Each starts with action verb, specific enough to be actionable without additional context
- Open Questions — bullet list of unresolved decisions with what each blocks
- Maximum 50 lines total — hard limit. If exceeded, run compression again on output.
- Compression footer appended as final line
- No preamble. No postamble. No explanations. No filler/hedging/transitions.
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/compression-strategies.md 9.9 KB
- references/context-compressor-advanced.md 4.1 KB
- references/context-compressor-fundamentals.md 4.1 KB
- references/context-retrieval.md 1.6 KB
- references/context-window-management.md 7.0 KB
- references/summary-templates.md 4.4 KB
- references/token-management.md 7.7 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.
- 4d ago First seen · 501 lines · 72 tokens per session scan A da79d45f179d
core-context-compressor is a skill published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 5,694 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
sitrep
Situational awareness — where am I, what was I doing, what's next. Context recovery after compression, confusion, or mid-session reorientation.
Context Compression — Log Intelligence
Compress large log files, session traces, and tool outputs while preserving critical coordinates, depth markers, well references, seismic positions, and decision boundaries. Use when log output exceeds context window, when entired terminal histories must be summarized without losing evidence anchors, or before…
session-handoff
Use this skill to compress and serialize the current engineering session state into a structured handoff document. Captures completed work, modified files, key architectural decisions, test status, open blockers, and exact next steps for another agent or future session to resume work without context loss.
pto-planning
Check an employee's PTO balance and policy, then plan or submit a time-off request.
token-optimization
Use the token-optimizer MCP tools to reduce context/token usage when reading, searching, or editing files, or when the context window is filling up. Trigger when reading large files, re-reading files already seen, searching a big/unknown tree, making edits to large files, or when you need to store bulky output…
calendar
Create, list, and manage calendar events / meetings from the terminal using whatever native CLI is installed (gcalcli for Google Calendar, khal for CalDAV, or AppleScript Calendar on macOS). Use when asked to "schedule a meeting", "create an event", "what's on my calendar", "am I free", "book".