Your partner agent who learns as you work.
Leiter makes Claude Code learn your preferences automatically — no manual steps after installation. It quietly improves in the background over time.
Inspired by Joe Romano, who was inspired by Matt Greenfield's thread on the topic.
Here is an example of it learning:
brew install scode/dist-tap/leiterleiter claude install- Start a new claude session and run
/leiter-setupand follow the instructions. - If you did not enable auto-distillation during setup, remember to run
/leiter-distillevery now and then (once a day or so) to apply learnings from past sessions.
For more details, including if you cannot or do not want to use Homebrew, see docs/setup.md for the full setup guide.
Leiter maintains a "soul" — a markdown file in ~/.leiter/soul.md — which contains instructions for how the agent
should behave. The soul is updated based on distilling learnings from session logs (and can also be directly updated
when prompted to). You can think of the soul file as an auto-updating personal CLAUDE.md file. You can view it at any
time by running /leiter-soul.
Here's the TLDR of the mechanics:
- Session start: Your soul file is injected into the session as context, so the agent starts with your preferences already loaded.
- During the session: Just do what you normally do.
- During the session (OPTIONAL): You can directly trigger immediate soul updates by saying something like "Instill that I never want you to create a PR unless explicitly asked."
- Session end: The session transcript is automatically saved to a log directory under
~/.leiter. - Distillation: This refers to "distilling" the logs to extract learnings, and updating the soul. This can be
automatic or manual.
- If you chose auto-distillation during
/leiter-setup, leiter will periodically launch automatic distillation in a background agent after the first turn in a session. - Otherwise, or in addition to automatic distillation, you can run
/leiter-distillat any time to trigger immediate distillation.- NOTE: The current session is not capture during distillation because it has not yet been logged. If that is what
you want, first
/clearor exit claude and resume the session.
- NOTE: The current session is not capture during distillation because it has not yet been logged. If that is what
you want, first
- If you chose auto-distillation during
See docs/how-it-works.md for the full picture.
The quickstart above is all you need to use it. A little more details and guidance on whether to enable auto-distillation during setup is in docs/usage.md.
If you want to change your choices made during /leiter-setup, simply run /leiter-teardown followed by running
/leiter-setup again.
- Run
/leiter-teardownin a session. - Run
leiter claude uninstall. - Uninstall the binary (e.g.
brew uninstall leiter).
This will leave your soul intact, as well as any undistilled session logs in ~/.leiter. You are free to remove them if
you would like.
