Fix consecutive-hyphen Skill name validation - #13
Merged
Merged
Conversation
Yong-yuan-X
marked this pull request as ready for review
September 18, 2026 15:05
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.
Summary
Closes #12
修复 Skill 名称静态检查遗漏连续连字符(
--)的问题。此前,
pdf--processing这样的名称能够通过检查,但 Agent Skills specification 明确规定 Skill 名称不能包含连续连字符。What changed
skills/skillhone/scripts/quality/static_check.py中的名称正则表达式,拒绝包含--的名称。.test/test_static_check_name.py回归测试:pdf--processing会报告invalid_name;pdf-processing仍然可以通过检查。Reproduction
使用名称和目录均为
pdf--processing的最小 Skill fixture 运行静态检查。修复前:
pdf--processing没有产生invalid_name;0结束。运行回归测试:
修复后,包含连续连字符的名称会被拒绝,单连字符名称仍然有效。
Validation and results
Command:
python .test/test_static_check_name.pyResult:
2/2 passedBefore → after:
pdf--processing从未报告错误变为报告invalid_nameCommands:
Result:
3/3 Skill directories passedCommand:
git diff --checkResult: passed
Command:
pnpm testResult: 受 Windows 环境差异影响,完整测试结果待维护者批准 GitHub Actions 后由 Ubuntu CI 进一步验证;本次修改相关的回归测试已
2/2 passed。Command:
gitleaks dir . --no-banner --redactResult: current PR contents passed with
0 findingsCommand:
gitleaks git . --no-banner --redactResult:
21 commits scanned,0 findingsEffect and limits
现在包含连续连字符的 Skill 名称会被静态检查拒绝,校验行为与 Agent Skills specification 保持一致。
本次修改仅收紧名称格式校验,没有改变其他 frontmatter 规则;合法的单连字符名称继续通过检查。
Review checklist
git diff --check.