fix(skill): stop the fallback guard inverting under a plugin load #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/skill-fallback-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The loader substitutes ${CLAUDE_PLUGIN_ROOT} with a global regex over the whole SKILL.md body, so the prose explaining the unsubstituted case was rewritten too and the guard read as its own opposite. Rephrased against what the model can see, with an assertion that the token appears exactly once.
The loader substitutes ${CLAUDE_PLUGIN_ROOT} with a global regex over the whole SKILL.md body, so the prose occurrences explaining the unsubstituted case were rewritten too. Under a correct plugin load the guard read "if the literal characters /path/to/plugin are still sitting in the command above, this skill was not loaded as a plugin", which is always true: a working plugin told itself it was not one. It ran anyway only because the fallback resolves the same file. Phrase the guard against what the model can see (an absolute path versus a placeholder in braces) without writing the token a second time, and assert the token appears exactly once so the shape cannot come back.