Claude Code mod

better-compact

Steers every compaction, including automatic ones, with a brief that keeps goal, next step, files, decisions and state. Once context runs high, a button above the prompt runs /compact, so you compact before a long context eats into your usage limits and model performance.

1 starsContext & usage modsValidates on Claude Code 2.1.316 Source

Install

From source
git clone https://github.com/koenvdheide/better-compact.git
claude --plugin-dir ./better-compact/.

The repo has no marketplace file, so load the plugin folder directly with --plugin-dir.

What it can access

Reach
L2Writes or runs: drives Claude, draws
Sees
compaction
Draws in
AbovePrompt
Hooks
session.compactsession.endsession.measureui.render

From a static scan of the mod's code by awesome-claude-code-mods. It shows what the code asks for, not a security review.

How Claude Code mods work

  • A mod is a plugin with a JavaScript or TypeScript module that runs inside Claude Code (version 2.1.287 or later). It can draw panes beside the transcript, a band above the prompt, buttons and toasts, restyle the spinner and tool rows, and watch or rewrite tool calls and prompts.
  • It installs like any plugin: add its marketplace with /plugin marketplace add owner/repo, then /plugin install name@marketplace.
  • Check what a mod can reach before installing: it runs with your permissions. Reach goes from drawing only, to reading files, to writing files or running processes, to the network. Run claude plugin validate on a clone to list its hooks and calls without running it.
  • Turn one off from the Installed tab in /plugin, or start Claude Code with --safe-mode to skip every customization for a session.
Claude Code docs

Details

Folder
.
Author
Koen van der Heide
License
MIT
Last updated
14 October 2026

FAQ

What is better-compact?

Steers every compaction, including automatic ones, with a brief that keeps goal, next step, files, decisions and state. Once context runs high, a button above the prompt runs /compact, so you compact before a long context eats into your usage limits and model performance. It is a mod for Claude Code, from koenvdheide/better-compact on GitHub.

What can the better-compact mod access?

Its widest reach is "writes or runs" (drives Claude, draws). It sees compaction. It draws in AbovePrompt. Like any mod, it runs with your permissions.

How do I install better-compact?

Clone koenvdheide/better-compact and start Claude Code with --plugin-dir pointing at the mod's folder (.).

Is better-compact popular?

koenvdheide/better-compact has 1 GitHub stars and 0 forks, and is included in 1 curated Claude Code list. It was last updated on 14 October 2026.

More context & usage mods

bento

1

wpvip-awesomeface/claude-mods

A lunchbox that fills as context grows, with /doggybag to pack a handoff for a fresh session.

Context & usage mods

brain-drain

1

makingaipractical/brain-drain-for-claude-code

How full Claude's context is, when its cache goes cold, and how much of your 5-hour and weekly limits is left — right under the prompt in Claude Code.

Context & usage mods/plugin install

aurora

1

FranklinNotOld/Aurora-Claude-Code-Mod

Session metrics and reply themes for the Claude Code desktop: context, cost, rate limits, cache, tools and subagents, as a status line, a progress band above the prompt, a dashboard pane (/aurora) and /aurora-debug; twelve styles for replies, the band, the status line and the pane (/aurora-theme)

Context & usage mods/plugin install

burn-rate

1

TroyJLorents-GH/mod-squad

A terminal cost dashboard (/burn): spend by day, project, model, activity, tools, shell commands and MCP servers, read from your local Claude Code transcripts and estimated at list price.

Context & usage mods/plugin install

astrolabe

1

jonyfs/astrolabe

Spec Kit progress and usage governance for Claude Code: a phase rail above the prompt, the next command in the prompt hint, the current task on the spinner, a /astrolabe pane, toasts, update buttons, and a status entry with your usage window.

Context & usage mods/plugin install

burnline

1

matrac/burnline

One status line beside the model selector: 5-hour and 7-day usage with pace and reset countdown, plus Claude's task list as milestone dots

Context & usage mods/plugin install

Browse the most popular Claude Code mods, all context & usage mods, or the skills and MCP server directories.