Repository navigation
checks: enforce skill link hygiene in check_skills.py - #225
Merged
sreejithraman merged 2 commits intoNov 22, 2026
Merged
sreejithraman merged 2 commits into
sreejithraman merged 2 commits into
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.
Summary
Layer 4 of Stack #226 (on top of #224): locks skill link hygiene into deterministic CI checks in
scripts/check_skills.pywith TDD unit tests inscripts/test_check_skills.py.scripts/check_skills.py: for Markdown files underskills/<name>/, parsed local hyperlinks (excluding images, external URLs, and root-relative paths) now fail CI on:#anchorjump-links and self-path links).SKILL.md(catching../SKILL.md,../../SKILL.md,SKILL.md#section, etc., while permitting cross-skill links to other skills'SKILL.md).?query, and decoded#fragmentso distinct section anchors or query strings into one target remain allowed).missing link targetcleanly without crashing or double-reporting.scripts/test_check_skills.py: adds 5 unit tests covering same-file links (including nestedreferences/*.md), own-SKILL.mdvs cross-skill links, duplicate links (path normalization and percent-encoded anchors) vs allowed exceptions (distinct section anchors, distinct query strings, duplicate external URLs, duplicate image embeds), missing targets and symlink loops, and unrestricted root docs (README.md).Evidence
scripts/test_check_skills.py(14/14 tests passing).python3 scripts/check.pypasses across all 63 skills (Checked 63 skills, local Markdown paths/anchors, and skill link hygiene. Ran 557 tests across 25 files).review-fix-loop(sreestack-link-hygiene-gate, 3 passes, Wave 2 Adversarial probed edge cases in scratch repo, Pass 3 Final Primary APPROVE) stamped on6420bcc1.Merge Danger
Low and reversible (checker and test files only). Enforces rules only inside
skills/<name>/Markdown files; root documentation (README.md,SOURCES.md,AGENTS.md) keeps unrestricted#anchorand duplicate link behavior.