SmartCompact — Development skill for Claude Code
Compact long coding-agent sessions earlier, at a pause after a finished piece of work, to cut cost without losing results (Claude Code, pi, Codex).
How to install SmartCompact
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open coffeecoproject/SmartCompact and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What SmartCompact does
Compact long coding-agent sessions earlier, at a pause after a finished piece of work, to cut cost without losing results (Claude Code, pi, Codex).
Alternatives in Development
- Shorten — Cut length without losing content 407 ★
- The Dev Squad — Give Claude its own dev team: one supervisor, four specialists, and bulletproof plans/builds without losing co 231 ★
- Cut Video — Claude Code skill: tighten long recordings — remove silences, ums, dead air 92 ★
README
SmartCompact
**English** · [中文](https://github.com/coffeecoproject/SmartCompact/blob/main/README.zh-CN.md)
[](https://www.npmjs.com/package/smartcompact) [](https://github.com/coffeecoproject/SmartCompact/stargazers) [](https://github.com/coffeecoproject/SmartCompact/blob/main/LICENSE)
▶ Watch the 90-second explainer (click the image to play)
**SmartCompact lets long coding-agent sessions compact earlier, at a pause after a piece of work is finished.** On 18–60 consecutive coding tasks it cut cost by **7–44%** with no loss in hidden acceptance tests; the longer the session, the more it saves. In the longest runs (60 tasks, native sessions reaching 820k–960k tokens) the model missed 6 of 180 recall questions about details mentioned in passing much earlier ([how it was tested](https://github.com/coffeecoproject/SmartCompact/blob/main/docs/EVALUATION.md)).
Every request re-reads the whole context, so a long context makes every step expensive. Native auto-compaction waits until the context is nearly full (close to 1M tokens in Claude Code, up to 800k in Codex if configured), and it ignores timing, so it often lands in the middle of a task. SmartCompact works with Claude Code (CLI and desktop app), [Pi](https://github.com/earendil-works/pi) and the Codex CLI:
- Compact at a good moment. Once the context passes the allow line (200k tokens by default), it compacts when a turn ends, if a piece of work has been finished since the last compaction (a commi
Related Skills
P Unsummarizable
Make writing unsummarizable — strip all fluff so no word can be cut without losing an idea
Checkout Specialist
Use when a cart or checkout is losing people. Abandoned carts, long payment forms, forced account creation, sh
Critique Adversarial
/critique-adversarial — Hostile cut-editor for articles. Reads the full piece first, maps the thesis spine, th
Claude Capacity Guard
Native Claude Code quota guard: pause long-running tasks before quota runs low and continue after reset.
Lcc
Compact coding-agent context without summarizing it away. Verbatim, offline, with a receipt and recall for eve
Baton Pass
Pass the baton before your context runs out: a Stop-hook + skill that hands a long agent session off to a fres
Related Agents
Founder
founder orchestrator — plans, delegates, and stewards long sessions. Spawns coding subagents instead of writin
9remote
Long-running AI coding sessions keep working after you leave the desk, but checking on them from a phone usual
Aux Delegator
Invokes external CLI coding agents (Codex, OpenCode, Claude -p, ACP). Use whenever a task should be offloaded
