bcmyguest

Smarter Compact — Development skill for Claude Code

Development community

Trim coding-agent context without a summary.

How to install Smarter Compact

This entry records only its repository, not the path inside it, so there is no exact command to give. Open bcmyguest/smarter-compact and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Smarter Compact does

Trim coding-agent context without a summary. Older turns stay in a local store the agent can search.

Alternatives in Development

  • Magic Compact — Lossless context compression plugin for Claude Code & OpenCode 144 ★
  • Aegis Claude — Windows & macOS TUI: VPN leak check, TZ/WebRTC runtime guard & local Claude ID reset (chats stay) / Защита сре 96 ★
  • Mobius — Agent Session Hub: search, cite, resume and hand off local Claude Code, Codex, OpenCode, Pi, Grok and OMP sess 58 ★

README

Smarter Compact

[![npm version](https://img.shields.io/npm/v/smarter-compact.svg)](https://www.npmjs.com/package/smarter-compact) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) [![GitHub](https://img.shields.io/badge/github-bcmyguest%2Fsmarter--compact-blue)](https://github.com/bcmyguest/smarter-compact)

**Context management (smart compaction) for coding agents.** Long sessions keep small, cached prompts. Every message goes into a local SQLite session store. Once the prompt reaches your token limit, older turns leave it, and the next kept turn carries a pointer to them.

How it works: the prompt fills, turns 1–4 move to the session store, a search pulls a line back. Then a Claude Code session: the agent reads three log files, edits code and runs tests; the prompt crosses 95k and Smarter Compact moves 31 messages to the session store (97k to 51k); later the agent answers a question about the trimmed logs with smart_compact_sql and smart_compact_get (illustrative session); then the benchmark savings chart, 85% average.

The agent searches the store with `smart_compact_search`, `smart_compact_sql`, and `smart_compact_get` when it needs a detail back. Ask it to forget something, such as a pasted key, and `smart_compact_forget` redacts it from the store without deleting the session. The cut stays put on later requests, so the prompt cache keeps hitting.

**Learn more:** [How it works](https://bcmyguest.github.io/smarter-compact/context-management/) · [Benchmarks](https://bcmyguest.github.io/smarter-compact/benchmarks/) · [Context proxy & port](https://bcmyguest.github.io/smarter-compact/context-proxy/) · [Context store](https://bcmyguest.github.io/smarter-compact/context-store/)

**Benchmarks:** On [ContextBench](https://github.com/RulinShao/ContextBench) ([paper](https://arxiv.org/abs/2609.37725), [dataset](https://huggingface.co/datasets/cont