Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Kotomiya07v1.1.0MITIn 1 marketplace
Preserve Claude Code session state before and after context compaction.
Claude loads one when your task matches it, or you run it by name.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Japanese README | Architecture
A transparent Claude Code plugin that strengthens /compact continuity without replacing Claude Code's compaction algorithm. It captures a structured checkpoint before compaction, hardens and redacts it, then restores it into the same session through documented hooks.
PreCompact saves state and SessionStart with compact|resume injects it through additionalContext.PostCompact leaves a marker that UserPromptSubmit consumes once./loop.The 18-section state records:
/loop state and approval scopeLarge reproducible logs, full diffs, and generated output are omitted. Credentials, authorization/cookie values, passwords, private keys, URL credentials, known token forms, and personal email addresses are redacted before the final checkpoint is stored or restored.
After installation, use /compact normally. Manual and automatic compaction use the same checkpoint path.
Optional controls:
/compact keep the security decisions forwards priority guidance to the state-generation LLM./compact-plus manually enriches and verifies the checkpoint before compaction./compact-plus handoff exports emergency recovery material after checkpoint verification. A supervisor or user must start the new session, load the handoff, revalidate live state, and re-register /loop or monitors.PreCompact
precompact-transcript-backup.sh saves a transcript backup.precompact-state-summary.sh selects and squashes transcript evidence, invokes the configured LLM backend, and writes rich state.scripts/checkpoint.py precompact validates the session id and file ownership, migrates legacy headings, enforces the 18-section order, adds Git/recovery metadata, redacts sensitive data, limits the checkpoint to 64 KiB, and atomically writes mode 0600 in an owner-only directory.SessionStart (compact|resume)
scripts/checkpoint.py restore validates and injects the checkpoint through additionalContext once per restore event window.PostCompact and UserPromptSubmit
All hooks fail open: checkpoint failure does not block compaction.
jqclaude -p or codex exec for rich state generationThe default primary backend is claude -p --model claude-sonnet-5 --effort medium; the default fallback is codex exec --model gpt-5.3-codex-spark. If both fail, the deterministic checkpoint hardener still creates a minimal state file.
Add this repository as a Claude Code marketplace, then install the plugin.
claude plugin marketplace add https://github.com/Kotomiya07/skills --scope user
claude plugin install compact-plus@kotomiya07-skills --scope user
Restart Claude Code after installation. To update later:
claude plugin marketplace update kotomiya07-skills
claude plugin update compact-plus@kotomiya07-skills --scope user
Restart Claude Code again after updating. npx skills add installs only the skill files and does not install this plugin's hooks, so use the marketplace path for full functionality.
Set overrides under env in ~/.claude/settings.json or export them for one session.
npx claudepluginhub kotomiya07/skills --plugin compact-plusPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.