Repository navigation
feat(skill-quality): actionable guidance for gating a marketplace-installed skill - #1167
Conversation
…talled skill The `check` action resolves a bare skill name under one skills root and had no path for a marketplace-INSTALLED skill: `check plugin:skill` (or any name that lives only in the plugin cache) fell back to the project's .claude/skills and reported a bare "Skill not found", so the operator had to already know to set CHECK_SKILL_SKILLS_ROOT. - A plugin:skill argument now prints exactly how to run the gate against the install (point CHECK_SKILL_SKILLS_ROOT at the cache skills dir) plus the note that the cache is a COPY, not a git checkout, so the git-backed checks (3/8/9) no-op there — a "new skill / skipped" result is expected. - A missing bare name now names the CHECK_SKILL_SKILLS_ROOT remedy. - SKILL.md documents the installed-skill resolution path. - Tests cover both messages. Deliberately NO cache-layout reverse-engineering: the sub-layout <marketplace>/<plugin>/<version>/skills is undocumented and version-dir churns every update, and skill-quality is repo-agnostic — the target root stays operator-provided. First-class installed-skill resolution is deferred to #1166. Re-scope: the originating report (#1152) is partly falsified. It claimed the cache "IS a git checkout of the marketplace repo, so HEAD exists" and asked to wire check 3 to it. Docs say Claude Code COPIES marketplace plugins into ~/.claude/plugins/cache ("rather than using them in-place") and the on-disk cache has no .git — so check 3's "new skill / skipped" on a cache path is correct behavior, not a bug, and is not "fixed". skill-quality 0.10.0. Closes #1152 Co-Authored-By: Claude Fable 5 <[email protected]>
|
Claude finished @kyle-sexton's task in 2m 21s —— View job Code Review
The re-scope rationale is sound — the "cache IS a git checkout" claim in the audit report is falsified by both the docs and on-disk evidence, and the decision not to auto-resolve the internal check-skill.shMinor — indentation inconsistency in the multiline Both continuation lines should use a consistent indent (2 or 4 spaces). Fix this → Permalink: Observation — inline comment block weight. Logic correct. Leaf extraction via check-skill.test.shThe new tests are well-placed and cover the right paths. Test 4a confirms the Minor observation — test 4b's leaf assertion is somewhat loose. Permalink: Style cleanup in the SKILL.mdDocumentation is clear, accurate, and correctly emphasizes the "copy, not a git checkout" property. The example command uses CHANGELOG.mdCosmetic — two consecutive blank lines at the end of the 0.10.0 scope-note paragraph (lines 30–31). Keep a Changelog's format doesn't require them; a single blank line before the next bullet is standard. Permalink: The scope note is appropriate to include — the falsification of the audit finding is load-bearing context for anyone who reads this entry and then looks at plugin.jsonMinor bump to SummaryThe change is correct, well-scoped, and ships with appropriate test coverage and documentation. Two cosmetic fixes (indentation in the |
|
Claude finished @kyle-sexton's task in 2m 2s —— View job Security Review
Finding 1 — SUGGESTION · Confidence: MediumUnquoted user-supplied value echoed in a copy-paste example command leaf="${SKILL_NAME##*:}"
err "Skill not found: '$SKILL_NAME'. …
CHECK_SKILL_SKILLS_ROOT=~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/skills bash check-skill.sh $leaf
…"
A user who blindly pastes the error message would execute the injected payload. Mitigating factors that keep this at SUGGESTION rather than IMPORTANT:
Fix: wrap safe_leaf="${leaf//\'/\'\\\'\'}" # escape embedded single quotes
err "… bash check-skill.sh '$safe_leaf' …"Or use err "… bash check-skill.sh $(printf '%q' "$leaf") …"No other security issues foundThe remaining changes are safe:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d84b3d103
ℹ️ 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".
…ty fixes
- CHANGELOG: restore the `## [0.9.0]` section header the 0.10.0 edit
accidentally consumed (the check-3 move-exception entry had merged under
0.10.0); also clears the MD012 consecutive-blank hygiene failure.
- plugin:skill guidance: point the rerun command at
${CLAUDE_PLUGIN_ROOT}/scripts/check-skill.sh (Codex P2 — a bare
check-skill.sh isn't on PATH from a consumer project cwd).
- plugin:skill guidance: %q-escape the suggested leaf (Codex P2 — a
malformed name whose leaf carries shell syntax must not become an
executable substitution when the operator pastes the command).
- Tests: assert the PLUGIN_ROOT-anchored command form and leaf paste-safety.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Claude finished @kyle-sexton's task in 2m 23s —— View job Code Review
The fixup commit (
Still open from the first review cycleCosmetic — indentation inconsistency in the multiline The command line and the prose sentence following it use different leading whitespace inside the double-quoted Permalink: Align both continuation lines to the same indent (2 or 4 spaces). Fix this → Minor — test 4b's leaf assertion is still loose. grep -q 'setup' <<<"$out"This passes if grep -qF 'check-skill.sh setup' <<<"$out"Permalink: Low risk in practice (the error message is short and controlled), but worth tightening. Fix this → Everything else is correct
Two cosmetic items (indentation, loose grep) before merge; no correctness or security issues. |
|
Claude finished @kyle-sexton's task in 2m 8s —— View job Security Review
The two security issues previously flagged (bare Leaf injection — RESOLVEDq_leaf=$(printf '%q' "${SKILL_NAME##*:}")
err "… bash \"${CLAUDE_PLUGIN_ROOT}/scripts/check-skill.sh\" $q_leaf …"
Test 4c exercises this directly: passes
|
| Surface | Verdict |
|---|---|
err() format string — printf 'FAIL: %s\n' "$*" |
Fixed format literal; $* is data argument. No format-string injection. |
$SKILL_DIR in else-branch message |
Display-only via printf '%s'. No execution. |
git -C "$SKILL_DIR" rev-parse (L128) |
Path comes from $SKILLS_ROOT/$SKILL_NAME; a : in SKILL_NAME produces a non-existent path, which the [[ ! -d "$SKILL_DIR" ]] guard catches before any git invocation. |
Test 4c run 'x:$(touch pwn)' |
Argument is passed as "$@" → "$1" → SKILL_NAME assignment. ${SKILL_NAME##*:} is a parameter expansion, not a subshell — the $(touch pwn) token is never executed. |
SKILL.md, CHANGELOG.md, plugin.json |
Documentation and version bump only; no executable surface. |
No security issues found in current HEAD
|
Pre-merge CI classification — all required checks green, 0 failing / 0 pending.
Scope note carried from the PR body: the originating report (#1152) is partly falsified — the plugin cache is a documented COPY, not a git checkout, so check 3's "new skill / skipped" on a cache path is correct behavior, not a bug. First-class installed-skill resolution deferred to #1166. Merging per the standing drive-to-MERGED directive. |
…rd injection-block decision (#1173) ## Summary Resolves the F3 finding from inbox item `20260723-090435-melodic-session-plugins-audit` **as a re-scope: the finding is a measurement artifact, verified three ways.** Reviewers should read the re-scope before the diff. **F3's premise ("2 of 3 marketplace skills fail the marketplace's own gate → the gate isn't in CI") is false in this repo:** 1. **The CI gate already exists.** `skill-quality-gate` (`.github/workflows/ci.yml`) runs `check-changed-skills.sh origin/$BASE_REF` on every PR, invoking the skill-quality checker over each changed skill. The "run the gate in CI over changed skills" ask was already satisfied. 2. **Skill markdown IS gated in CI — by the hygiene lane, under repo config.** `check-changed-skills.sh` deliberately skips markdownlint (`CHECK_SKILL_SKIP_MARKDOWNLINT=1`, documented division of labor); the hygiene lane lints all repo markdown incl. SKILL.md under `.markdownlint-cli2.jsonc`. (It caught a real MD012 on PR #1167 this session.) 3. **`planning:interview` passes under repo config** — `skill-quality:check interview` with the repo's config → **0 errors, 2 warnings** (264-line hub soft-cap; no `Use when:` phrasing). The producer's MD041/MD013/MD060 FAILs are exactly the rules `.markdownlint-cli2.jsonc` disables — i.e. from linting without repo config. **What ships (doc-only):** a `check` SKILL.md gotcha that encodes the deliberate decision the report asked for and prevents the recurring false alarm: - Check 6 (markdownlint) defers to the consuming repo's markdownlint config, discovered from the cwd. Running from outside the repo, or against a plugin-cache install (no config), applies markdownlint DEFAULTS → spurious MD013/MD041/MD060 on skills that pass in-repo. This is the usual "shipped skill fails the gate" report. - **Injection blocks are not special-cased**: a declared `shell:` block with long lines is MD013-subject like any content; whether it fails is the consumer markdownlint config's call, never overridden by this gate. - Documents this marketplace's CI division of labor (skill-quality gate skips markdownlint; hygiene lane lints markdown under repo config). **Deferred (noted, not bundled):** the two advisory WARNs on `planning:interview` (264-line hub → progressive-disclosure split; add `Use when:` phrasing) are real but optional, live in a different plugin, and a description edit risks trigger drift. Left for planning-plugin maintenance; happy to file if wanted. skill-quality **0.10.1** (doc-only; no behavior change). ## Test plan - [x] Repro: `CHECK_SKILL_SKILLS_ROOT=plugins/planning/skills check-skill.sh interview` from repo root → PASS (0 errors, 2 warnings) — confirms the producer's FAILs were a wrong-config artifact. - [x] Self-check: `skill-quality:check check` PASS (0 errors, 0 warnings); SKILL.md 141/500 lines. - [x] `markdownlint-cli2` (repo config) clean on both changed files. ## Related - Inbox item `20260723-090435-melodic-session-plugins-audit` finding F3 (falsified — see Summary). - Companion audit issues: #1151 (merged), #1152 (merged), #1154. - CI gate already in place: `skill-quality-gate` job in `.github/workflows/ci.yml`. Closes #1153 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <[email protected]>
Summary
Resolves the F2 finding from inbox item
20260723-090435-melodic-session-plugins-audit— as a deliberate re-scope, because primary-source evidence falsifies half the report. Reviewers should read the re-scope before the diff.What the report got right (fixed here):
skill-quality:checkhad no path for a marketplace-INSTALLED skill.check plugin:skill(or any name that lives only in the plugin cache) fell back to the project's.claude/skillsand printed a bare "Skill not found", so the operator had to already know to setCHECK_SKILL_SKILLS_ROOT. Now:plugin:skillargument prints exactly how to gate the install — pointCHECK_SKILL_SKILLS_ROOTat the cache skills dir — plus the note that the cache is a copy, not a git checkout, so the git-backed checks (3 trigger-preservation, 8 vendor, 9 stale-metadata) no-op there (a "new skill / skipped" result is expected).CHECK_SKILL_SKILLS_ROOTremedy.SKILL.mddocuments the installed-skill resolution path. Tests cover both messages.What the report got wrong (NOT fixed — falsified): it claimed the plugin cache "IS a git checkout of the marketplace repo, so HEAD exists" and asked to wire check 3's HEAD comparison to it. Evidence:
~/.claude/plugins/cache) rather than using them in-place."git -C ~/.claude/plugins/cache/melodic-software/skill-quality/0.9.0 rev-parse→fatal: not a git repository. The cache is a copy with no.git.What is deliberately NOT built (anti-coupling): auto-resolving
plugin:skillagainst the cache. The sub-layout<marketplace>/<plugin>/<version>/skillsis undocumented (only the cache's existence is), and the version dir changes every update. skill-quality is a repo-agnostic marketplace plugin — reverse-engineering an internal path is exactly the coupling the repo's portability gate guards against. The target root stays operator-provided; first-class installed-skill resolution is deferred to #1166 (open design question: no documented cross-plugin install-path lookup exists today).skill-quality 0.10.0.
Test plan
check-skill.test.sh— full suite green, incl. new assertions: missing bare name hintsCHECK_SKILL_SKILLS_ROOT;plugin:skillname gets the installed-skill guidance (leaf name echoed, cache path shown, no cache-layout resolution attempted).shellcheck -x check-skill.shclean.skill-quality:check checkPASS (0 errors, 0 warnings); SKILL.md 128/500 lines, markdownlint clean.check source-control:setupprints the actionable guidance and exits 1.Related
20260723-090435-melodic-session-plugins-auditfinding F2 (partly falsified — see Summary).Closes #1152
🤖 Generated with Claude Code