dot_claude/skills/pkspec-maintenance/SKILL.md
Use when working on github.com/mizchi/pkspec, especially release readiness, version bumps, GitHub Actions/Nix release checks, adapter DSL work, or the experimental Playwright/Vitest coverage presets. Covers the repo's spec gates, pkfire release flow, pkl CLI dependency gotchas, and what is intentionally still experimental.
npx skillsauth add mizchi/chezmoi-dotfiles pkspec-maintenanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
pkspec is a Go CLI with Pkl schemas, a Nix package, a composite GitHub
Action, and experimental adapter coverage work. Prefer repo-local
contracts over ad hoc judgment: SPEC.pkl, examples, Pkl tests, Go
tests, and GitHub Actions are the release gate.
Use this checklist before releasing:
git status --short --branch
go run ./cmd/pkspec spec --next SPEC.pkl examples/*/Test.pkl
go run ./cmd/pkspec spec --orphans SPEC.pkl examples/*/Test.pkl
gh issue list --repo mizchi/pkspec --state open --limit 50
gh run list --repo mizchi/pkspec --branch main --limit 8
spec --next must report no outstanding implementation work.
Open issues are not automatically blockers. If the only open issue is
native adapter shim work, treat it as future enhancement unless the
user says otherwise.
Run the local release gate:
pkf run release-check
pkl test pkl/Test.test.pkl pkl/QuickCheck.test.pkl pkl/Adapter.test.pkl
go run ./cmd/pkspec spec --check --strict SPEC.pkl examples/*/Test.pkl
node --test experiments/adapter-coverage-presets/scripts/playwright-coverage.test.mjs
For a patch release, bump all fixed examples and release variables:
flake.nix: version = "X.Y.Z"Taskfile.pkl: local releaseVersion = "X.Y.Z"action.yml: example version strings in the version input docsREADME.md: install/action/tag examplesConfirm no old version remains:
OLD_VERSION=0.1.5
rg -n "${OLD_VERSION}|v${OLD_VERSION}" . --glob '!**/.git/**'
Use the actual prior version. Then commit:
git add README.md Taskfile.pkl action.yml flake.nix
git commit -m "Bump release version to X.Y.Z"
Use pkfire, not hand-written tag commands:
pkf run tag --version=X.Y.Z
This reruns release-check, checks the tree is clean, creates annotated
tag vX.Y.Z, pushes main, and pushes the tag. The Release workflow
then validates Nix on Linux/macOS and publishes the GitHub Release.
Watch the relevant runs:
gh run list --repo mizchi/pkspec --limit 10
gh run watch <release-run-id> --repo mizchi/pkspec --exit-status
gh release view vX.Y.Z --repo mizchi/pkspec
gh release list --repo mizchi/pkspec --limit 3
The main Action workflow may install the previous latest while the
release is still in progress; that annotation is not a failure if the
job succeeds.
Adapter definitions live in Pkl data, not a Go registry:
pkl/Adapter.pklpkl/adapters/*.pklpkspec adapter -f Adapter.pklexamples/adapter-protocol-smokeNative commands such as pkspec-adapter-vitest,
pkspec-adapter-playwright, pkspec-adapter-node-test,
pkspec-adapter-go-test, and pkspec-adapter-moon-test are tracked as
future shim work. Do not silently promote experimental shims to core.
Coverage preset experiments belong under:
experiments/adapter-coverage-presets/
The experimental Playwright coverage shim has fixture tests that do not require Playwright installation:
node --test experiments/adapter-coverage-presets/scripts/playwright-coverage.test.mjs
node experiments/adapter-coverage-presets/scripts/pkspec-adapter-playwright.mjs coverage \
--from-json experiments/adapter-coverage-presets/fixtures/playwright-coverage.json \
--coverage-kind js \
--coverage-kind css
pkl-go shells out to pkl. Generic Go CI does not install the Pkl CLI,
so adapter integration tests must skip when pkl is absent. Nix package
checks intentionally add pklNative through nativeCheckInputs, so the
same tests run for the Nix package. Preserve both sides:
cmd/pkspec/adapter_cmd_test.go skips if exec.LookPath("pkl") fails.flake.nix has nativeCheckInputs = [ pklNative ];.pkspec adapter -f examples/adapter-protocol-smoke/Adapter.pkl.data-ai
指定されたリポジトリ、複数リポジトリ、または GitHub organization から、ドメイン固有の専門用語、業界用語、社内・プロダクト用語、リポジトリ実装マップ、技術構成、オンボーディング向け Mermaid 構成図を抽出・生成するときに使う。ユーザーが「用語集を作る」「ドメイン辞書を作る」「オンボーディング資料にする」「repo/org を見て専門用語をまとめる」「AI が再確認しなくてよい知識ベースを作る」と依頼したら起動する。
development
Guide for writing MoonBit bindings to JavaScript using `extern "js"`. Use when adding FFI declarations against browser/Node/Deno APIs or npm packages, wrapping JS objects behind opaque types, bridging Promises with `async fn` and `Promise::wait()`, configuring `moon.pkg` exports for esm/cjs/iife output, or handling null/undefined at the JS boundary.
testing
技術記事の再現性 (読者が手元で再現できるか) を評価するスキル。subagent に「初見の読者として手元で再現を試みる」シミュレーションをさせ、足りない情報をリストアップさせる。記事ドラフトの最終チェック、または公開後フィードバック前の事前検証で使う。
development
タスク完了時に「最初に失敗した内容」と「最終的に通った解法」を対応付け、最初に知っておくべきだった知見を ast-grep ルール / skill / CLAUDE.md ルールのいずれかに言語化する。試行錯誤の末にたどり着いた解や、同じ落とし穴を将来の自分(または別エージェント)に繰り返させたくないときに使う。ユーザーから「今回の学びをルール化して」「skill にして」「lint に落として」と指示されたとき、またはタスク終了時に学びを棚卸しする場面で起動する。