.claude/skills/code-verification/SKILL.md
Multi-agent code verification workflow using a main agent and sub-agent loop. Use when verifying code against requirements, acceptance criteria, or quality standards. Triggers on requests to verify, validate, or check code against specifications, checklists, or instructions.
npx skillsauth add benjaminshoemaker/ai_coding_project_base code-verificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verify code against requirements using a main agent / sub-agent loop with structured feedback and automatic retry.
Copy this checklist and track progress:
Code Verification Progress:
- [ ] Step 1: Parse verification instructions
- [ ] Step 2: Pre-flight validation
- [ ] Step 3: Verification loop (per instruction)
- [ ] Step 4: Fix attempts (if failed)
- [ ] Step 5: Update checklist with results
- [ ] Step 6: Generate verification report
- [ ] Step 7: Log results to verification-log.jsonl
Extract each verification instruction into a discrete, testable item:
V-001)browser: true or browser: falsebrowser: true):
DOM_INSPECTION - Element presence, visibility, content via accessibility tree snapshotsSCREENSHOT - Visual appearance, layout verificationCONSOLE - Browser console errors, warnings, logsNETWORK - API requests, responses, status codes (via network interception)PERFORMANCE - Load times, Core Web Vitals (via tracing)ACCESSIBILITY - ARIA attributes, semantic HTML, accessibility tree analysisBefore the verification loop, confirm each instruction is testable:
Flag untestable instructions immediately rather than attempting verification.
Verify that all referenced files and resources actually exist before entering the verification loop. Log any missing files and mark their associated instructions as BLOCKED.
For instructions with browser: true:
HTTP-First Check (before browser tools)
Many "browser" criteria can be satisfied with a simple HTTP check. Before launching browser tools, evaluate if the criterion only requires:
Attempt HTTP verification first using curl:
# Page loads check
curl -sf "{devServer.url}{route}" -o /dev/null && echo "PASS" || echo "FAIL"
# Response contains text
curl -s "{url}" | grep -q "{expected}" && echo "PASS" || echo "FAIL"
# API returns expected status
curl -sf -o /dev/null -w "%{http_code}" "{url}"
Curl error handling:
-m 10 (10-second timeout) to prevent hanging on unresponsive services$?) immediately after execution before interpreting outputIf HTTP check passes AND criterion does NOT explicitly require:
Then: Mark as PASS (HTTP-first), skip browser verification.
Otherwise: Continue to browser tool fallback chain.
Check browser tool availability (fallback chain)
If NO tools available (SOFT BLOCK):
Before marking as BLOCKED, attempt HTTP fallback for any remaining criteria. EXECUTE these commands via Bash tool (substitute actual URLs):
curl -sf {url}curl -s {url} | jq .curl -sI {url}Only mark as BLOCKED if both browser tools AND HTTP fallback are insufficient.
If still blocked after HTTP fallback:
⚠️ NO BROWSER TOOLS AVAILABLE
This verification includes browser-based criteria but no browser
MCP tools are available, and HTTP fallback is insufficient.
Criteria requiring DOM/visual inspection:
- {list criteria that truly need browser}
Options:
1. Continue anyway (these criteria become manual verification)
2. Stop and configure browser tools first
Verify dev server is running (if browser tools available)
http://localhost:3000)Confirm target route exists (if browser tools available)
Spawn a sub-agent to verify each instruction. The sub-agent MUST return structured output:
VERIFICATION RESULT
-------------------
Instruction ID: [ID]
Status: PASS | FAIL | BLOCKED
Location: [file:line or "N/A"]
Severity: BLOCKING | MINOR
Finding: [What was found]
Expected: [What was expected]
Suggested Fix: [Specific fix recommendation]
Sub-agent rules:
For instructions with browser: true, the sub-agent MUST use Playwright MCP and return:
BROWSER VERIFICATION RESULT
---------------------------
Instruction ID: [ID]
Status: PASS | FAIL | BLOCKED
Type: DOM | VISUAL | CONSOLE | NETWORK | PERFORMANCE | ACCESSIBILITY
URL: [URL] | Viewport: [width]x[height]
Finding: [What was observed]
Expected: [What was expected]
Details: [Type-specific information]
- DOM: selector, found, visible, content
- Visual: screenshot path, description
- Console: errors, warnings, logs
- Network: endpoint, method, status, response summary
- Performance: load time, LCP, FID, CLS
- Accessibility: ARIA, semantic HTML, contrast, keyboard nav
Suggested Fix: [Specific fix recommendation]
In addition to standard sub-agent rules, browser verification sub-agents MUST:
browser_snapshot) of the initial statedata-testid over complex CSS paths, or use accessibility tree element refs)browser_wait_for_text or browser_wait)browser_screenshot) when verifying visual appearancebrowser_resize to change)When sub-agent reports FAIL:
Maintain a fix log per instruction:
FIX LOG: [Instruction ID]
--------------------------
Attempt 1: [Description of change] → [Result]
Attempt 2: [Description of change] → [Result]
...
If the same failure pattern repeats twice, explicitly try a different strategy.
After applying fix, re-verify the specific criterion:
| Failure Type | Common Fixes | |--------------|--------------| | DOM/Visibility | Conditional rendering, CSS display/visibility, z-index, prop passing | | Console errors | JS exceptions, missing mocks, env vars, CORS | | Network | Endpoint URLs, auth headers, payload format, CORS config | | Visual | CSS cascade, responsive breakpoints, font loading | | Performance | Bundle size, image optimization, lazy loading, render-blocking | | Accessibility | ARIA attributes, color contrast, heading hierarchy, keyboard handlers |
Exit the verification loop when ANY condition is met:
| Condition | Action | |-----------|--------| | Sub-agent reports PASS | ✅ Check off instruction | | 5 attempts exhausted | ❌ Mark failed with notes | | Same failure 3+ times | ⚠️ Exit early, flag for review | | Fix introduces regression | ⚠️ Revert, flag for review | | Issue is MINOR severity | ⚠️ Note and continue |
After each fix attempt, verify:
If a fix breaks something else, revert and note the conflict. After reverting, verify with git status or by reading the file that the revert was successful before proceeding.
After each browser-related fix, verify no regressions in: console errors, visual appearance, performance metrics, accessibility. If regression detected, capture before/after state and log in fix history.
After all instructions are processed:
VERIFICATION REPORT
===================
Total Instructions: [N]
Passed: [N] ✅
Failed: [N] ❌
Needs Review: [N] ⚠️
DETAILS
-------
[V-001] ✅ [Instruction summary]
[V-002] ❌ [Instruction summary]
- Failed after 5 attempts
- Last error: [description]
- Attempts: [brief log]
[V-003] ⚠️ [Instruction summary]
- Flagged: Repeated same failure pattern
- Recommendation: [suggestion]
AUDIT TRAIL
-----------
[Timestamp] V-001: Verified PASS on first check
[Timestamp] V-002: Attempt 1 - Changed X → FAIL
[Timestamp] V-002: Attempt 2 - Changed Y → FAIL
...
BROWSER VERIFICATION (if applicable)
------------------------------------
Browser Checks: [passed]/[total] | Blocked: [N]
Playwright: Available | Unavailable
Dev Server: [URL] | Not Running
Issues Found:
- [V-XXX] {type}: {description}
Screenshots: [list of captured files]
Given a checklist:
[ ] All functions have docstrings
[ ] No unused imports
[ ] Tests pass with >80% coverage
Workflow execution:
utils.py:45)| Situation | Action | |-----------|--------| | Verification instructions cannot be parsed from input | Report "Unable to extract testable instructions" and ask the user to clarify the requirements | | Referenced source files do not exist | Mark the instruction as BLOCKED and list the missing file paths in the report | | Sub-agent returns malformed or empty output | Retry the sub-agent once; if still malformed, mark instruction as BLOCKED with "sub-agent error" | | Fix attempt introduces a regression in a previously-passing instruction | Revert the fix immediately and flag the conflict for manual review | | Dev server fails to start for browser-based criteria | Report the startup error, mark browser criteria as BLOCKED, continue with non-browser criteria |
REMINDER: Sub-agents report findings only — do not attempt fixes.
testing
Audit project alignment with VISION.md, identify SDLC gaps, and generate feature proposals. Use when reviewing strategic direction or planning new features.
development
Run code-verification on a specific task. Use to verify a single task's acceptance criteria after implementation.
testing
Resolve Vercel preview deployment URL for the current git branch. Invoked by browser-verification when deployment.enabled is true, or directly to check deployment status. Use to check deployment status or when browser verification needs a URL.
tools
Discover and sync all toolkit-using projects with the latest skills. Use when skills are modified, after the post-commit hook reminds you, or to batch-sync multiple projects.