Skip to content
Trove

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
  1. First principles
  2. Commands
  3. Skills
  4. init
  5. remember
  6. recall
  7. index
  8. render
  9. query
  10. ship
  11. Hooks
  12. SessionStart
  13. SessionEnd
  14. trove.sh helper
  15. Tests
  16. Manifests
  17. File layout
  18. Validation
  19. Privacy

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 runs trove.sh init, which never overwrites existing files.
  • Project scope creates the three sections, renders the three skills and writes the AGENTS.md block, then suggests /trove:index to 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.md exists at the repository root, else user; runs init if neither exists).
  • Distills one atomic fact, routes it to conventions/, memory/ or context/, dedupes against the section’s INDEX.md, and writes entries/<slug>.md or .json.
  • Runs trove.sh guard on the written file. On a hit it rewrites the entry without the secret or runs guard --redact, and says so.
  • Adds a line at the top of the section’s INDEX.md, runs trove.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.md and the section indexes, greps the entries with trove.sh grep, reads the matching files in full, and answers with citations.
  • Flags conflicting or stale entries, suggests /trove:index when the context section looks stale, and offers /trove:remember when nothing matches.

index

  • Tools: Bash, Read.
  • Finds the engine: trove on PATH, else cargo run -p trove-cli -- inside a Trove checkout, else cargo run --manifest-path <trove>/Cargo.toml -p trove-cli -- --repo ..
  • Runs trove index (or index --full), then trove.sh context to rebuild the generated context entries and the <project>-context skill.
  • 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. Suggests trove.sh sync to refresh the codebase map too.

query

  • Tools: Bash, Read.
  • Runs cargo run -p trove-cli -- status, then cargo run -p trove-cli -- query "<intent>", with --budget if you give a context limit and --json for 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 .troveignore rules (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.md or entries are newer than its rendered skill, or whose skill is missing. This is the hook’s only write.
  • Then, for <repo>/.claude/trove and ~/.claude/trove, if the folder has an INDEX.md, prints a heading with the path and the number of .md and .json entries, 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:remember and /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:index after 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
  • --project means <repo>/.claude/trove and --user means ~/.claude/trove. With no flag, an existing project trove wins, else the user trove. init with no flag picks project scope inside a Git repository (or when TROVE_ROOT is set) and user scope elsewhere.
  • <repo> is $TROVE_ROOT, else the Git top level, else the current directory, so the script works from subdirectories.
  • grep searches the flat entries/ and every section, using the default resolution.
  • guard exits 1 on a possible secret and 2 on a missing file or no arguments. render with an unknown section, grep without a term and unknown commands print usage and exit 2.
  • context needs jq or python3.

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: trove
  • version: 0.2.0
  • license: MIT
  • repository: https://github.com/anishfyi/trove

.claude-plugin/marketplace.json:

  • name: velofy-trove
  • One plugin, trove, with source ./plugins/trove and category productivity.

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.