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.
Run automatically on Claude Code events. Claude doesn't decide.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
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.
A per-file ceiling on comments, block comments and docstrings, enforced on every edit. The ceiling only ever falls: removing prose lowers it, and nothing Claude Code can do raises it.
.claude/expository-content-budget.json in the project, one entry per file:
{
"READ-THIS-FIRST": "A per-file ceiling on comment blocks, block comments and docstrings...",
"EXCLUDE": ["vendor/", "src/generated/**", "*.pb.go"],
"src/parser.py": 4,
"src/render.ts": 1
}
It lives in .claude/ so it is yours to edit. Claude Code cannot touch it: a PreToolUse hook denies Edit, Write, MultiEdit and NotebookEdit against it, and denies any Bash command that so much as names it. Raising a number is a hand edit by a person. That is the whole design — the only path from "I want to keep this comment" to a green check runs through you.
A file with no entry has a ceiling of zero, so a newly created file arrives with no budget to spend and may carry no expository comments or docstrings at all.
EXCLUDE is a list of gitignore-style patterns for paths the budget should not account for at all — vendored code, generated code, a legacy corner you have decided not to fight. It is a hand edit like every other change to this file.
Four rules cover:
/ matches that basename anywhere — conftest.py, *.pb.go./ matches the repo-root-relative path — src/generated/**, docs/legacy/old.py. ** crosses directories; a single * or ? does not./ means directory only, so vendor/ excludes the tree but not a file named vendor.A leading / anchors to the repository root; a leading ./ is ignored.
What you will see: an excluded file's entry disappears from this file on the next write, and the file stops being scanned. Delete the pattern and the next startup, resume or clear re-absorbs it at whatever it then holds. There is no dormant bookkeeping — an exclusion is a deletion, and un-excluding is an amnesty like any other. Between the two, a file you un-exclude mid-session is over budget until the next absorbing SessionStart, which is the same rule that governs everything else here.
Not supported, so nobody wastes an afternoon on it: negation (!keep.py), brace expansion, and patterns that would match the entire repository — **, * and their spellings are ignored rather than obeyed, because one of them would silently switch the plugin off.
Exclusion happens before a file is ever opened, so an excluded tree is never read from disk. Excluding a large vendor/ also removes it from the scan cost quoted below.
SessionStart records the budget. It scans the working tree — everything git tracks plus everything untracked and not ignored — and writes what each file currently holds. On the first run every file is recorded as-is, so an existing codebase starts green.
On later sessions it re-records from the tree on startup, resume and clear, absorbing whatever changed while no session was running. That amnesty is deliberate: between sessions only a person edits the tree, and a check that refuses to acknowledge your own comments is a check you would turn off. On compact it only lowers — auto-compaction happens mid-task without anyone asking for it, and it is the one session boundary Claude can cause on its own, so absorbing there would let a long session launder every comment it had just added.
PostToolUse enforces it. After every edit and every shell command it rescans the whole worktree — not just the file named in the tool call, so nothing added by a sed, a heredoc or a generator slips past. Any file over its ceiling and the tool call is blocked, naming each file, what it holds and what it is allowed; the hook fires again on the next call, and the next, until the tree is green. Every file under its ceiling has that ceiling lowered to match, on the spot.
A full scan costs about 0.12s on a small repository and 0.45s on one of 159 files and 2,151 blocks, which is the price of the guarantee.
The refusal tells Claude to remove prose it added and, for a file it has not touched this session, to stop and report rather than delete someone else's comment. After an absorbing SessionStart the tree begins at exactly zero overruns, so anything over budget appeared while the session was running.
PreToolUse guards the budget file, as above.
The unit is the block, not the line: a run of adjacent whole-line comments counts once, a docstring counts once however many lines it spans, and a trailing comment always counts on its own because it belongs to its line rather than to the run.
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.
npx claudepluginhub dr-igor/claude-code-plugins --plugin expository-budgetPlugins from other owners that cover similar ground