core-context-compressor

core-context-compressor is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 72 tokens per session (5,694 once invoked), scanned A, original, MIT.

A context-compression guide that turns a long coding-agent conversation into a shorter summary while preserving decisions, file changes, settings, and open questions. A context window is the amount of conversation an AI can use at once.

In plain words
What is it for?
Use it to summarize an ongoing coding session, reduce context size, and prepare a compact handoff for continued work.
Why use it?
It keeps important project information usable when a conversation becomes too long for the agent to handle comfortably.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Good fit Use it to summarize an ongoing coding session, reduce context size, and prepare a compact handoff for continued work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/context-compressor
Install

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.

Any agent
npx skills add j4flmao/agent-skills --skill context-compressor
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for core-context-compressor

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/context-compressor.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/context-compressor)
Your own site
<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>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,694 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash da79d45f179d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

skills/core/context-compressor/SKILL.md · 501 lines

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.

Read the full file on GitHub · 501 lines

Files

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.

Changes

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.

  1. 4d ago First seen · 501 lines · 72 tokens per session scan A da79d45f179d

Subscribe to this mod's changes

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.

Related

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.

martineserios/thebrana · 32 tokens

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…

ariffazil/AAA · 67 tokens

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.

karthikrshet/aiskills · 60 tokens

pto-planning

Check an employee's PTO balance and policy, then plan or submit a time-off request.

awslabs/agentcore-samples · 21 tokens

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…

ooples/token-optimizer-mcp · 71 tokens

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".

diillson/chatcli · 71 tokens