Skip to content

refactor(skill-quality): simplify check-skill.sh range 1 of 2 - #15317

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14753-42991927782-1
Nov 11, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14753-42991927782-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14753

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Simplified the first half of plugins/skill-quality/scripts/check-skill.sh (lines 1-1452 of 2904, measured at the start of this run) with no behavior change. The skill's frontmatter and its description and when_to_use fields are now read once, not once for the CHECK_SKILL_ONLY=25 path and again for checks 1 and 2. A new base_ref_fm helper replaces the two copies of the base-ref cat-file -e plus git show | extract code in check 3. The dropped-trigger list is now an array, which removes a printf/tr subshell. Two sibling-loop guards are merged, and three history-narration comments are reworded. Design choice: only code whose block starts in range 1 was touched, so checks 1-7 and the helpers. Cross-check dedupe (for example a shared sibling-dir list for checks 3 and 5) was left out, since it would add lines for little gain.

Not verified

  • plugins/skill-quality/scripts/check-skill.test.sh suite not run: this lane runs only the named wrappers, so the suite is left to the PR's CI
  • shellcheck / bash -n on check-skill.sh not run here (no interpreter or linter wrapper in this lane); left to the PR's CI
  • ci-status green is a PR check, left to the PR's CI
  • tidy: pass 5 ai-slop detector (detect.sh) could not run in this lane; the fragment's single mandated line was read against the rubric by hand with no findings. Pass 4 made no edit because the issue mandates the fragment text verbatim
  • cant-fail-scan not applicable: the change touches no test file

Fix

  • plugins/skill-quality/scripts/check-skill.sh: new base_ref_fm helper; FRONTMATTER/CUR_DESC/CUR_WTU computed once before the CHECK_SKILL_ONLY=25 block; check 3 uses base_ref_fm for the skill and for its siblings; LOST is now an array joined with ${LOST[*]}; merged the -f/self guards in the check 3…
  • .changes/skill-quality/work-resolve-issue-issue-14753-42991927782-1-97b7d208.md: patch fragment, ### Changed / Internal simplification, no behavior change.

Verification

The runner ran each check from the base copy against 297505c:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 8 fragments valid (run before and after tidy)
  • check-changed-skills: no changed skills under plugins/*/skills/, nothing to gate (run before and after tidy)
  • check-affected: 13 passed, 6 skipped over 2 changed files (run before and after tidy)
  • fresh-context review subagent over the whole diff: no behavior differences found in output text, exit codes, ordering, set -u or pipefail effects; it confirmed IFS is never changed globally, so ${LOST[*]} joins with one space, and that nothing between the old and new frontmatter read sites…
  • grep of check-skill.test.sh for internal variable names (LOST, SIB_, BASE_FM, CUR_DESC): none, so the suite tests behavior from outside and asserts nothing about the edited internals
  • tidy-diff over the 16 changed hunks: no further edits
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42991927782

Left out: the items under Not verified.

Related

#14753

Merge-Risk: max=MEDIUM demote=false head=297505ce40f9d91578a90886a6672ab353309771 rubric=8.4.2 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 297505ce40f9d91578a90886a6672ab353309771: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15317 (refactor(skill-quality): simplify check-skill.sh range 1 of 2)

I found no security issues.

I read both changed files in full:

  • plugins/skill-quality/scripts/check-skill.sh: a refactor of a local skill-lint script.
    • New base_ref_fm helper. It runs the same git cat-file -e "$BASE_REF:$1/SKILL.md" existence check and the same git show … | skill_frontmatter::extract pipeline as the code it replaces. The arguments are still double-quoted and stay inside one <ref>:<path> argument, so no shell or option injection is added. The values passed in ($SKILL_REL, and $OTHER_REL built from sibling directory names) are the same values the base code already passed to git.
    • FRONTMATTER / CUR_DESC / CUR_WTU read once. These are now read from $SKILL_MD one time, before the CHECK_SKILL_ONLY=25 branch. The source is the same file as before.
    • LOST is now an array. The list is joined with ${LOST[*]}. Output only changes in how the warning text is spaced.
    • Two sibling-loop guards merged into one. They still skip the same entries.
    • Comments reworded.
    • The change touches no gate, secret, token or workflow.
  • .changes/skill-quality/…97b7d208.md: a changelog fragment, prose only.

Other checks:

  • Trusted paths: no changed file matches a TRUSTED PATHS glob.
  • Trust controls: none touched.
  • Plugin manifests: none touched.
  • Instruction surfaces: none touched. The deleted text is code comments in a script, not a standing instruction.
  • PR context: no embedded directives aimed at the lane.
  • Prior findings: none. This is the first review of this pull request, so it is not blocking-only.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 297505ce40f9d91578a90886a6672ab353309771: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #15317, check-skill.sh simplification (range 1 of 2)

No findings. I read every hunk of both changed files and checked the edited regions against the head file plugins/skill-quality/scripts/check-skill.sh.

Behavior-preservation checks (done by reading the code, not by running it)

  • Frontmatter read moved earlier (L878-881). Both branches already exit before this point when SKILL.md is missing (L726-729). Nothing between the new read and check 2 reassigns FRONTMATTER, CUR_DESC or CUR_WTU. In the full run, check_25 is only called later, in its numbered slot. The only file that assigns these variables is L879-881.
  • base_ref_fm helper (L691-695). If cat-file -e fails, the helper returns 1 and the substitution sets BASE_FM="" with HAVE_BASE_FM=0. If it succeeds, the helper returns 0 even when git show | extract fails, which matches the old flow. The script runs set -uo pipefail without -e (L198), so moving the substitution into the if condition does not change any exit status.
  • LOST as an array (L1138-1166). IFS is only ever set as a per-command prefix (IFS= read, IFS=$'\t' read), never globally. So ${LOST[*]} joins with a single space, the same output as the old tr '\n' ' ' plus trailing-space trim. The ${#LOST[@]} > 0 guard keeps the empty-array expansion out of the way of set -u.
  • Merged sibling guards (L1127, L1268). [[ -f x && x != y ]] || continue is equivalent to the two separate guards. The right-hand side is quoted in both versions, so it is still a literal comparison, not a pattern match.

Closing issue #14753 acceptance criteria

  • Behavior unchanged: met, based on the reading above. check-skill.test.sh has 28 assertions on the dropped/moved-trigger warnings and CHECK_SKILL_ONLY, so a regression on the changed paths could make a test fail. I did not run it.
  • Diff edits only the listed file plus a changelog fragment: met.
  • Within 400 changed lines and 15 files: met (about 40 lines, 2 files).
  • ci-status green: not checked by this lane; left to CI.
  • Fragment has bump: patch, a ### Changed heading and the exact mandated line: met.
  • Only code starting in range 1 (L1-1452 of 2904) changed: met; every hunk falls between L457 and L1270.

The author's claims (test suite and shellcheck not run, results of the fresh-context subagent review) are author-claimed and unverified. I ran no shell here.

No paved-path, path-scoped rule or plugin-manifest items apply: the diff touches no plugin.json or marketplace.json.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 297505ce40f9d91578a90886a6672ab353309771, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 297505c

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15317-297505ce40f9d91578a90886a6672ab353309771, expires on 2026-12-11.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit ae54fd3 Nov 11, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14753-42991927782-1 branch November 11, 2026 09:55
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/skill-quality/scripts/check-skill.sh 6 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/skill-quality/scripts/check-skill.sh:692 SBR productive input-gap

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit ae54fd3f7b9d4c3b357bb999bcc5d3e3cc8d5cae; later checks count it verified from this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify the check-skill.sh skill-quality plugin code (part 1 of 2)

0 participants