Problem
skills/repo-sweep/scripts/skill-version.sh reads the version from ~/.claude/plugins/installed_plugins.json. When a plugin updates mid-session, that file names the new version while the session keeps running the skill it already loaded from the old cache directory.
Observed in the lint step of the .github hygiene sweep (melodic-software/.github#153):
toolchain:lint loaded from ~/.claude/plugins/cache/melodic-software/toolchain/0.13.16/skills/lint
skill-version.sh toolchain:lint printed toolchain:lint@0.13.17; both 0.13.16 and 0.13.17 were in the cache
- Commit
df02ccd carries Playbook-Step: toolchain:lint@0.13.17, and the PR checklist line says the same
The Playbook-Step trailer and checklist exist to record which skill version produced a step, and history.sh reads them to recommend reruns. A wrong version defeats both.
Proposed fix
Take the version from the skill that actually loaded. The Skill tool prints Base directory for this skill: <cache>/<plugin>/<version>/skills/<skill>, so next.md can pass that directory, or its version segment, to skill-version.sh. Fall back to installed_plugins.json only when no base directory is available. If the two disagree, report both.
Acceptance
- A step whose skill loaded from version N records
@N even after version N+1 installs mid-session.
Problem
skills/repo-sweep/scripts/skill-version.shreads the version from~/.claude/plugins/installed_plugins.json. When a plugin updates mid-session, that file names the new version while the session keeps running the skill it already loaded from the old cache directory.Observed in the
lintstep of the.githubhygiene sweep (melodic-software/.github#153):toolchain:lintloaded from~/.claude/plugins/cache/melodic-software/toolchain/0.13.16/skills/lintskill-version.sh toolchain:lintprintedtoolchain:lint@0.13.17; both0.13.16and0.13.17were in the cachedf02ccdcarriesPlaybook-Step: toolchain:lint@0.13.17, and the PR checklist line says the sameThe
Playbook-Steptrailer and checklist exist to record which skill version produced a step, andhistory.shreads them to recommend reruns. A wrong version defeats both.Proposed fix
Take the version from the skill that actually loaded. The Skill tool prints
Base directory for this skill: <cache>/<plugin>/<version>/skills/<skill>, sonext.mdcan pass that directory, or its version segment, toskill-version.sh. Fall back toinstalled_plugins.jsononly when no base directory is available. If the two disagree, report both.Acceptance
@Neven after version N+1 installs mid-session.