Agent Skills: Sync a plugin edit into the installed cache

>-

UncategorizedID: akaihola/skills-akaihola/sync-plugin-cache

Install this agent skill to your local

pnpm dlx add-skill https://github.com/akaihola/skills-akaihola/tree/HEAD/sync-plugin-cache

Skill Files

Browse the full folder contents for sync-plugin-cache.

Download Skill

Loading file tree…

sync-plugin-cache/SKILL.md

Skill Metadata

Name
sync-plugin-cache
Description
>-

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:

  1. Edit the source under $SRC/$PLUGIN/... (the canonical copy).

  2. 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 cp to bypass any cp -i alias. The cache mirrors the source layout (commands/, skills/, hooks/, scripts/, ...).

  3. Commit and push the source so the change is durable and shareable:

    cd "$SRC" && git add "$PLUGIN/commands/foo.md" && git commit -m "..." && git push
    
  4. Bump 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 its gitCommitSha to the new git 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.2 and 4.0.3 side by side). Edit the version Claude is actually loading — check installed_plugins.json for the active version/installPath.
  • For !-injection command files, see the memory note cc-bang-injection-authoring for authoring gotchas (bang-backtick runs in prose; (N) glob qualifier is ignored).