Skip to content

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

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14758

Summary

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

Simplified the second half of plugins/skill-quality/scripts/check-skill.sh (lines 1451-2900 of 2900, measured at the start of this run; only checks 8 onward, whose blocks start in range 2, were touched) with no behavior change. A new metadata_value helper replaces five copies of strip_quotes around metadata_field (checks 8 and 27). Check 18's two injection greps become one alternation, and its PRECOMPUTE_INJECTS flag is gone. Check 19's per-injection loop becomes one grep over the joined list, which is equivalent because each injection is a single line. Check 24 lowercases with ${var,,} (the script already uses it) in place of a tr subshell. skill_quality_setting's three sequential ifs become one if/elif chain. Check 31's constant st_fix message moves out of its loop, and check 12 inlines a single-use variable. Design choice: no cross-check dedupe (for example, merging the check 18 and check 19-20 fence scans), since the issue puts restructuring out of scope.

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
  • bash -n on check-skill.sh not run here (no interpreter wrapper); shellcheck ran through check-affected and passed
  • ci-status green is a PR check, left to the PR's CI
  • tidy: the pass 5 ai-slop detector (detect.sh) could not run in this lane, so the fragment's one mandated line was checked against the rubric by hand (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: metadata_value helper (checks 8, 27); merged check 18 injection grep; check 19 bash-only scan as one pipeline; check 24 ${DMI_TRIMMED,,}; skill_quality_setting if/elif chain; check 31 st_fix moved out of the loop; check 12 inlined CUR_TRIG_WTU
  • .changes/skill-quality/work-resolve-issue-issue-14758-43000205062-1-7c1d2886.md: patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 593e1e5:

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

The run reports:

  • check-changelog-fragments: all 3 fragments valid
  • check-changed-skills: no changed skills under plugins/*/skills/, nothing to gate
  • check-affected: first run failed shellcheck SC2016 on the merged check 18 grep; added a shellcheck disable directive like the file's other literal-backtick regexes; second run: 13 passed, 6 skipped, 0 failed
  • fresh-context review subagent: all 7 edits judged equivalent (stdout, exit codes, messages, interface); one note was stderr-only (grep 'binary file matches' notices on invalid-UTF-8 injections could print a different number of times), with no effect on findings
  • check-skill.test.sh line 3983 interval guard: read the guard; the new lines add no ERE interval inside an awk regex
  • diff size: 2 files, about 35 changed lines, 1 area (skill-quality)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43000205062

Left out: the items under Not verified.

Related

#14758

Merge-Risk: max=MEDIUM demote=false head=593e1e557c380405ef55b84f720e241f01d90799 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 593e1e557c380405ef55b84f720e241f01d90799: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15337, head 593e1e5

No security issues found. I read every hunk of both changed files in full:

  • .changes/skill-quality/work-resolve-issue-issue-14758-43000205062-1-7c1d2886.md is a new changelog fragment that only bumps the patch version. Nothing in it runs.
  • plugins/skill-quality/scripts/check-skill.sh is a refactor of the skill lint script with no behavior change. I checked each edit against the base code:
    • metadata_value helper: it wraps the same strip_quotes/metadata_field pipeline as before. Its argument is quoted and passed as a here-string, so this adds no new word-splitting or eval path. It is defined at file scope before both of its call sites.
    • Check 18: the two injection greps become one ERE alternation. The pattern is in single quotes, so nothing in it expands.
    • Check 19: the per-injection loop becomes one printf | grep -oE | head -1 || true pipeline over the same data, with the same result. $bash_only_re is still a quoted argument to grep.
    • Check 24: ${DMI_TRIMMED,,} replaces the tr call. It does the same lowercasing, and the same case statement still decides the outcome.
    • skill_quality_setting: the if/elif chain gives the same result on every path (parse failure, empty value, valid value, invalid value). Every rejected layer still falls back to the default $2, so no unvalidated value can become SETTING_VALUE.
    • Check 31: the st_fix constant moves out of the loop. It is still a single-quoted literal.

None of the changed files matches a TRUSTED PATHS glob. The diff touches no trust control, merge hold, token scope, kill switch or plugin manifest, and removes or softens no standing instruction. It adds no new place where outside input reaches a shell. The PR context contains no embedded instructions aimed at this lane.

Prior findings: this is the first review of this PR by this lane (blocking only: no), so there was nothing to repeat.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #15337, refactor(skill-quality): simplify check-skill.sh range 2 of 2

No findings. I read both changed files in full: plugins/skill-quality/scripts/check-skill.sh and the changelog fragment. Each of the seven edits behaves the same as the code it replaces. I checked this by reading the code at head. I did not run the script, so none of it is executed proof.

  • metadata_value helper (checks 8, 27): It passes the same here-string to skill_frontmatter::metadata_field and strips quotes the same way. It is defined at L1495, before its first use at L1519. No other .sh file in the repo defines the same name.
  • Check 12, inlined CUR_TRIG_WTU: Nothing else reads the variable. extract_triggers now runs only when the use when grep misses, and it has no side effects.
  • Check 18, merged grep: In ERE, top-level | binds loosest, so the merged pattern matches the same lines as the two old greps chained with ||. Nothing else reads the removed PRECOMPUTE_INJECTS.
  • Check 19, single pipeline: Every INJECTIONS entry is one line. Each comes from a read -r line (L1858) or from one grep -o match (L1871). So the first match in the joined list is the old loop's first hit. GNU grep hides output only per line when a line is badly encoded, so the result is the same in that case too.
  • Check 24, ${DMI_TRIMMED,,}: DMI_VAL is only matched against ASCII words and tested for emptiness (L2356, L2361). The only non-ASCII capitals that lowercase to ASCII become i or k, and none of the accepted spellings contain either letter.
  • skill_quality_setting if/elif chain: Each case (parse failure, empty value, valid value, invalid value) leads to the same warning, continue, or reset to the default as before.
  • Check 31, st_fix hoisted: It is assigned once (L2843), before the loop, and the loop never reassigns it.

Closing issue #14758 acceptance criteria:

  • Behavior unchanged: met, based on my reading above. The repository has an existing suite, check-skill.test.sh, that can catch a change in these checks. The PR author says they did not run it in their lane and left it to CI (author's claim, not verified by me).
  • Only the listed file plus a changelog fragment are edited: met.
  • Size within 400 lines and 15 files: met (2 files, about 35 changed lines).
  • Fragment uses ### Changed and the exact line "Internal simplification, no behavior change.", with bump: patch: met.
  • Changes limited to code that starts in range 2: met. Every hunk is at L1491 or later, inside checks 8 onward.
  • ci-status green: left to the PR's CI; I could not observe it.

The PR's description and the closing issue contain no embedded instructions aimed at this review. No plugin manifest changed. The diff does not touch billing or how much the lanes run.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 593e1e5

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-15337-593e1e557c380405ef55b84f720e241f01d90799, 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 b9a44c6 Nov 11, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14758-43000205062-1 branch November 11, 2026 11:07
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 5, survived 2, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 71%; mutation score 71%.

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

Surviving mutants

Location Operator Disposition Cause
plugins/skill-quality/scripts/check-skill.sh:1773 other productive input-gap
plugins/skill-quality/scripts/check-skill.sh:2623 ROR 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 b9a44c6de729a7b8acce84a8b7a8bc737874e265; 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 2 of 2)

0 participants