一键导入
frontend-visual-verify
Visual verification of UI components via Storybook snapshots and Playwright MCP. Use when verifying component rendering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Visual verification of UI components via Storybook snapshots and Playwright MCP. Use when verifying component rendering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Root installer anchor for the jaan.to Codex skill pack. Use when installing jaan.to skills in Codex.
Audit AI history and existing workflow, then plan a reliable, evaluated, safe AI system. Use when maturing AI workflows.
Report bugs, feature requests, or skill issues to the jaan-to GitHub repo or save locally. Use when reporting plugin issues.
Detect repeated workflow patterns from AI sessions and suggest skills to automate them. Use when optimizing workflows.
Assemble role-based AI teammates to ship ideas from concept to production via agent teams. Use when orchestrating multi-role delivery.
Orchestrate RED/GREEN/REFACTOR TDD cycle with context-isolated agents. Use when implementing features test-first.
| name | frontend-visual-verify |
| description | Visual verification of UI components via Storybook snapshots and Playwright MCP. Use when verifying component rendering. |
| allowed-tools | Read, Glob, Grep, Bash(ls:*), Bash(mkdir:*), Bash(stat:*), mcp__playwright__browser_navigate, mcp__playwright__browser_snapshot, mcp__playwright__browser_take_screenshot, mcp__playwright__browser_tabs, mcp__storybook-mcp__get-story-urls, Write($JAAN_OUTPUTS_DIR/frontend/**), Task, AskUserQuestion, Edit(jaan-to/config/settings.yaml) |
| argument-hint | [storybook-url or component-path or frontend-design output] |
| license | PROPRIETARY |
| disable-model-invocation | true |
Visual verification of UI components via Storybook accessibility snapshots and Playwright MCP.
$JAAN_CONTEXT_DIR/tech.md - Tech stack context (optional)$JAAN_CONTEXT_DIR/design.md - Design system guidelines (optional, #visual-standards and #storybook sections)$JAAN_TEMPLATES_DIR/jaan-to-frontend-visual-verify.template.md - Output template$JAAN_LEARN_DIR/jaan-to-frontend-visual-verify.learn.md - Past lessons (loaded in Pre-Execution)${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.md - Shared reference (visual scoring rubric, network policy, MCP degradation)${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md - Language resolution protocolArguments: $ARGUMENTS
Accepts any of:
http://localhost:6006/?path=/story/{component} (localhost only by default)If no input provided, ask: "What component should I verify? (Storybook URL, component path, or design output path)"
MANDATORY — Read and execute ALL steps in: ${CLAUDE_PLUGIN_ROOT}/docs/extending/pre-execution-protocol.md
Skill name: frontend-visual-verify
Execute: Step 0 (Init Guard) → A (Load Lessons) → B (Resolve Template) → C (Offer Template Seeding)
Also read context files if available:
$JAAN_CONTEXT_DIR/design.md — Visual standards, accessibility targetsRead and apply language protocol: ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md
Override field for this skill: language_frontend-visual-verify
Language exception: Generated code output remains in the project's programming language.
ultrathink
Use extended reasoning for:
Check Playwright MCP availability:
mcp__playwright__browser_snapshot (any lightweight call)output_mode = visual-modeoutput_mode = static-modeReference: See
${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.mdsection "MCP Graceful Degradation Patterns" — Playwright MCP section.
Display mode to user:
visual-mode: "Playwright MCP detected — full visual verification available."static-mode: "Playwright MCP not available — static code analysis only. Visual score will be N/A."URL validation (CRITICAL — localhost-only default):
Reference: See
${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.mdsection "Playwright Network Policy" for URL validation rules.
localhost:*, 127.0.0.1:*)If MCP tool mcp__storybook-mcp__get-story-urls available:
http://localhost:6006/?path=/story/{component-id}--{story-name}Present target summary:
VERIFICATION TARGET
───────────────────
Component: {name}
URL: {storybook_url or preview_path}
Mode: {visual-mode / static-mode}
Reference: {design description or N/A}
Regardless of mode, read the component source for code-level analysis:
Grep: "cva(" {component_path}Build verification checklist:
VERIFICATION CHECKLIST
──────────────────────
Rendering:
[ ] Component renders without errors
[ ] All props/variants render correctly
[ ] Loading/error/empty states work
Accessibility:
[ ] ARIA attributes present and correct
[ ] Keyboard navigation functional
[ ] Color contrast meets WCAG AA (4.5:1 text, 3:1 UI)
[ ] Focus indicators visible
Visual:
[ ] Layout matches design intent
[ ] Typography hierarchy correct
[ ] Spacing consistent with design system
[ ] Responsive at key breakpoints
[ ] Dark mode (if applicable)
useQuery, useMutation, fetch) or references API endpoints, add an info-level note: "Component has API dependencies — verify MSW handlers are configured for Storybook stories. See /jaan-to:frontend-story-generate --contract."Present verification plan to user.
Use AskUserQuestion:
Do NOT proceed to Phase 2 without explicit approval.
mcp__playwright__browser_navigate to Storybook URLmcp__playwright__browser_snapshot — Get accessibility tree (primary, fast, deterministic)mcp__playwright__browser_take_screenshot — Capture visual stateNo visual score in static-mode. Report header: "Static analysis only — visual verification requires Playwright MCP."
Reference: See
${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.mdsection "Visual Scoring Rubric" for score definitions.
Evaluate against rubric criteria:
Read template: $JAAN_TEMPLATES_DIR/jaan-to-frontend-visual-verify.template.md
Fill sections:
Show verification summary with score and key findings.
Use AskUserQuestion:
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/id-generator.sh"
SUBDOMAIN_DIR="$JAAN_OUTPUTS_DIR/frontend/visual-verify"
mkdir -p "$SUBDOMAIN_DIR"
NEXT_ID=$(generate_next_id "$SUBDOMAIN_DIR")
slug="{component-name-slug}"
OUTPUT_FOLDER="${SUBDOMAIN_DIR}/${NEXT_ID}-${slug}"
Write files:
mkdir -p "$OUTPUT_FOLDER"{id}-{slug}.md — Verification report{id}-{slug}-screenshots/ — Captured screenshots (visual-mode only){id}-{slug}-readme.md — Summary with pass/fail and next actionssource "${CLAUDE_PLUGIN_ROOT}/scripts/lib/index-updater.sh"
add_to_index \
"$SUBDOMAIN_DIR/README.md" \
"$NEXT_ID" \
"${NEXT_ID}-${slug}" \
"{ComponentName} Verification" \
"{mode}: score {score}/10 — {pass_count}/{total_count} checks passed"
Verification complete!
Results: {score}/10 — {pass_count}/{total_count} checks passed
Next Steps:
- Run
/jaan-to:frontend-component-fixto fix identified issues- Run
/jaan-to:frontend-story-generateto add missing story states- Run
/jaan-to:qa-test-casesto generate test cases from findings- Re-run
/jaan-to:frontend-visual-verifyafter fixes to confirm
Use AskUserQuestion:
If "Learn from this": Run /jaan-to:learn-add frontend-visual-verify "{feedback}"