feat: add a recall skill to the Claude Code plugin - #14
Merged
Merged
Conversation
The plugin moved a capture to the compaction boundary and gave the agent no way to use what was captured. skills/recall/SKILL.md is the in-session half: /gitmemory:recall, which Claude also loads on its own when the user refers to a decision, a rule or a conversation from before a compaction or an earlier session. It is the plugin form of the CLAUDE.md line in docs/USAGE.md, "Put it back in front of the agent", and needs no edit to the user's project. The description leads with when to use it, because a crowded skill listing truncates descriptions and a new skill is the first to lose its tail. The procedure is the CLI's, and every command, message and output shape in it was run against a throwaway store: recall and its -k, the no-index error and its exit 2, index as the rebuild, not a store and 0 generation(s) as the signs that nothing was captured, the 160-character text column, and the byte offset as the start of the turn's JSON line in a raw segment, which can run on into the next segment. The store the skill searches also captures the sessions that used it, so it holds the skill's own body, earlier recall commands and their output, and earlier answers. The skill names those echoes and skips them, and its example line carries a placeholder, not a sentence a search could find. It tells a subagent's transcript, which the watcher stores under its own name, from another session by the source_path in the manifest. It reads and rebuilds the index; it installs, configures and captures nothing, and it says that what it reads goes to the model provider with the rest of the conversation, past no redaction gate. plugin.json and marketplace.json stop describing the plugin as the hook alone. The version stays at 0.1.0, which the plugin test pins to pyproject.toml, so installed copies pick the skill up at the next release. Signed-off-by: doronp <3586743+doronp@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hook/README.md said the plugin "installs the hook and nothing else", and the README, USAGE.md and the changelog described it the same way. Each now names /gitmemory:recall and what it does not do: it captures nothing, so the watcher is still the whole of capture, and it writes nothing but the index. USAGE.md's "Put it back in front of the agent" gains the skill as the Claude Code alternative to the CLAUDE.md line. hook/README.md adds that the skill reads GITMEMORY_HOME from Claude Code's environment, as the hook does, and how to keep the skill while dropping a settings.json hook, since both at once fire the shim twice. The changelog records the skill under Unreleased; the 0.1.0 section is dated and stays as it was. Two things a user of the skill needs and would not guess. SECURITY.md and hook/README.md say that what the skill reads goes to the model provider past no redaction gate, since the design answer there was that raw/ stays on the machine and the gate stands at push. And the version is still 0.1.0, so a copy installed before the skill keeps its cache: measured with a throwaway CLAUDE_CONFIG_DIR, `claude plugin update` answers "already at the latest version (0.1.0)" and leaves no skills/, and uninstall then install brings it. hook/README.md and the changelog say so. Signed-off-by: doronp <3586743+doronp@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A renamed subcommand or flag in skills/recall/SKILL.md is not a stale sentence: it is an error the agent meets mid-answer. The new test in tests/test_docs.py asks argparse for the --help of every gitmemory command in the skill's code, the forbidden ones included, and looks for each flag it names in that help; it pins the query-truncation limit the skill quotes to index.MAX_TERMS, the skill's name to recall, the plugin's skills to that one directory with no manifest path adding another, and /gitmemory:recall to the three documents that tell you to type it. The messages the skill tells the agent to branch on are held to the CLI by running it on a path that is no store and on an empty one: the no-index error and its exit 2, not a store, 0 generation(s), and no matches on stderr with exit 0. Mutations of the skill were each run against it and each failed it: -k renamed, index renamed, --home renamed, --expose renamed, the term limit changed, the name changed, a forbidden command dropped, each of the four messages reworded, exit 2 changed, and a skills path added to plugin.json. The suite grows by one, so the counts the README and REPRODUCE.md state move with it: 1,027 on a fresh checkout, 1352 with the corpora cloned, and 1,027 + 328 is 1,352, not 1,355. All three were collected. Signed-off-by: doronp <3586743+doronp@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
doronp
force-pushed
the
feat/plugin-recall-skill
branch
from
October 2, 2026 05:58
12076f0 to
b03ca6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
gitmemory has been a Claude Code plugin since 0.1.0 (
gitmemory@gitmemory), but only as the hook shim, which triggers a capture at the compaction boundary. It gave the agent no way to get the captured words back inside a session. You had to pasterecalloutput yourself, or add a line toCLAUDE.md.This PR adds one skill to the existing plugin:
/gitmemory:recall. Claude loads it on its own when you refer to something from before a compaction or an earlier session ("what did we decide about X", "I told you not to…"). You can also run it with a topic:/gitmemory:recall retry loop. The skill:gitmemory recall "<topic>"and quotes each hit verbatim with its full address (agent/session/gNN@offset). It says so when a hit comes from another agent, session or project;gitmemory indexwhen the index is missing or older than what's being asked. That derived index is the only thing it writes;Its component comes from the default
skills/directory, so neither manifest needs a path.Commits
feat: add a recall skill to the Claude Code plugin:skills/recall/SKILL.md, plus the plugin and marketplace descriptions.docs: say the plugin ships the recall skill, not only the hook: README,hook/README.md(which said "installs the hook and nothing else"),docs/USAGE.mdandCHANGELOG.SECURITY.mdgets two additions: the skill joins the in-scope list, and a paragraph says what it reads goes to the model provider past no redaction gate, since the gate stands atpush.tests: hold the recall skill to the CLI it tells the agent to run: one drift test intests/test_docs.py.gitmemory …command in the skill must answer--help, including the ones it forbids, and every flag it names must appear in that help.0 generation(s), andno matches/ exit 0.MAX_TERMS, the skill's name, and/gitmemory:recallin the three docs that mention it.Heads-up: existing installs won't see it until a version bump
plugin.jsonstays at0.1.0, becausetest_hook.pypins it to thepyprojectversion. Claude Code keeps a cached copy until the version changes. Soclaude plugin updateon a 0.1.0 install reports it's current, and the skill arrives with the next release. Until then, uninstall and reinstall.hook/README.mdandCHANGELOGboth say this.Checklist
uv run pytest -qanduv run ruff check .pass locally: 1010 passed, 17 skipped, 1 deselected (the opt-in corpus test); ruff cleantests/mutate_index.pyrow. The drift test was run against mutations of the skill by hand, and each one failed it; the list is in the commit bodyAlso:
claude plugin validate --strict .passes, and a throwaway-CLAUDE_CONFIG_DIRinstall lists the skill.Review (Gemini 3.1 Pro + Claude)
🤖 Generated with Claude Code