Trove / Get started
Plugin quickstart
Create a project or personal trove in Claude Code, map the codebase, capture and recall a first entry, and watch it load in the next session.
On this page
This page assumes the plugin is installed and reloaded, as described in Installation. For the codebase map in step 2 you also need the trove binary on your PATH.
First principles
The plugin exists for the next session, not this one: its value is that what you teach Claude today is there tomorrow without asking. So the steps end by starting a new session. Before that, the trove has to exist (step 1), and its scope decides who shares it: a project trove travels with the repository through Git, a personal trove stays with you. The codebase map is generated from the code rather than written by hand (step 2), because a map you maintain by hand goes stale with the first refactor.
1. Create your trove
/trove:init
The scope depends on where you are:
- Inside a Git repository, the default is a project trove at
./.claude/trove/. It lives in the repository and is meant to be committed so the team and every agent share it. - Anywhere else, the default is a personal trove at
~/.claude/trove/. One trove that follows you across projects.
Pass the scope directly with /trove:init --project or /trove:init --user. Nothing existing is overwritten.
A project trove gets three sections, three rendered skills and an AGENTS.md block:
.claude/
├── trove/
│ ├── INDEX.md # links to the three sections
│ ├── conventions/INDEX.md + entries/
│ ├── memory/INDEX.md + entries/
│ └── context/INDEX.md + entries/
└── skills/
├── <project>-conventions/SKILL.md
├── <project>-memory/SKILL.md
└── <project>-context/SKILL.md
AGENTS.md # points Codex, Cursor and pi at the same files
<project> is the repository folder name in lowercase kebab case. A personal trove is simpler: an INDEX.md and a flat entries/ folder.
2. Map the codebase (project trove)
/trove:index
This runs trove index, then trove.sh context, which turns the engine output into generated entries in context/ (the architecture, one entry per subsystem and the key modules) and re-renders the <project>-context skill. Hand-written context entries are kept. Run it again after large structural changes.
3. Remember something
/trove:remember we use pgx and sqlc in Go services, not GORM
Or just say “remember this”. The skill:
- Distills the fact into one entry and checks the section’s
INDEX.mdfor an entry that already covers it. - Routes it: a rule for how code is written goes to
conventions/, a decision, gotcha or reference goes tomemory/, a hand-written map note goes tocontext/. - Writes
entries/<slug>.md(or.jsonfor structured data) and runs the secret guard on it. - Adds a line at the top of the section’s
INDEX.md, re-renders that section’s skill and confirms in one line.
In a personal trove, steps 2 and 4 skip the sections and the skill.
4. Recall it
/trove:recall what did we decide about the Go data layer?
Or ask “what do I know about X”. The skill reads the indexes, greps the entries, opens the matching files in full, and answers with citations to the entries it used. If nothing matches, it says so and offers to capture the new learning.
5. Start a new session
When the next session starts, the SessionStart hook:
- Re-renders any project trove skill whose entries changed since its last render, for example after a hand edit or a
git pull. - Prints the project trove index and the personal trove index into the context, with each section’s entry lines tagged
[conventions],[memory]or[context].
Claude starts aware of every entry title without loading every entry file. When a task touches one of the sections, Claude Code can load the matching skill, which inlines the entries themselves.
6. Commit the project trove
git add .claude/trove .claude/skills AGENTS.md
git commit -m "Add project trove"
Teammates and other agents get the same memory from the repository. Keep .trove/, the engine index, out of Git.
Optional: more commands
/trove:query <task>retrieves layered context from the engine index before editing./trove:renderre-renders the skills after you edit entries by hand./trove:shipbuilds handoff docs from the project and its trove with private details removed. See Handoff docs with trove ship.
Next steps
- Project troves covers sections, routing, rendering and the secret guard.
- Personal trove covers the entry format and what is worth saving.
- Plugin reference lists the skills, hooks and scripts.