accept dash-normalized package name prefix in skill names#10
Open
faithoflifedev wants to merge 1 commit into
Open
accept dash-normalized package name prefix in skill names#10faithoflifedev wants to merge 1 commit into
faithoflifedev wants to merge 1 commit into
Conversation
marcelomendoncasoares
requested changes
May 5, 2026
Contributor
marcelomendoncasoares
left a comment
There was a problem hiding this comment.
Hi @faithoflifedev!
Thanks for trying to fix this issue! There is, however, a fundamental flaw in the current approach, because it can generate conflicts between package and skill names. Maybe a '---' as separator between the package name and skill is safer in case the package has underscores in the name?
Comment on lines
46
to
+61
| @@ -53,10 +54,11 @@ class SkillScanner { | |||
| final skillMdFile = File(p.join(entity.path, 'SKILL.md')); | |||
| if (!await skillMdFile.exists()) continue; | |||
|
|
|||
| if (!skillName.startsWith(prefix)) { | |||
| if (!(skillName.startsWith(prefix) || | |||
| skillName.startsWith(prefixWithDashes))) { | |||
| stderr.writeln( | |||
| 'Warning: Skipping skill "$skillName" in ${package.name} ' | |||
| '-- name must start with "${package.name}-"', | |||
| '-- name must start with "$prefix" or "$prefixWithDashes"', | |||
Contributor
There was a problem hiding this comment.
This fix is actually dangerous because it becomes impossible to distinguish between the package name and the skill name. A skill named user-auth-login could legitimately belong to:
- A package named
user_authwith a skill namedlogin(becauseuser_authbecomesuser-auth-). - A package named
userwith a skill namedauth-login.
This would break the logic for managing the skills.
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.
resolves issue #9 - vs code linter does not accept underscore in skill names