Sync a plugin edit into the installed cache
Claude Code loads plugins from ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/,
not from your source clone. After editing the source you must copy the changed
file(s) into the cache (and ideally commit/push the source) for the change to take
effect. This is the loop, distilled from iterating on reflect-extensions.
The four steps
Given a source clone at $SRC (e.g. ~/prg/skills-akaihola), a marketplace name
$MP, plugin $PLUGIN, and version $VER:
Edit the source under
$SRC/$PLUGIN/...(the canonical copy).Copy to the cache. Find the live cache path and overwrite it:
CACHE="$HOME/.claude/plugins/cache/$MP/$PLUGIN/$VER" command cp "$SRC/$PLUGIN/commands/foo.md" "$CACHE/commands/foo.md"Use
command cpto bypass anycp -ialias. The cache mirrors the source layout (commands/,skills/,hooks/,scripts/, ...).Commit and push the source so the change is durable and shareable:
cd "$SRC" && git add "$PLUGIN/commands/foo.md" && git commit -m "..." && git pushBump the recorded SHA so Claude Code doesn't consider the cache stale or overwrite it on next update. Edit
~/.claude/plugins/installed_plugins.json, find the entry for$PLUGIN@$MP, and set itsgitCommitShato the newgit rev-parse HEAD.
Notes
- A restart (or
/reload-skills) is required for command/skill text changes to be re-read; new hooks/plugins need a full restart. - The cache may hold multiple versions (e.g.
4.0.2and4.0.3side by side). Edit the version Claude is actually loading — checkinstalled_plugins.jsonfor the activeversion/installPath. - For
!-injection command files, see the memory notecc-bang-injection-authoringfor authoring gotchas (bang-backtick runs in prose;(N)glob qualifier is ignored).