Skip to content

fix(plugin): point skills at the files the plugin installed - #439

Merged
TMHSDigital merged 1 commit into
mainfrom
fix/plugin-local-links
Oct 5, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
fix/plugin-local-links

Conversation

@TMHSDigital

@TMHSDigital TMHSDigital commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Closes #394.

What changed

scripts/build_plugin_dist.py (dist only; repo files and the GitHub view keep their links):

  • SKILL.md links become local. Links into snippets/, templates/, rules/, claude/ or skills/ become ${CLAUDE_PLUGIN_ROOT}/.... The Claude Code skills docs list ${CLAUDE_PLUGIN_ROOT} as "The plugin's installation directory. Substituted only in plugin skills."
  • Every other blob/main / tree/main link pins the release tag. The release builds the dist after VERSION is bumped and the tag is cut, so v{VERSION} exists when the link is published.
  • verify() errors on a ${CLAUDE_PLUGIN_ROOT} target missing from the dist, and on any surviving main link.
  • fingerprint() blanks /blob|tree/vX.Y.Z/, so the per-release tag does not defeat release: content fixes under docs: never reach plugin users, while site-only commits bump the plugin version #350's no-op detection.
  • Dist README note: Cursor does not expand the variable; read it as the clone root.

Evidence

Local build (live run):

  • 69 files, 0.29 MB, verify ok.
  • 30 local links rewritten, e.g. ${CLAUDE_PLUGIN_ROOT}/snippets/gltf_draco_export.py.
  • 30 links pinned to v0.143.14: 20 examples links, 9 in claude/blender-rules.md (a reference doc, not loaded skill content) and 1 docs link.
  • No /main/ link left.

Tests: tests/test_build_plugin_dist.py has 5 new cases (11 total, all pass):

  • the local and tag rewrites;
  • a full build verifies clean;
  • verify flags an injected missing target and an injected main link;
  • the fingerprint is equal across tags but changes when content changes.

Inspection only: Claude Code's expansion of the variable inside an installed plugin was not exercised; that relies on the docs.

🤖 Generated with Claude Code

The plugin ships rules/, snippets/ and templates/, but every skill linked
them on GitHub main. Reading a snippet needed the network, and a pinned
install read main's copy, which may no longer match its skill text.

build_plugin_dist.py now rewrites, in the dist only:
- SKILL.md links to snippets/, templates/, rules/, claude/ and skills/
  become ${CLAUDE_PLUGIN_ROOT}/..., which Claude Code substitutes in
  plugin skill content.
- Every other blob/main or tree/main link pins the release tag.

verify() fails the build when a ${CLAUDE_PLUGIN_ROOT} target is missing
from the dist or any main link survives. The fingerprint ignores the tag,
so a release with unchanged content still does not republish (#350).

Closes #394

Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TMHSDigital

Copy link
Copy Markdown
Owner Author

CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 141 passed, 3 skipped, 0 failed;136 passed, 7 skipped, 0 failed;143 passed, 1 skipped, 0 failed;143 passed, 0 skipped, 0 failed;

@TMHSDigital
TMHSDigital merged commit 9472f4c into main Oct 5, 2026
13 checks passed
@TMHSDigital
TMHSDigital deleted the fix/plugin-local-links branch October 5, 2026 02:31
@TMHSDigital

Copy link
Copy Markdown
Owner Author

Post-merge check: plugin-dist is now "plugin build v0.145.0 from f80411b". skills/ai-mesh-cleanup/SKILL.md there carries 7 ${CLAUDE_PLUGIN_ROOT}/... links, and git grep '/blob/main/\|/tree/main/' over the branch's Markdown finds nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

distribution: plugin skills link to GitHub main instead of the bundled files (use ${CLAUDE_PLUGIN_ROOT}); version skew and dead weight

1 participant