lean-and-mean
Short answers, minimal code, and an AGENTS.md that remembers every correction. Shorter sessions, less code nobody asked for, no repeat mistakes.
The problem
Coding assistants say too much and build too much. Padded answers and unrequested helpers all need reading, review and upkeep. Every session also starts blank, so a mistake you fixed yesterday can come back today.
lean-and-mean writes a short instruction block into the project's root AGENTS.md. Codex loads that file directly. Claude Code loads it through a one-line CLAUDE.md that holds only @AGENTS.md. The block is then active every session, with no plugin code running.
How a session runs
AGENTS.md: /endsession writes it, and the next session loads it.What it does
Minimal code
YAGNI: the smallest change that works. New code comes last. The ladder.
Rules that stick
Every correction becomes one dated line under ## Rules. The file loads every session, so the mistake does not repeat. How AGENTS.md is kept.
Clean handoffs
/endsession saves Rules, the next task and the backlog. Then it commits, pushes and stops.
Short answers
The answer comes first, with no filler. Sentences are concise and active, broadly following ASD-STE100. A diagram or a page when that explains better.
Commands
| Command | Effect |
|---|---|
/lean-and-mean:lean-and-mean | Create or review AGENTS.md. It refreshes the block, reorders sections, checks commands and paths, and prunes stale lines. Safe to rerun. The hook usually asks for it. |
/lean-and-mean:lean-and-mean debt | List every // lean: shortcut and its upgrade path. Changes nothing. |
/lean-and-mean:endsession | Save Rules and Next, commit, push, then stop. When the work meets ## Done, it also runs those steps, such as a merge or a deploy. When it does not, Next says what remains. Details. |
Codex uses $lean-and-mean and $endsession. A manual install gives the bare /lean-and-mean and /endsession.
The session-start hook
A short shell script runs when a session starts. It checks AGENTS.md and prints nothing when all is well:
- No block in
AGENTS.md. It loads the block for this session and suggests the create pass. - The file needs a tidy. The block is older than the plugin, the file is over 250 lines,
/endsessionflagged a review, orCLAUDE.mdis not the@AGENTS.mdstub. The assistant runs the full pass first, reloads the new file in place of the copy loaded at start, then does your task.
The tidy runs at session start because the context is small then, so it is cheap. Every hook condition.
Optional parts
Session Status Mod
A row above the Claude Code prompt (a side pane in the desktop app): a Cache Idle bar that counts up, End session button; on desktop, project and branch, context and 5h/weekly limit bars, the task list and Next sessions; auto /endsession at 5 minutes cache left, cold-cache question.
Explainer Agent
A subagent that writes a local page with diagrams when an answer is too long for the terminal. It writes short Markdown; the explainer kit does the design.
Utilities, such as a status line, the Explainer Agent and the typesafe-ai skill, are on the extras page.
Why it pays off
Install
Claude Code
claude plugin marketplace add https://github.com/spinlockdevelopment/lean-and-mean
claude plugin install lean-and-mean@lean-and-mean
Restart Claude Code. Then run /lean-and-mean:lean-and-mean once in each project. It writes AGENTS.md and the CLAUDE.md stub. Until then, the hook loads the block each session and reminds you.
Codex desktop and CLI
Run these commands in a terminal.
codex plugin marketplace add https://github.com/spinlockdevelopment/lean-and-mean
codex plugin add lean-and-mean@lean-and-mean
Reopen Codex. Review the SessionStart hook in desktop Settings → Hooks or CLI /hooks. Start a chat at the project root and run $lean-and-mean once.
To refresh the marketplace, run codex plugin marketplace upgrade lean-and-mean and reopen Codex. See Codex Companion for the optional floating Session panel on macOS.
No plugin support, or want bare command names? See manual install.
Turning it off
Disable the plugin and delete the ## Operating Mode section from AGENTS.md. The block lives in the file, so disabling alone is not enough.
Raw instructions
The plugin is plain text the model follows. Each page renders the Markdown on main:
- operating-mode.md — the block written into
AGENTS.md - lean-and-mean/SKILL.md — setup, review and file structure
- endsession/SKILL.md — the session handoff
lean-and-mean is MIT licensed.