fix(checks): suppress name-drift false positives for plugin-namespaced skill names#23
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
name-driftcheck compares a skill'sname:frontmatter field literally against the file base name and directory base name. Skills that use theplugin:skillnamespace convention (e.g.name: github:search) placed at the canonical pathgithub/search.mdalways fired a spuriousname-driftwarning because"github:search"matched neither"search"(fileBase) nor"github"(dirBase) under the existing comparison. This is a real false positive for any author following the namespacing convention described in the README FAQ.What
checkNameDriftinsrc/checks.tsto detect colon-separated plugin-namespaced names. When a name has the shapeprefix:local, the check also accepts the canonical split structure:dirBase == prefixANDfileBase == local. The original direct-match path is unchanged, so non-namespaced skills are unaffected.test/checks.test.tscovering: (1) no drift for a correctly splitgithub/search.mdwithname: github:search, and (2) drift still fires when the file and directory do not correspond to either part of the namespaced name.Tests
does not flag name-drift for a plugin-namespaced skill in canonical split structure- verifies the false positive is gone.flags name-drift for a plugin-namespaced skill when dir and file do not match either part- verifies the check still catches genuinely misplaced namespaced skills.Self-merge gate
Generated by Claude Code