mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 23:15:04 +00:00
stripFencedCodeBlocks matched fences with a single whole-document regex that only recognised a column-zero backtick fence closed by a run of exactly the same length. Three CommonMark-legal forms slipped through and their contents were linted as prose: tilde fences, fences indented one to three spaces, and closing fences longer than their opener. This is live on main today — spec-driven-development's list-nested examples use indented fences, so the linter has been reading their contents as skill text. Replace the regex with a line scanner that tracks the opener's marker and length, closes only on a same-marker run at least as long, treats an unterminated fence as running to end of file (so sections after it fail loud), and follows the CommonMark rule that a backtick fence's info string may not contain backticks. Stripped lines become empty lines so positions are preserved. Add unit coverage for each form plus CRLF input, and run scripts/lib/skill-lint-test.js in CI — it was the only test file the workflow did not execute. Revives the approach from #444 by @ujjwalks, which was approved and then closed after a rebase conflict. Closes #437
103 lines
2.7 KiB
YAML
103 lines
2.7 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: Test skill lint rules
|
|
run: node --test scripts/lib/skill-lint-test.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 95
|
|
|
|
- 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
|