Repository navigation
fix(skill-quality): align bundled scripts with the Agent Skills using-scripts checklist - #5493
Conversation
check-skill.sh: close stdin for skill script tests, cap the failing-test replay at 100 lines, replace the bash-internal usage error with a plain one, and document CHECK_SKILL_SKIP_MARKDOWNLINT in --help. check-listing-budget.sh and check-evals-quality.sh: name an unknown option instead of reporting a missing root or file. measure-invocation.sh: name a missing --method value, remove the score temp dir on every exit, and exit 2 for compare input and emit write errors. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y-scripts-checklist
…list fixes Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 065036618e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…aths Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Claude finished @kyle-sexton's task in 4m 48s —— View job Code review (
|
|
Claude finished @kyle-sexton's task in 2m 11s —— View job Security review (
|
Closes #5293
Summary
Audit of the five scripts in
plugins/skill-quality/scripts/against the eight-item scripts checklistfrom the Agent Skills "using scripts" guidance: (1) no interactive prompts, (2)
--helpas thediscovery surface, (3) actionable error messages, (4) structured stdout with diagnostics on stderr,
(5) idempotency, (6) dry-run, (7) meaningful exit codes, (8) output-size truncation. Each cell was
judged with a file:line basis and after a
git grepof every consumer of the script's stdout,stderr and exit codes. Nine violations are cheap and fixed here; four are expensive and listed below
for the owner. No PEP 723 or uvx runners are introduced (house position on #3615).
Verdict per script per item (
V-*ids link to the detail below; full basis for the passing cells isin the audit notes, summarized in the pinned-consumer list):
emit-plugin-evalwrites, into a new or empty directory, never overwrites)Pinned consumers checked before classifying anything:
scripts/check-changed-skills.sh:150-172(exit code,
--require-evals, fiveCHECK_SKILL_*env seams),scripts/check-all-skills-verb-contract.sh:19-24(greps
description/verb-contract mismatch),ci.ymlsteps for check-skill, check-listing-budget,check-evals-quality and
measure-invocation validate(exit codes only, the last threecontinue-on-error),scripts/check-summary-reader-parity.test.sh(wholeskill-frontmatter.shAPI),
skills/check/SKILL.mdand the plugin README (FAIL:/WARN:prefixes,CHECK-SKILL <name>:line,
N passed, M failedrollup,scoreJSON shape). The claude-config, docs-hygiene andclaude-ops surfaces only mention these scripts in comments.
Fix
Cheap violations (local, no pinned output line or exit code changed, tested in the existing suites):
check-skill.sh(check 7)*.test.shwith</dev/nullcheck-skill.test.shcheck-skill.shheader--helptext namesCHECK_SKILL_SKIP_MARKDOWNLINTcheck-skill.test.shcheck-skill.sh${1:?}prefix; exit 1 keptcheck-skill.test.shcheck-skill.sh(check 7)check-skill.test.shcheck-listing-budget.shunknown option; exit 2 unchangedcheck-listing-budget.test.shmeasure-invocation.shscore --methodwith no value has its own message; usage error points at--helpmeasure-invocation.test.shmeasure-invocation.shscoretemp dir removed by anEXITtrap, so theexitpaths no longer leavetmp.*behindmeasure-invocation.test.shmeasure-invocation.shcompareinput errors andemit-plugin-evalwrite errors return 2, the documented usage/environment code, instead of 1measure-invocation.test.shcheck-evals-quality.shunknown option; usage error points at--help; exit 2 unchangedcheck-evals-quality.test.shContract change: one observable change. V-MI3 moves
measure-invocation.sh compare(mismatched ormalformed reports) and
emit-plugin-eval(mkdir or write failure) from exit 1 to exit 2, which is whatthe script header already documents for usage and environment errors. Existing assertions on those paths
were "non-zero" only; no shell consumer reads them (
ci.ymlruns onlyvalidate). Every other fixchanges diagnostic text on an error path or adds behavior on a path that had none. The plugin is bumped
to 0.24.14 with a changelog entry.
Expensive violations (not fixed here; final call on each stays with the owner):
check-skill.sh:527-539,:2218-2221--format jsonrouted through one emitter forerr/warn/note, plus per-skill verdict and rollup objects. Findings (stderr) versus INFO/PASS/rollup (stdout) is already a consistent split; only a machine-readable mode is missing.SKILL.mdand README would document iterrbodies at:586,:1113,:1020need escaping, plus a root-mode wrapper and a new test group). Not worth doing until a consumer needs it.check-skill.sh:423,:592,:597; suite R9:4460-4474, cases 4 and 4bSKILL.md, matching the header's "2 = usage/env error"; update header, R9, cases 4/4b and the comment atcheck-changed-skills.sh:150-151check-changed-skills.sh(counts any non-zero as failed, so the gate still fails),skills/check/SKILL.md:108-121(says 1 =FAIL:lines), R9/4/4bcheck-skill.sh:366-371--quietprinting only FAIL/WARN lines, per-skill verdict and rollup. Root mode prints every skill's full block: 31 lines for two skills, about 5,000 forplugins/*/skills(307 skills).check-changed-skills.shruns per skill and could adopt itcheck-evals-quality.sh:124-132,:291--max-findings N: first N per severity plus a countVerification
bash scripts/affected-tests.sh --run: 48 shell suites passed or were skipped, 0 failed (includes the fourplugins/skill-quality/scripts/*.test.shsuites,check-changed-skills.test.sh,check-summary-reader-parity.test.sh). One selected suite is Python and outside that runner:python3 plugins/claude-ops/skills/audit-skill-visibility/scripts/test_audit_skill_visibility.pyran 162 tests, OK.bash scripts/check-changelog-parity.sh --check --check-order: pass;--check-bump origin/main: pass.bash scripts/validate-plugins.sh: all plugin manifests and the catalog validated.markdownlint-cli2 plugins/skill-quality/CHANGELOG.md: 0 issues.Related
🤖 Generated with Claude Code