While you were out, it took notes.
The Secretary is a local memory for Claude Code. It keeps every conversation word for word and leaves a handoff for your next session, so you never explain the same thing twice.
It runs on a local LLM on your own machine. No conversation leaves it.
git clone https://github.com/microbians/AI.SKILLS.git && bash AI.SKILLS/plugins/secretary/install.sh
macOS or Linux · Node 18+ · MLX or llama.cpp · MIT license. Full install steps
Example handoff. Yours is written from your own session.
A simulated Claude Code session with The Secretary
The animation shows a session that starts with the previous handoff restored, a recall question answered from memory, a note saved, the context filling up until the status line turns yellow and then red, and a fresh start with the memory recovered.
Ask “do you remember…?”
Ask in plain words, in English or Spanish. The Secretary searches what was literally said and what was said with other words, then hands Claude the matching turns before it answers. No command to run.
- [said]Your own words, found literally.
- [turn]Claude’s answer, found literally.
- [said~]Found by meaning. Similar wording exists; it is a lead, not proof.
- noneNo literal hit means it was never said in this project.
Every rule was measured on real sessions.
A small local model asked to summarize will happily turn a search into an achievement. Each fix below started as a number, measured on stored sessions from the changelog.
| No. | What went wrong | Was | Now |
|---|---|---|---|
| 01 | Handoffs named files nobody touched.Better model, then a files-touched list read from the session itself. | 26 paths | 0 paths |
| 02 | The end-of-session handoff read only the last unread lines.It now reads the whole session. | 112 chars | 15,755 chars |
| 03 | Recognizing “remember this” and “forget that”.gemma-4-26B-A4B replaced Qwen2.5-7B on machines with 48 GB or more. | 60% | 90% |
| 04 | Summaries stuck in a repetition loop.304 of 29,373 stored summaries. 42 kept their clean part, 262 were discarded. | ~1% stored | detected |
| 05 | Question-and-answer turns with no tool call were never indexed.One 7-minute stretch had lost 9 of 11 turns. | 9 of 11 lost | all indexed |
| 06 | Searching by meaning alone missed exact names.For a bare identifier, vectors recovered 0 of 17 occurrences, so word search and meaning search now run together. | 0 of 17 | 17 of 17 |
Four duties, all automatic.
The Secretary is a set of Claude Code hooks. You keep working as usual; it does its rounds.
Check-in
SessionStartThe latest handoff comes first, then the newest items and the end of the session you just left, word for word.
During the stay
PostToolUseEvery turn is indexed verbatim, screenshots included. Every 15 tool calls the conversation is summarized.
When you ask
UserPromptSubmit“Remember that…”, “forget…”, “do you remember…?” are caught and acted on before Claude replies.
Check-out
StopA handoff: what was done, what is broken or untested, the next step, the rules you repeated, the files touched.
( ∵ᴖ ᴗ ᴖ∵ ) Secretary █│ 56K/500K · Opus 5.5 medium · █░░░░ 12% ▒▓██░ 78% · work
The status line: a desk clerk who blinks, the context used against the trim limit, the model, and your plan usage.
Hand in hand with CodeIndex.
The Secretary remembers what was said; CodeIndex knows where every symbol lives. Install both and each one reads the other: nothing to configure, and without CodeIndex everything works as before.
( ∵◐ ᴗ ◐∵ ) CodeIndex ████████████████ 42% · Opus 5.5 medium
While CodeIndex indexes the project, it takes over the status line: its own face, its own bar.
- Handoffs name functions, not just files.
store/user-methods.js (changed: _loadUser, saveUser)tells the next session what each edit touched. - Recall by symbol. Ask about
saveUserand the search also finds the turns about the file that defines it. - One search engine. Both share the same full-text query helpers, so a lookup reads the same way in either tool.
The memory travels with the folder.
my-project/
├── src/
├── package.json
└── .claude/
└── the-secretary/
├── summaries.db every turn + index
├── bullets.md summaries
├── images/ screenshots
└── .gitignore *
- Inside the project. Copy or sync the folder and the next session there picks up the same memory.
- Never pushed by default. The folder ignores itself, so no repository commits your conversations.
- Kept past the 30 days. Claude Code deletes old transcripts; the index keeps them.
- One flat index. A fact, a note and a reminder are the same thing: found by what they say, not by a category.
Install at the front desk.
One script sets up the hooks, the skill, the dependencies and the model. It keeps an existing status line or config of yours.
Install a model backend
MLX on Apple Silicon, llama.cpp anywhere else. With a Claude Max subscription you can use the
claude_cliprovider and skip this.pip install mlx-lm # Apple Silicon brew install llama.cpp # any platform
Run the installer
The model is sized to your RAM and downloaded on first run.
git clone https://github.com/microbians/AI.SKILLS.git cd AI.SKILLS/plugins/secretary bash install.sh
Index past sessions (optional)
From each project root, backfill what Claude Code still has on disk. After that, every session start keeps it current.
node ~/.claude/the-secretary/summarize.mjs index-turns node ~/.claude/the-secretary/summarize.mjs index-vectors
Requirements
- macOS or Linux
- Node.js 18 or newer
- Claude Code CLI
- 1–15 GB of disk for the model, chosen by RAM (none with
claude_cli)
Search by meaning
- Optional. Needs a small Python venv with
mlx-embeddings. Without it, search stays literal and nothing breaks.
Uninstall
bash install.sh --uninstall