compress
/compress
Shrinks a long Claude Code chat into a small digest so the person can type /clear and keep working with far less context. The newest requests stay nearly word for word, each older band is compressed twice as hard, and a pinned ledger keeps the person's rules, decisions, changed files, commits, links and open tasks. A local script does the work with no model call, so compressing costs no tokens. Use when the person asks to compress, shrink, hand off or save the chat or its context, wants to use fewer tokens, or says the chat is long, slow or expensive.
- Author
- Matanza00 ↗
- Repository
- principal-skills ↗
- Licence
- MIT
- Last repository change
- 05.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Shrinks a long Claude Code chat into a small digest so the person can type /clear and keep working with far less context. The newest requests stay nearly word for word, each older band is compressed twice as hard, and a pinned ledger keeps the person's rules, decisions, changed files, commits, links and open tasks. A local script does the work with no model call, so compressing costs no tokens. Use when the person asks to compress, shrink, hand off or save the chat or its context, wants to use fewer tokens, or says the chat is long, slow or expensive.
Arguments
/compress [token budget, default 10000]
Original author description
Shrinks a long Claude Code chat into a small digest so the person can type /clear and keep working with far less context. The newest requests stay nearly word for word, each older band is compressed twice as hard, and a pinned ledger keeps the person's rules, decisions, changed files, commits, links and open tasks. A local script does the work with no model call, so compressing costs no tokens. Use when the person asks to compress, shrink, hand off or save the chat or its context, wants to use fewer tokens, or says the chat is long, slow or expensive.
How it works
- What to do
SKILL.md preview
---
name: compress
description: Shrinks a long Claude Code chat into a small digest so the person can type /clear and keep working with far less context. The newest requests stay nearly word for word, each older band is compressed twice as hard, and a pinned ledger keeps the person's rules, decisions, changed files, commits, links and open tasks. A local script does the work with no model call, so compressing costs no tokens. Use when the person asks to compress, shrink, hand off or save the chat or its context, wants to use fewer tokens, or says the chat is long, slow or expensive.
argument-hint: "[token budget, default 10000]"
allowed-tools:
- 'Bash(python "${CLAUDE_SKILL_DIR}/../../scripts/ctxsave.py" compress *)'
- 'Bash(python3 "${CLAUDE_SKILL_DIR}/../../scripts/ctxsave.py" compress *)'
- 'PowerShell(python "${CLAUDE_SKILL_DIR}/../../scripts/ctxsave.py" compress *)'
license: MIT
compatibility: Claude Code with Python 3.10 or newer. The /clear handoff and the facts re-pinned after compaction come from this plugin's SessionStart hook.
---
# Compress this chat
Result of compressing with the default budget:
!`python "${CLAUDE_SKILL_DIR}/../../scripts/ctxsave.py" compress --session-id "${CLAUDE_SESSION_ID}" --data-dir "${CLAUDE_PLUGIN_DATA}" || python3 "${CLAUDE_SKILL_DIR}/../../scripts/ctxsave.py" compress --session-id "${CLAUDE_SESSION_ID}" --data-dir "${CLAUDE_PLUGIN_DATA}"`
## What to do
1. If the result above is an error, tell the person in one sentence what failed, and stop.
2. The person's arguments were: `$ARGUMENTS`. If they contain a whole number from 2000 to 60000, run the command once more with `--budget <that number>` added. Use the `python` form above as a single command with nothing chained before or after it. Ignore any other text in the arguments.
3. In two or three short sentences, tell the person:
- how big the chat's context is now and how big the digest is;
- that their newest requests stay almost word for word, older ones are shortened, and their rules, decisions, files and open tasks are pinned;
- that no model was called, so this cost no tokens.
4. Then give the one step left, on its own line: type `/clear`. The next session in this folder starts from the handoff. It is used once and expires after 2 hours.
5. Do not paste the digest into the chat, because that would add back the tokens this saves. If they want to read it, give them the file path from the result.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · Matanza00/principal-skills | 100 | MIT |
| cwinvestments/memstack | 100 | MIT |
| owainlewis/agent-skills | 100 | MIT |
| ccplugins/awesome-claude-code-plugins | 95 | Apache-2.0 |
| iurykrieger/claude-bedrock | 95 | MIT |
| melodic-software/claude-code-plugins | 84 | MIT |
Database snapshot: 13.11.2026 · package version 2e00bb4e9b78 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90honey-compress
Rewrite a memory or context file (CLAUDE.md, AGENTS.md, a todo or notes file) into Honey-terse form so it costs fewer input tokens every session, without losing meaning. Backs up the original first. Use when asked to shrink or compress context files, trim CLAUDE.md, or cut… - 100skill-shrinker
Shrinks CLAUDE.md, AGENTS.md, SKILL.md and .cursor/rules files so they cost fewer tokens on every turn without losing a single instruction. Measures size (chars, words, tokens), flags duplicate, overlapping and contradictory rules, narration, oversized examples and dead… - 100agents-md-compress
Use when the user asks to shorten, compress, or deduplicate a repository's `AGENTS.md` without losing rules. - 100text-optimize
Optimizes text, docs and LLM prompts (CLAUDE.md, rules, agent/skill files) for token efficiency in place, snapshot-backed, without losing facts. Use when asked to optimize, compress or cut tokens of named files. Triggers - optimize, reduce tokens, compress, deep compress, сожми, оптимизируй. - 98signal-compress
Compress memory files, prompts, rules, handoff notes, and project docs into SIGNAL-shaped prompt-token-friendly text while preserving code, paths, identifiers, errors, versions, and technical terms. Use when user types /signal-compress, "compress this memory", "shrink this… - 100working-lean
Same quality, fewer tokens in Claude Code. Keeps tool output small, reads files in ranges, batches tool calls, briefs subagents with a budget, and moves long work to a fresh session through a handoff. Use this skill whenever a task will run noisy commands (tests, builds,…