Purpose
Static, deterministic quality gate for skill authoring. The check action runs the bundled
check-skill.sh. Thirty checks with no model invocation, so results are reproducible in CI or a
pre-commit hook. The validate-evals action checks a skill's existing <skill>/evals/evals.json
(new evals are case.yaml suite cases, which /evals:validate (if enabled) checks) against the bundled JSON
schema, then runs the bundled check-evals-quality.sh, a deterministic eval-quality lint
(duplicate case ids/names, missing fixtures, empty or vague grading criteria, set-coverage
warnings) that goes beyond structure without ever running a model-graded eval. The listing-budget action runs check-listing-budget.sh, a separate, always-advisory
report on the shared listing budget every loaded skill draws from together (a different, cross-skill
limit from check's per-skill entry cap). The measure-invocation action runs
measure-invocation.sh, a repeatable probe harness that scores whether a skill's listing text
would win the requests it should.
Skills-directory resolution
The checker never assumes a repo layout (convention-resolution ladder). It resolves the skills root in
this order. First hit wins:
${user_config.skills_root}. Set it when your skills live outside.claude/skills(run
/skill-quality:setup to configure).
${CLAUDE_PROJECT_DIR}/.claude/skills. The conventional default.
The skill passes the resolved root to the script via the CHECK_SKILL_SKILLS_ROOT environment
variable. When skills_root is configured, export it before invoking the script:
CHECK_SKILL_SKILLS_ROOT="${user_config.skills_root}" \
bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-skill.sh" <skill-name>
When it is unset, invoke the script plain. It falls back to ${CLAUDE_PROJECT_DIR}/.claude/skills.
Gating a marketplace-installed skill. A plugin:skill name (e.g. source-control:setup) is
not auto-resolved: the checker resolves a bare skill name under one root and does not walk Claude
Code's plugin cache to locate an install. More than one installed version can be on disk at once,
and the checker will not guess which one you mean. To gate an installed skill, point the root at
the skills dir of the installed version you mean:
- Pointer: when locating an installed version on disk, or judging which versions stay there,
fetch <https://code.claude.com/docs/en/plugins/loading#find-plugins-on-disk> and
<https://code.claude.com/docs/en/plugins/loading#cleanup-of-previous-versions> live.
CHECK_SKILL_SKILLS_ROOT=<installed-version-dir>/skills \
bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-skill.sh" <skill-leaf-name>
The cache is a copy, not a git checkout, so the git-backed checks (3 trigger-preservation, 8
vendor byte-identity, 9 stale-metadata, 13 committed-artifact scan) no-op against it. A "new skill /
skipped" result is expected there, not a defect. Passing a plugin:skill name unresolved prints
guidance to this effect.
Arguments
Parse $ARGUMENTS:
check <skill-name>(default action). Run the static contract gate over one skill.check(no name). Run the gate over every skill under the resolved root.check <root> [<root> ...]. Run the gate over every skill under each given root, grouped
per root with a N passed, M failed rollup (e.g. every plugin's skills dir in a marketplace
repo). Every root given must exist, and must be a skills root rather than a skill directory
holding its own SKILL.md; either mistake exits 2 naming the argument. A root that exists but
holds no skills is named and is not an error. A skill name and a root cannot be mixed in one
call. A bare argument that resolves as a skill under the already resolved root is always read as
that skill, never as a root, so a relative root whose name collides with an existing skill has to
be written with a path separator (./<name>) or as an absolute path.
validate-evals <skill-name>. Validate one skill's<skill>/evals/evals.jsonagainst the schema.validate-evals(no name). Validate every skill's<skill>/evals/evals.jsonthat exists.listing-budget(no root). Report the shared listing-budget estimate over every
listing-eligible skill under the resolved root.
listing-budget <root> [<root> ...]. Pool every listing-eligible skill under each given root
into one shared aggregate (e.g. every plugin's skills dir in a marketplace repo). Every root given
must exist.
measure-invocation(defaultvalidatethenscore). Run the description-invocation
probe harness. See Action: measure-invocation.
Action: check
- Resolve the skills root (above). If the directory does not exist, report it and offer
/skill-quality:setup.
- For a named skill, run:
```shell
bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-skill.sh" <skill-name>
```
For no name, pass the resolved root itself rather than enumerating by hand. The script walks
every immediate subdirectory holding a SKILL.md, runs the gate once per skill, prints a
header per root and ends with the rollup:
```shell
bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-skill.sh" <resolved-root>
```
To gate several trees in one run, pass each root: check-skill.sh <root> [<root> ...].
- Report per skill:
- PASS / FAIL / INCOMPLETE from the script's exit code (0 = pass, 1 = one or more
FAIL:
lines, 3 = no failure, but a deadline left script tests unrun, each named on a SKIP line; that
is not a pass). In root mode that exit code is the aggregate over every skill, so the per-skill
verdict is that skill's own CHECK-SKILL <name>: PASS, CHECK-SKILL <name>: FAIL or
CHECK-SKILL <name>: INCOMPLETE line instead.
- The
FAIL:lines verbatim (each is an actionable defect). A description/verb-contract polarity
mismatch is a FAIL that blocks; fix it by correcting the listing, or use --fix in the
description as the compliant override.
WARN:lines grouped after failures (advisory: a trigger phrase dropped or moved vs the
base ref, missing gotchas surface, action-router without evals, orphan
spokes, an injection with no shell: whose commands only look portable, an injected
command carrying no || <fallback>, same-context judgment language with no fresh-eyes
declaration or a stale exemption directive). A dropped-trigger warning is a review item: confirm the description still names
the intent each dropped phrase carried, or restore the phrase.
- For a multi-skill run, the script prints the rollup
N passed, M failed, and when a deadline
left script tests, one more line after it counting those skills, which are in neither number.
Surface both verbatim. The action is complete when every FAIL: and SKIP line and the rollup
are reported.
The FAIL: messages are self-describing. Do not re-derive their meaning; surface them and, when the
user asks, fix the cited skill. A broken-internal-ref FAIL points at a SKILL.md:<line>. Hand-verify
that line before editing, since it may be an illustrative example path rather than a real broken ref.
Action: validate-evals
This action reads only the skill-creator JSON file a skill may still carry. A skill's new evals
are case.yaml cases in its plugin's evals/ directory: /evals:design skill <name> (if enabled) writes them
and /evals:validate (if enabled) checks them. Point an author adding evals there. Under `check
--require-evals, check 14 passes a skill with no JSON file when a case in its plugin's evals/`
lists the skill's directory name in a one-line tags: [...].
- Locate
<skills-root>/<skill-name>/evals/evals.json. If absent, report that the skill ships no
skill-creator file (not a failure) and that its suite cases, if any, belong to /evals:validate (if enabled).
- Read the bundled schema at