lean-context

by Paulo Silva · ★ 0 · updated 9 days ago

Status lineCommandsPromptvalidates

0

Measures and, once approved, strips configured sections of the project instruction file from the Claude Code context while no spec is active for the branch.

install lean-context

Install

/plugin marketplace add mercynet/my-claude-mods
/plugin install lean-context@local-mods

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.startprompt.contextprompt.submitprompt.composesession.compactturn.stepturn.completecommand.run
API calls
$.clock.now$.command.register$.fs.exists$.fs.stat$.process.run$.session.id$.session.root$.session.turns$.session.usage$.state.get$.state.set$.store.delete$.store.get$.store.set$.ui.log$.ui.status$.ui.toast
Can see
the system promptevery promptcompaction
Reach
level 2 of 3 runs processesreads filesreads mod statepersists statedraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/mercynet/my-claude-mods
Path in repo
lean-context
Source commit
43be4e2 the exact code the scan read
Author
Paulo Silva @mercynet
License
No license declared — ask the author before reusing code.
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from mercynet/my-claude-mods

context-forecast

mercynet/my-claude-mods

Forecast of the context window with a clear-or-compact score, usage limits, cross-session calibration and guided compaction.

★ 0PanesBandsGuards

env-doctor

mercynet/my-claude-mods

Read-only preflight of a dev environment at session start: stopped compose services, missing node_modules for MCP servers, empty cache files and required paths. Never fixes anything, it only prints the command.

★ 0Status lineCommands

graph-sync

mercynet/my-claude-mods

Keeps a code knowledge graph fresh: after code edits, runs an AST-only update command in the background when the turn ends (default: graphify update .).

★ 0Status lineGuardsCommands

session-banner

mercynet/my-claude-mods

Shows a plain-text logo with a gradient and one shimmer sweep above the prompt when a session starts, until the first prompt. /banner shows it again.

★ 0BandsCommandsPrompt

spec-band

mercynet/my-claude-mods

A band above the prompt showing the active spec of the current branch: task progress, STATE.md age and phase, and a warning when STATE.md has not been updated for many edits.

★ 0BandsGuardsPrompt