alekspetrov/navigator/visual-regression
Claude Code and agent skill by alekspetrov/navigator
- community
- ext:[{"type":"config","description":"Configuration overrides"},{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Setup visual regression testing with Storybook stories, configuration, and CI/CD workflows. Supports Chromatic, Percy, BackstopJS. Auto-invoke when user says "set up visual regression", "add Chromatic tests", "add screenshot testing", or "set up Percy".
Install
npx vskill@latest install alekspetrov/navigator/visual-regressionSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Visual Regression Testing Setup Skill
Skill Purpose
Generate complete visual regression testing setup with Storybook stories, configuration files, and CI/CD workflows.
Supports: Chromatic, Percy, BackstopJS Frameworks: React, Vue, Svelte (TypeScript/JavaScript) CI/CD: GitHub Actions, GitLab CI, CircleCI
What This Skill Does
- Detects existing setup: Storybook version, VR tool, CI platform
- Validates component: Extract props, variants, states
- Generates stories: Complete
.stories.tsxwith all variants - Creates config files: Chromatic, Percy, or BackstopJS configuration
- Sets up CI/CD: Auto-generate workflow files
- Provides instructions: Next steps for API tokens, first baseline
Workflow
Step 1: Validate Project Setup
Execute: vr_setup_validator.py
Check:
- Framework (React/Vue/Svelte) from package.json
- Existing Storybook config (.storybook/ directory)
- Existing VR tool (chromatic, percy, backstopjs in dependencies)
- CI platform (.github/, .gitlab-ci.yml, .circleci/)
- Component file exists and is valid
Output:
If Storybook not found: Ask user if they want to install Storybook first, provide setup instructions.
If multiple VR tools found: Ask user which to use (Chromatic recommended).
Step 2: Generate Storybook Stories
Execute: story_generator.py
Process:
- Parse component file (TypeScript/JSX/Vue SFC)
- Extract props, prop types, default values
- Identify variants (size, variant, disabled, etc.)
- Generate story file from template
- Add accessibility tests (@storybook/addon-a11y)
- Add interaction tests (if @storybook/test available)
Template: templates/story-template.tsx.j2
Example output (ProfileCard.stories.tsx):
Write to: {component_directory}/{ComponentName}.stories.tsx
Step 3: Generate Configuration Files
Execute: chromatic_config_generator.py (or percy/backstop equivalent)
For Chromatic:
Generate 3 files:
- chromatic.config.json:
- Update .storybook/main.js (add addon):
- Update package.json (add scripts):
For Percy: Generate .percy.yml instead For BackstopJS: Generate backstop.config.js instead
Step 4: Generate CI/CD Workflow
Execute: ci_workflow_generator.py
Detect CI platform from existing files:
.github/workflows/→ GitHub Actions.gitlab-ci.yml→ GitLab CI.circleci/config.yml→ CircleCI- None → Ask user, default to GitHub Actions
GitHub Actions Example:
Generate: .github/workflows/chromatic.yml
For GitLab CI: Add job to .gitlab-ci.yml For CircleCI: Add job to .circleci/config.yml
Step 5: Provide Setup Instructions
Output to user:
npm install --save-dev chromatic @chromatic-com/storybook
npm run chromatic
Predefined Functions Reference
vr_setup_validator.py
Returns: Validation report with detected setup and missing dependencies
story_generator.py
Returns: Generated story file content
chromatic_config_generator.py
Returns: Configuration file contents as strings
ci_workflow_generator.py
Returns: CI workflow file contents
Templates Reference
- story-template.tsx.j2: React/TypeScript story template
- story-template.vue.j2: Vue SFC story template
- chromatic-config.json.j2: Chromatic configuration
- percy-config.yml.j2: Percy configuration
- github-workflow.yml.j2: GitHub Actions workflow
- gitlab-ci.yml.j2: GitLab CI job
- storybook-main.js.j2: Storybook addon configuration
Examples
Example 1: Simple Component
See: examples/simple-component-vr.md
Example 2: Full Design System
See: examples/design-system-vr.md
Example 3: Existing Storybook
See: examples/existing-storybook-vr.md
Integration with product-design Skill
After product-design generates implementation plan, suggest visual regression:
Tool Comparison
Chromatic (Recommended)
- ✅ Purpose-built for Storybook
- ✅ Component-focused testing
- ✅ UI review workflow
- ✅ Free tier: 5,000 snapshots/month
- ❌ Requires cloud service
Percy
- ✅ Multi-framework support
- ✅ Responsive testing
- ✅ Visual reviews
- ❌ More expensive
- ❌ Less Storybook-specific
BackstopJS
- ✅ Open source, self-hosted
- ✅ No cloud dependency
- ✅ Free
- ❌ More manual setup
- ❌ Less automation
Default: Chromatic (best Storybook integration)
Error Handling
Component Not Found
Storybook Not Installed
Multiple VR Tools Detected
Best Practices
- Start with key components: Don't test everything, focus on design system primitives
- Use interaction tests: Combine visual + functional testing
- Baseline on main: Always merge baselines to main branch
- Review changes: Don't auto-accept visual changes
- Test states: Capture hover, focus, error states
- Accessibility: Include a11y tests in all stories
Token Efficiency
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/visual-regression/SKILL.md
Popularity
- Repository stars
- 161
- Repository forks
- 8
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Mar 2026, 8 months ago.
Extension points
configConfiguration overridespluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alekspetrov/navigator/visual-regression)