claudemods

All Claude Code modsdtinth/claude-code-mods

polite-compaction

A Claude Code mod in dtinth/claude-code-mods

Shows context tokens and session cost in a gray line above the prompt. At a token threshold, asks the agent to flush notes, then compacts when it says it is ready.

polite-compaction reaches L2 (writes or runs) by its classified calls and passed claude plugin validate on Claude Code 2.1.302.

Install hint

/plugin install polite-compaction --marketplace dtinth/claude-code-mods

From the repository's own marketplace. Confirm the plugin name in the repository's README before installing. Mods need Claude Code 2.1.287 or later.

Access

L2 Writes or runsother: $.state.get, other: $.state.set, drives Claude, draws

Validation

Passed on Claude Code 2.1.302

View the source on GitHub Back to the list

What the scan recorded

Observed events
Only what it hooks
Hooks
session.start, session.measure, turn.complete, ui.render {component=AbovePrompt}
API calls
$.clock.after, $.prompt.submit, $.session.compact, $.session.usage, $.state.get, $.state.set, $.ui.resolve
Validation on 2.1.302
Passed
Scanned revision
08e83827b563
Marketplace passed
dtinth-mods

These are the hooks and API calls reported by claude plugin validate. Access levels describe the widest reach of those calls and are not safety ratings. Validation is a static check, not a runtime test, and a passing result does not prove that a mod works or is safe. How the scan works.

Badge for your README

Reach badge for polite-compaction Validation badge for polite-compaction

Authors can show the latest scan result in their README. Each badge links to this page.

[![reach](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/dtinth--claude-code-mods--polite-compaction-reach.svg)](https://mods.aidojo.si/mods/dtinth--claude-code-mods--polite-compaction/)
[![validates](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/dtinth--claude-code-mods--polite-compaction-validates.svg)](https://mods.aidojo.si/mods/dtinth--claude-code-mods--polite-compaction/)