Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/emadd/mise-en-claudeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/emadd/mise-en-claude/mise-clean)<a href="https://agentmods.dev/commands/emadd/mise-en-claude/mise-clean"><img src="https://agentmods.dev/badge/commands/emadd/mise-en-claude/mise-clean/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/emadd/mise-en-claude/mise-clean"><img src="https://agentmods.dev/badge/commands/emadd/mise-en-claude/mise-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.01371 |
| Opus 5 | $0.00028 | $0.00685 |
| Sonnet 5 | $0.00011 | $0.00274 |
| Haiku 4.5 | $0.00006 | $0.00137 |
Grade A, and why
mise-clean scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are running the hygiene sweep — "clean as you go, sweep the line at close." Same mise ethos
as everything else: consent-first, non-destructive, snapshot-first. Report first, then act on a
yes, one category at a time. Never blind-delete, never git clean -fdx, never rewrite history to
"tidy," and never touch a file that might hold a secret (defer to the secret protocol — do not ingest
the value). Focus: $ARGUMENTS if given, otherwise sweep it all.
Survey, then present findings grouped, each with a one-line "why it's cruft" and the exact fix:
- Junk tracked in git that shouldn't be. Build output (
DerivedData/,build/,.next/,dist/,target/), dependencies (node_modules/), OS/editor cruft (.DS_Store,*.xcuserstate). Fix = untrack but keep on disk:git rm --cachedand add the pattern to.gitignorein the same step (untracking without ignoring isn't durable — a latergit addre-tracks it). Removes bloat from the repo without deleting the user's files. - Backup & scratch cruft. mise's own
.bak-*files and.mise-backup/, a resolvedHANDOFF.md, stray*.log, temp/scratch dirs. These are deletable — list them and delete only on a yes. - Git detritus. Local branches already merged into the main line (offer to delete), orphaned
worktrees (especially leftover
mise-cookbrigade lanes —git worktree list, then prune the stale ones), stale stashes (report; never auto-drop). Branch and worktree removals are recoverable from the reflog for a while — say so. - Untracked files. Separate real-looking work from junk. Never delete untracked files blindly — they may be the user's uncommitted work. List them, sort into "looks like junk" vs "looks like work," and let the user decide per item or per category.
Optional — the CLAUDE.md audit (opt-in; don't run it by default). The four sweeps above are
cheap surveys of files that shouldn't be there. This one is different: the file should be there, but
its contents rot — and verifying that means reading the code, which is a real context spend. So it
runs only when asked (a focus arg like "audit CLAUDE.md" / "check the brain"), or when the user
takes you up on the one-line offer at close. Never bundle it into a routine sweep.
It belongs in the hygiene lens because CLAUDE.md is cruft's worst hiding place: it's written once
and then read by every future session — by an agent that believes it. A stale line doesn't just sit
there like a .DS_Store; it actively misinforms every run that follows, and every surplus line is a
tax on every session's context. Same consent contract as the rest of this sweep — fix what you can
prove wrong, propose the rest, never blind-delete.
- Stale — names a path, script, flag, or command that changed or vanished. Verify it (
lsthe path, run or grep the command; don't reason about whether it's probably still true). Verified stale is a fact, not a judgment: fix it and report it in a line. - Duplicated — restates the
README/ARCHITECTURE/docs, and has since drifted from them. The doc is the source of truth: propose replacing it with a one-line pointer. - Generic — advice a competent model already has ("write tests", "use types"). Pure context tax: propose the cut.
- Unearned — a rule the code doesn't actually follow. Flag it, never cut it — it may be a live intent rather than dead weight.
Weigh every cut by what it costs to be wrong: a wrong trim silently removes a guardrail and nobody notices until it bites; a wrong keep costs some tokens. So the default is keep and flag, and "I don't see why this is here" is a reason to ask, not to delete. Watch the one real failure mode: stripping the odd, hyper-specific gotchas — the highest value-per-token lines in the file — because they look like one-offs out of context. A weird rule is evidence of a scar. Group findings into a few real decisions with the diff and the reason, never a line-by-line checkbox cart. A tight, accurate brain earns a one-sentence "it's current" — not a manufactured trim.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 71 lines · 56 tokens per session scan A acc863cd8ded
mise-clean is a command published in the GitHub repository emadd/mise-en-claude (51 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 1,371 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
status
Show the Salesforce project banner — connected org, edition, API, project metadata stats, and MCP server status.
setup
Verify ClauDex prerequisites — Codex CLI, authentication, and git.
red-team
Stress-test a plan, strategy, PRD, or launch with a room of hostile expert personas before you commit.
instinct-import
Import a portable YAML instinct pack with confidence-gated merge (Instinct Engine).
acos-checkpoint
Create checkpoints before risky operations. Rollback if things go wrong.
release-notes
A release-notes generator that reads Git history and prepares a Keep a Changelog entry, a standard format for recording software changes, plus text for users.