mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-08-12 18:07:26 +02:00
The path fix has no regression guard: nothing in CI resolves references/ links, so all 18 were broken while CI stayed green. validate-artifact- paths.js is scoped to spec/plan/todo artifacts and says in its own header that it is not a general markdown path linter. Add validate-reference-links.js, which resolves every `references/*.md` link in skills/*/SKILL.md against that skill's own directory. This accepts both conventions in CLAUDE.md: shared checklists reached via ../../references/, and a skill's own colocated references/ directory. Scope stays narrow on purpose. Skills legitimately name paths that do not exist yet -- tasks/todo.md, PERF.md, docs/ideas/[idea-name].md -- and a general markdown linter would fail the build on them. A test pins that. Proven against the pre-fix tree: 18 error(s), exit 1, matching the 18 links fixed in the previous commit. After the fix: 0 error(s), exit 0. 7 unit tests cover the regression itself, colocated references/, markdown-link syntax, a renamed target, multiple violations in one skill, and the non-reference paths that must be ignored. Wired into the validate-skills job, alongside the other skill-content checks. Known limitation: fenced code blocks are not stripped, so a SKILL.md that documents the anti-pattern inside a fence would be flagged. Nothing does today. Sharing stripFencedCodeBlocks looks right once #444 lands. Refs #468 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
100 lines
2.6 KiB
YAML
100 lines
2.6 KiB
YAML
name: Test Plugin Installation
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
validate-skills:
|
|
name: Validate skill content
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Validate all skills
|
|
run: node scripts/validate-skills.js
|
|
|
|
- name: Validate manifest versions
|
|
run: node scripts/validate-versions.js
|
|
|
|
- name: Test manifest version validator
|
|
run: node --test scripts/validate-versions-test.js
|
|
|
|
- name: Test skill eval runner
|
|
run: node --test scripts/run-evals-test.js
|
|
|
|
- name: Run skill evals (trigger + routing)
|
|
run: node scripts/run-evals.js --min-rank1 80
|
|
|
|
- name: Validate references/ links in skills
|
|
run: node scripts/validate-reference-links.js
|
|
|
|
- name: Test reference-link validator
|
|
run: node --test scripts/validate-reference-links-test.js
|
|
|
|
validate-commands:
|
|
name: Validate command parity and description sync
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Validate commands across all tool directories
|
|
run: node scripts/validate-commands.js
|
|
|
|
- name: Test command validator
|
|
run: node --test scripts/validate-commands-test.js
|
|
|
|
- name: Validate spec/plan/todo artifact paths
|
|
run: node scripts/validate-artifact-paths.js
|
|
|
|
- name: Test artifact-path validator
|
|
run: node --test scripts/validate-artifact-paths-test.js
|
|
|
|
validate:
|
|
name: Validate plugin structure
|
|
needs: [validate-skills, validate-commands]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Claude Code
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Validate marketplace and plugin manifests
|
|
run: claude plugin validate .
|
|
|
|
test-install:
|
|
name: Test plugin installation
|
|
runs-on: ubuntu-latest
|
|
needs: validate
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Claude Code
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Configure git to use HTTPS
|
|
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
|
|
|
|
- name: Add marketplace
|
|
run: claude plugin marketplace add ./
|
|
|
|
- name: List marketplaces
|
|
run: claude plugin marketplace list
|
|
|
|
- name: Install plugin
|
|
run: claude plugin install agent-skills@addy-agent-skills --scope user
|