dist: make the skill installable as a Claude Code plugin #1
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: tests (Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # 3.9 is the lowest version the README claims. It has no 24.04+/26.04 | |
| # build in actions/python-versions, so pin it to an image that ships one | |
| # instead of relying on whatever ubuntu-latest currently points at. | |
| - python-version: "3.9" | |
| os: ubuntu-22.04 | |
| - python-version: "3.10" | |
| os: ubuntu-latest | |
| - python-version: "3.12" | |
| os: ubuntu-latest | |
| - python-version: "3.13" | |
| os: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run test suite | |
| run: python -m unittest discover -s tests -v | |
| plugin-manifest: | |
| name: validate plugin manifest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate JSON manifests | |
| run: | | |
| python - <<'PY' | |
| import json, pathlib, sys | |
| failed = False | |
| for path in sorted(pathlib.Path(".claude-plugin").glob("*.json")): | |
| try: | |
| json.loads(path.read_text(encoding="utf-8")) | |
| print(f"OK {path}") | |
| except Exception as exc: | |
| failed = True | |
| print(f"FAIL {path}: {exc}") | |
| sys.exit(1 if failed else 0) | |
| PY | |
| - name: Check SKILL.md frontmatter | |
| run: | | |
| python - <<'PY' | |
| import pathlib, sys | |
| text = pathlib.Path("SKILL.md").read_text(encoding="utf-8") | |
| if not text.startswith("---"): | |
| sys.exit("SKILL.md is missing YAML frontmatter") | |
| end = text.find("\n---", 3) | |
| if end == -1: | |
| sys.exit("SKILL.md frontmatter is not terminated") | |
| block = text[3:end] | |
| for key in ("name:", "description:"): | |
| if key not in block: | |
| sys.exit(f"SKILL.md frontmatter is missing '{key}'") | |
| print("SKILL.md frontmatter OK") | |
| PY |