/mimi:mimifrom mimi
Set up, adopt, or audit a project's mimi memory (the mimi/ folder - MIMI.md map, STATE.md, ISSUES.md, decisions.md, memory/<topic>.md - loaded from CLAUDE.md, AGENTS.md or GEMINI.md) so the agent checks memory before grepping the repo. Use when the user says "/mimi", "mimi", "set up memory", "add the memory layer to this project", "adopt memory layer", "check memory for rot", or starts a new project.
Ships in mimi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Everything mimi keeps lives in one folder, mimi/, at the project root. It has five kinds of file,
one of each:
| File | Holds | Cap | Updated |
|---|---|---|---|
mimi/MIMI.md | Map: which file to read for what, hard rules, the memory index | ~100 lines | When the layout changes |
mimi/STATE.md | Now only: goal, deployed commit, broken, open threads, next 3, ## Last session handoff | 60 lines | Overwritten every session |
mimi/ISSUES.md | Every bug: exact symptom, cause, fix commit, test | None, append-only | Per bug |
mimi/decisions.md | Choices someone would argue again: why, what reverses it | Short entries | Per decision |
mimi/memory/<topic>.md | What the code cannot tell you | 150 lines each | When that topic changes |
mimi/logs/ holds the reports the mimi-logging skill saves.
How it loads. Each agent instruction file the project has (CLAUDE.md, AGENTS.md, GEMINI.md;
a new CLAUDE.md and AGENTS.md if none) gets one managed block between <!-- memory-layer:start --> markers. The block
holds @mimi/MIMI.md, which Claude Code and Gemini CLI expand, and a plain line telling any other agent
to read mimi/MIMI.md and mimi/STATE.md. MIMI.md imports STATE.md. So every session starts with the
map and the current state already loaded, and an index saying which file answers which question. That
index is what replaces grepping.
Git. mimi/.gitignore contains *, so git ignores the whole folder and the project's own
.gitignore is never touched. Memory stays on this machine. Deleting mimi/.gitignore shares it through
git.
Search. Most agents search with ripgrep, which skips git-ignored files, so it would not search
mimi/. mimi/.ignore contains !*, which ripgrep reads and git does not, so search sees the folder
again. check flags the file if it goes missing.
The script. memlayer.py sits next to this file. Run it with python, or python3 where python
is missing.
init creates missing files and the import. It never overwrites anything, so it is safe on any
project, any number of times.
index refreshes the index lines in mimi/MIMI.md.
check reports rot and exits 1 when it finds any:
MIMI.md + STATE.md)Last verified: dates## ISS- entriesMemory files may sit in subfolders of mimi/memory/, but a flat folder is easier to scan, so check
notes them.
Pick the mode:
mimi/MIMI.md and the repo has little history → Newmimi/MIMI.md, but the repo has code, commits, or notes → Adoptmimi/MIMI.md present → CheckThe index in mimi/MIMI.md is the only thing that makes a memory file get read. An agent matches its
task against these lines, and a task names its symptom, not its topic. A hand-written line drifts toward
the topic, so the symptom words come from the file itself:
## heading, named the way a task would describe it:
## Stripe sends the same webhook event twice, not ## Webhooks.python memlayer.py index <project> appends the headings of every memory file and of mimi/decisions.md
to its index line as — contains: …. mimi/ISSUES.md is append-only and found by its symptom text, so
its line gets no headings. It marks a memory file, mimi/ISSUES.md or mimi/decisions.md that holds nothing
yet as — empty, so a task skips it. Run it after any memory edit, then check. It is idempotent.git log --grep and the code. A thin memory must never read as "no known issue".python memlayer.py init <project>mimi/STATE.md.python memlayer.py init <project>.CLAUDE.md, AGENTS.md, GEMINI.md, README*, TODO*, NOTES*, any old memory/, .harness/, docs/git log --oneline -200, especially fix: commits and revertsgh issue list --state all --limit 50 if a GitHub remote existsDockerfile, CI workflows, .env.example, railway.json and the like) for external systemsmimi/ISSUES.md, citing the fix commitmimi/decisions.mdmimi/memory/<topic>.md, plus an index
line in mimi/MIMI.md (see Index lines)mimi/STATE.mdLast verified: is the date a fact was last checked, not the date it was copied. Keep the source's
date, or write today only for facts you re-checked in this run.memory/, .harness/, and notes addressed to
the agent (AGENT_NOTES.md and the like).README*,
CONTRIBUTING*, docs/, .docs/, design specs, plans, task lists and anything a person reads.index, then check until it prints memory layer clean.mimi/ is ignored by git through mimi/.gitignore, and that deleting that file
shares the memory with the team. Do not change the project's own .gitignore.Run python memlayer.py check <project> and fix each line it prints:
mimi/STATE.md over cap usually means finished work was never removed.Last verified: → re-check each fact against reality. Fix it or delete it, then bump the date.mimi/MIMI.md → run init, which adds the import back. If the file is
a project document that only shares the name, such as a product's own AGENTS.md, put
<!-- memory-layer:skip --> in it instead: check and init then leave it alone.The script cannot see these. Look for them yourself:
## Webhooks) → rename it after the trap, or split the
section so each trap has its own heading. Then run index.mimi/memory/ file nobody has needed in a month of sessions → merge or deleteWhat SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/mimi-closeClose a work session by writing what this session learned into the project's mimi/ folder (ISSUES, decisions, memory/, STATE), then index and check it./mimi-loggingShow what mimi costs and saves in this project, from its Claude Code session logs, and save the report under mimi/logs/. Covers memory size, tokens loaded every session, tokens and searches per prompt before and after adoption, and which memory files get read./mimi-startSet a project up with mimi, once. Run again later only when you want a brief of where the last session stopped; the memory loads into every session without it.Other plugins' skills for the same job
npx claudepluginhub candybutcher27/candy-skills --plugin mimi