Repository navigation
Description
Summary
When QA reviews skill changes (.claude/skills/**/*.md), it should verify that commands referenced in the skill actually work before giving READY_FOR_MERGE.
Problem
Issue #178 added CI status detection to QA using gh pr checks --json name,state,conclusion. QA gave READY_FOR_MERGE, but post-merge integration testing revealed:
| Bug | Root Cause | How Caught |
|---|---|---|
Wrong JSON field (conclusion doesn't exist) |
Never executed the command | Manual gh pr checks test |
| Missing CI patterns | No adversarial review | Human "what else?" thinking |
No gh availability check |
Assumed dependency exists | Human portability review |
QA passed because it reviewed the text, not the behavior.
Current Gap
Skill change = Markdown instructions for Claude
QA checks = Code review, type safety, security scan
Missing = Does the command actually work?
For skill changes, the only real test is execution — which QA doesn't do.
Proposed Solution
1. Skill Command Extraction (Automated)
When .claude/skills/**/*.md files are modified:
# Extract command patterns from skill file
grep -E '^\s*`?(gh|npm|npx|git)\s+[^`]+' <skill-file> | head -102. Command Syntax Verification (Automated)
For each extracted command:
- Run with
--helpor safe flags to verify syntax - For JSON output commands, verify field names exist
# Example: Verify gh pr checks fields
gh pr checks --help | grep -A 20 "JSON FIELDS"
# Or actually run against a real PR
gh pr checks <pr> --json name,state,bucket3. Adversarial Review Prompts (Manual)
Add to QA self-evaluation for skill changes:
### Skill Change Review
- [ ] **Command verified:** Did you execute at least one referenced command?
- [ ] **Fields verified:** For JSON commands, do field names match actual output?
- [ ] **Patterns complete:** What variations might users write that aren't covered?
- [ ] **Dependencies explicit:** What CLIs/tools does this skill assume are installed?Acceptance Criteria
- AC-1: QA detects when
.claude/skills/**/*.mdfiles are modified - AC-2: QA extracts and lists commands referenced in skill changes
- AC-3: QA executes at least one command to verify syntax (or flags as unverified)
- AC-4: QA self-evaluation includes skill-specific adversarial prompts
- AC-5: Verdict cannot be READY_FOR_MERGE if command verification fails
Evidence
From #178 QA review, the self-evaluation said:
"Verified working: Yes - The implementation is documentation/skill instructions only."
This was incorrect. The command syntax was wrong (conclusion field doesn't exist).
Related Issues
- docs(qa): Document script verification override criteria #176: Document script verification override criteria (similar pattern for scripts)
- feat: Shift-left gap detection in workflow phases #196: Shift-left gap detection (related philosophy)
Priority
Medium — Skills are modified less frequently than code, but bugs in skills affect all future workflow runs.
Issue created from post-merge reflection on #178
Activity
admarble commentedon Jan 31, 2026
📋 /spec Plan: Skill Command Verification
Acceptance Criteria Checklist
.claude/skills/**/*.mdfiles are modifiedVerification Criteria
AC-1: Given a feature branch with skill file changes → When QA runs detection → Then
skills_changed > 0AC-2: Given a skill with commands like
gh pr checks --json→ When extraction runs → Then commands are listedAC-3: Given
gh pr checks --json conclusion→ When syntax check runs → Then "conclusion" flagged as invalid field (doesn't exist)AC-4: Given skill changes detected → When self-evaluation generated → Then 4 skill-specific prompts appear
AC-5: Given command verification = "Failed" → When verdict calculated → Then NOT
READY_FOR_MERGEAssumptions to Validate
ghCLI is available in the environment--helpoutput is parseable for JSON field validationImplementation Plan
Phase 1: Skill Change Detection
scripts_changed(line ~693 in QA skill)^\.claude/skills/.*\.md$Phase 2: Command Extraction
gh,git,npm,npxprefixed commandsPhase 3: Command Syntax Verification
--helpfor command types to verify flags/fields existPhase 4: Self-Evaluation Prompts
skills_changed > 0Phase 5: Verdict Gating
AC_MET_BUT_NOT_A_PLUS(blocks READY_FOR_MERGE)Open Questions
<placeholder>or${VAR}? → Recommended: Yes, with documented reasongh issue edit? → Recommended: Only use--help, never executeRecommended Workflow
Quality Loop: Disabled (clear AC, no complex refactoring)
Plan generated by
/spec— ready for implementation with/exec 209feat(#209): Add skill command verification to QA workflow
admarble commentedon Jan 31, 2026
🚀 /exec Progress Update
Implementation Complete
PR #216 has been created: #216
AC Coverage
.claude/skills/**/*.mdfiles are modifiedskills_changeddetection in Section 5 and 6agh,npm,npx,git--helpoutput and JSON field validationskill_verificationFiles Changed
.claude/skills/qa/SKILL.mdQuality Checks
npm run build)Self-Evaluation
${complex.expression}conclusionfield bug) would be caughtNext Steps
/qa 209to validate implementationProgress update by
/exec 209admarble commentedon Jan 31, 2026
QA Review for Issue #209
AC Coverage
.claude/skills/**/*.mdfiles are modifiedgit diff main...HEAD --name-only | grep -E "^\.claude/skills/.*\.md$"- verified workingCoverage: 5/5 AC items fully met
CI Status
build (18.x)build (20.x)build (22.x)validate-skillstypecheckvalidate-pluginCI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
any)Build Verification
N/A - Build passed (TypeScript compilation successful)
Test Coverage Analysis
.claude/skills/qa/SKILL.mdCoverage: Documentation-only change - no source code tests applicable
Critical paths without tests: None
Note: Test failures observed in
state-update-cli.test.tsandsemgrep.test.tsare pre-existing on main branch - not regressions from this PR.Code Review
Strengths:
conclusionfield)Issues:
Suggestions:
ghcommands have which valid JSON fields (minor, not blocking)Test Quality Review
N/A - No test files modified
Anti-Pattern Detection
N/A - No package.json changes, no source code changes
Execution Evidence
N/A - No scripts/CLI modified
Skill Command Verification
Skill files changed: 1
.claude/skills/qa/SKILL.mdCommands Verified:
git diff main...HEAD --name-only \| grep -E "^\.claude/skills/.*\.md$"→ ✅ Works correctlygh pr checks --json name,state,bucket→ ✅ All fields existgh pr checks --help \| grep -A 30 "JSON FIELDS"→ ✅ Works correctlyname,state,bucket→ ✅ All existconclusionis NOT a valid field → ✅ Confirmed (as documented)Commands with Issues: None
Verification Status: Passed
Skill Change Review
name,state,bucketexist;conclusiondoes not (matching documentation) ✅ghCLI requirement for verification ✅Self-Evaluation
Verdict: READY_FOR_MERGE
This is a well-implemented documentation enhancement that directly addresses the gap identified in Issue #178. The skill command verification section provides clear, actionable steps for QA to validate commands before giving READY_FOR_MERGE. The verdict algorithm has been properly updated to gate on verification status.
Documentation
Next Steps
QA completed: All AC items met, CI passing, no regressions
fix(#209): Improve command extraction patterns and add gh CLI check
feat(#209): Add skill command verification to QA workflow (#216)
docs: Add #209 skill command verification to changelog and what-weve-…