Trove / Reference
Plugin reference
The Trove Claude Code plugin's commands, seven skills, hooks, trove.sh helper commands, manifests and file layout, as they are in plugins/trove on main.
On this page
The plugin lives in plugins/trove and is listed by the marketplace file .claude-plugin/marketplace.json at the repository root. This page describes the current main branch.
First principles
The plugin splits judgment from mechanics. Deciding what is worth remembering, how to phrase it and which section it belongs in needs judgment, so that lives in skills: instructions Claude follows. Creating folders, rendering skills, refreshing the context section and scanning for secrets must give the same result every time, so that lives in trove.sh and the trove binary, which the skills call. The hooks are kept small and always exit 0, because a memory aid that can break a session start costs more than it saves.
Commands
Plugin skills are namespaced by the plugin name, so each skill is a /trove:<skill> command.
| Command | Argument | What it does |
|---|---|---|
/trove:init |
[--project|--user] |
Scaffold a trove |
/trove:remember |
[the thing to remember] |
Capture one entry |
/trove:recall |
[what to recall] |
Search and answer with citations |
/trove:index |
[--full] |
Index the repo, refresh context |
/trove:render |
[section|all] |
Re-render the skills |
/trove:query |
[natural language query] |
Layered retrieval |
/trove:ship |
[--format ...] [--out DIR] |
Redacted handoff docs |
The skills also trigger on intent, without the command. Saying “remember this”, “what do I know about X” or “index this repo” fires the matching skill.
Skills
Each skill is a SKILL.md file of instructions that Claude follows. allowed-tools limits the tools each one may use. In the skills, the helper script is "${CLAUDE_PLUGIN_ROOT}/scripts/trove.sh".
init
- Tools:
Bash,Read,Write,Edit. - Picks project scope (
./.claude/trove, the default inside a Git repository) or user scope (~/.claude/trove, the default elsewhere) and runstrove.sh init, which never overwrites existing files. - Project scope creates the three sections, renders the three skills and writes the
AGENTS.mdblock, then suggests/trove:indexto fill the context section. - Defines the Markdown and JavaScript Object Notation (JSON) entry formats the other skills use. See Personal trove.
remember
- Tools:
Bash,Read,Write,Edit. - Resolves the trove (project if
./.claude/trove/INDEX.mdexists at the repository root, else user; runsinitif neither exists). - Distills one atomic fact, routes it to
conventions/,memory/orcontext/, dedupes against the section’sINDEX.md, and writesentries/<slug>.mdor.json. - Runs
trove.sh guardon the written file. On a hit it rewrites the entry without the secret or runsguard --redact, and says so. - Adds a line at the top of the section’s
INDEX.md, runstrove.sh render <section>for a project trove, and confirms in one line. - Never writes into generated context entries (front matter
generated: trove-index).
recall
- Tools:
Bash,Read,Grep. It has no write tools. - Reads
INDEX.mdand the section indexes, greps the entries withtrove.sh grep, reads the matching files in full, and answers with citations. - Flags conflicting or stale entries, suggests
/trove:indexwhen the context section looks stale, and offers/trove:rememberwhen nothing matches.
index
- Tools:
Bash,Read. - Finds the engine:
troveonPATH, elsecargo run -p trove-cli --inside a Trove checkout, elsecargo run --manifest-path <trove>/Cargo.toml -p trove-cli -- --repo .. - Runs
trove index(orindex --full), thentrove.sh contextto rebuild the generated context entries and the<project>-contextskill. - Reports the counts and the skill path, and optionally runs
import-historical.
render
- Tools:
Bash,Read. - Runs
trove.sh render all, or one section, and reports which skills changed. Suggeststrove.sh syncto refresh the codebase map too.
query
- Tools:
Bash,Read. - Runs
cargo run -p trove-cli -- status, thencargo run -p trove-cli -- query "<intent>", with--budgetif you give a context limit and--jsonfor structured output. - Because it calls Cargo with
-p trove-cli, it only works as written inside a clone of the Trove repository.
ship
- Tools:
Bash,Read,Write,Edit. - Finds the engine the same way as
index, previews with--dry-run, proposes.troveignorerules (asking before it edits the file), ships in the format you choose, reads the output, and reports the path, counts and report file. - Never quotes leftover private details back in chat; it points to the file and line.
Hooks
Defined in hooks/hooks.json. Both run through ${CLAUDE_PLUGIN_ROOT} and always exit 0, so they never fail a session.
SessionStart
- Matcher:
startup|resume. - Runs
scripts/load-trove.sh. - Uses the Git top level (or the current directory) as the repository.
- First re-renders any project trove section whose
INDEX.mdor entries are newer than its rendered skill, or whose skill is missing. This is the hook’s only write. - Then, for
<repo>/.claude/troveand~/.claude/trove, if the folder has anINDEX.md, prints a heading with the path and the number of.mdand.jsonentries, the index, and each section’s entry lines tagged[conventions],[memory]or[context]. - When at least one trove exists, the output starts with an instruction to consult it and to use
/trove:rememberand/trove:recall, plus a pointer to the section skills for a project trove. When none exists, it prints nothing.
SessionEnd
- Matcher:
.*. - Runs
scripts/reflect-trove.sh. - Prints a reminder to capture durable decisions, gotchas, conventions or architectural lessons with
/trove:remember, and to run/trove:indexafter structural changes. - Read-only.
trove.sh helper
A dependency-free Bash helper for the mechanical parts, also usable without the plugin.
T=plugins/trove/scripts/trove.sh
bash $T path [--user|--project] # print the resolved trove folder
bash $T init [--user|--project] # scaffold a trove (project scope gets sections)
bash $T list [--user|--project] # print the index and section indexes
bash $T grep <term> # case-insensitive search of entries
bash $T route <type> # print the section for an entry type
bash $T guard [--redact] <file>... # scan files for secrets (exit 1 on a hit)
bash $T render [section|all] # sections -> .claude/skills/<project>-<section>/SKILL.md
bash $T context # .trove/ engine output -> context section and skill
bash $T sync # context (when indexed), then render all
bash $T agents # write the AGENTS.md block
bash $T project # print the project skill prefix
--projectmeans<repo>/.claude/troveand--usermeans~/.claude/trove. With no flag, an existing project trove wins, else the user trove.initwith no flag picks project scope inside a Git repository (or whenTROVE_ROOTis set) and user scope elsewhere.<repo>is$TROVE_ROOT, else the Git top level, else the current directory, so the script works from subdirectories.grepsearches the flatentries/and every section, using the default resolution.guardexits 1 on a possible secret and 2 on a missing file or no arguments.renderwith an unknown section,grepwithout a term and unknown commands print usage and exit 2.contextneedsjqorpython3.
See Project troves for what render, context and guard do, and the environment variables they read.
Tests
bash plugins/trove/tests/render.test.sh
The script tests init, render, guard, context and the SessionStart re-render in throwaway Git repositories, with HOME pointed at a temporary folder. It needs Bash, Git and core utilities. When jq or python3 is present it runs the context cases once per reader, and when target/debug/trove is built it also runs the engine end-to-end checks. Continuous integration runs it on pushes to main and on pull requests.
Manifests
plugins/trove/.claude-plugin/plugin.json:
name:troveversion:0.2.0license:MITrepository:https://github.com/anishfyi/trove
.claude-plugin/marketplace.json:
name:velofy-trove- One plugin,
trove, withsource./plugins/troveand categoryproductivity.
File layout
plugins/trove/
├── .claude-plugin/plugin.json
├── hooks/hooks.json
├── scripts/
│ ├── load-trove.sh # SessionStart
│ ├── reflect-trove.sh # SessionEnd
│ └── trove.sh # helper commands
├── skills/
│ ├── init/SKILL.md
│ ├── remember/SKILL.md
│ ├── recall/SKILL.md
│ ├── index/SKILL.md
│ ├── render/SKILL.md
│ ├── query/SKILL.md
│ └── ship/SKILL.md
└── tests/render.test.sh
Validation
The engineering design document, ENGINEERING.md (now marked historical), names claude plugin validate ./plugins/trove and claude plugin validate . as the schema checks for the plugin and the marketplace.
Privacy
There is no telemetry. The hooks print text, and the SessionStart hook re-renders stale skill files in the repository; neither makes network calls. Network access happens only when you ask for it: trove ask with the anthropic or ollama provider, a cmd provider command you configure, or trove ship --agent, which runs a local agent command line tool.