self-compact

self-compact is a Claude Code mod by kzarzycki that compaction at task boundaries: the model can ask to compact once its turn ends. Above a fill threshold it is asked whether to, after a turn decision-model judges a finished task, or,.

Updated 2026-10-09

What is self-compact?

self-compact is a Claude Code mod by kzarzycki that compaction at task boundaries: the model can ask to compact once its turn ends. Above a fill threshold it is asked whether to, after a turn decision-model judges a finished task, or,. It is listed under Context & memory and has 1 GitHub stars.

TypeClaude code mod
Authorkzarzycki
Repositorykzarzycki/claude-mods
Popularity1 GitHub stars
CategoryContext & memory
SecurityReview before installing (76/100)
Rank#1,932 of 5,272 Claude Code mods; #191 in Context & memory
Last commit2026-10-09
Hooks4 events
Seesevery prompt, every tool call
Draws onnothing

Is self-compact safe to install?

self-compact scores 76/100 on the MCPMods security check: Review before installing. Things to review: watches every prompt or event. It passed 4 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts no processesPass
Writes no files or configPass
Doesn't read environment variablesPass
Watches every prompt or eventReview
Drives Claude (model calls, prompts)Note
Validator reported problemsNote
No license detectedNote

API calls in its code

CallWhat it means
$.clock.sleep
$.command.rundrives Claude
$.decision.ask
$.prompt.read
$.prompt.submitdrives Claude
$.session.usage
$.tool.registerdrives Claude
$.ui.toastdraws interface

How do I install self-compact?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/kzarzycki/claude-mods
    claude plugin validate ./claude-mods/plugins/self-compact
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add kzarzycki/claude-mods && claude plugin install self-compact@claude-mods

Or ask Claude to set it up

Paste this into Claude Code and it installs self-compact for you:

Install the "self-compact" Claude Code mod from https://github.com/kzarzycki/claude-mods/tree/main/plugins/self-compact. Run claude plugin validate on it first and show me what it can access before you enable it.

More from kzarzycki/claude-mods

This repository has 8 Claude Code mods on MCPMods.

  • agent-hub: Agent hub: a pane listing this session's subagents with status, model, turns and tokens, and a box to steer a running on (Low risk)
  • auto-effort: Auto effort: the decision model rates each prompt and the turn it starts runs at that effort. (Low risk)
  • compact-methods: oh-my-pi compaction methods: shake (move old tool output to files, no model call) and handoff (continue from a handoff d (Review before installing)
  • decision-model: A decision model for other mods ($.decision.ask): typed questions about a state, answered by any System One endpoint (Je (Review before installing)
  • eval-kernel: A persistent JavaScript kernel the model drives with one `eval` tool: state survives between cells, and cells call Claud (Review before installing)
  • resume-on-stop: Unexpected stops: when a turn ends right after saying it will act, the decision model spots it and one turn resumes the (Review before installing)
  • ttsr-rules: oh-my-pi TTSR rules: a regex rule denies the tool call that would break it, with the rule as the reason; a question rule (Review before installing)