Skip to content

test: validate cross-skill references in skill files#59

Merged
mwbrooks merged 2 commits into
mainfrom
imporve-unit-tests
Jun 26, 2026
Merged

test: validate cross-skill references in skill files#59
mwbrooks merged 2 commits into
mainfrom
imporve-unit-tests

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds unit tests that enforce the cross-skill reference conventions documented in AGENTS.md, so skill authors get fast CI feedback when a reference drifts.

The new tests/unit/test_cross_skill_references.py checks every skill body for:

  • Real targets — every `plugin:skill` reference points at a skill that actually exists.
  • No anchor links — references must not use markdown [text](#anchor) links, which don't resolve in installed skills.
  • No bare file paths — references must not point at bare SKILL.md paths; use the backticked plugin:skill form instead.

Testing

  • make test-unit: all 12 unit tests pass (3 new).

🤖 Generated with Claude Code

Add unit tests that enforce the cross-skill reference conventions:

- references use the `plugin:skill` form and target a real skill
- no markdown anchor links (`[text](#anchor)`)
- no bare `SKILL.md` file paths

Derive the plugin namespace from the plugin manifest so the tests stay
in sync with the manifest, and document the conventions in AGENTS.md.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@WilliamBergamin WilliamBergamin requested a review from mwbrooks June 22, 2026 21:51
@WilliamBergamin WilliamBergamin added the test Improve of update the tests of this project label Jun 22, 2026
@WilliamBergamin WilliamBergamin self-assigned this Jun 22, 2026
@WilliamBergamin WilliamBergamin marked this pull request as ready for review June 22, 2026 21:53

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @WilliamBergamin! This is a very nice lint test to have!

🧪 I've manually tested by introducing invalid skill references and using markdown link references. Both work well!

@mwbrooks mwbrooks merged commit acf7fcd into main Jun 26, 2026
4 checks passed
@mwbrooks mwbrooks deleted the imporve-unit-tests branch June 26, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Improve of update the tests of this project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants