AI-native visual regression testing engine — Claude Code plugin + GitHub Actions CI.
- Plugin-first: Slash commands are the primary local interface. Claude Code IS the local AI engine.
- Scripts in
scripts/: Standalone TypeScript, runnable vianpx tsx. Used by both slash commands and CI. - Gemini for CI:
scripts/analyze-gemini.tshandles batch analysis in GitHub Actions. - No npm publish: This is a Claude Code plugin, not a published package.
- TypeScript strict mode, ESM only (
"type": "module") - All shared types in
scripts/types.ts - Pre-filter has a zero false-negative guarantee: only byte-identical screenshots skip analysis
- Scripts must be runnable standalone (for CI) AND callable from slash commands via Bash
- Use
picocolorsfor terminal output, neverchalk - Use
execFileSyncnotexecSync— avoid shell injection - Test fixtures in
tests/fixtures/
| Directory | Purpose |
|---|---|
commands/ |
Claude Code slash commands (markdown with YAML frontmatter) |
agents/ |
Claude Code agents (markdown with YAML frontmatter) |
skills/ |
Claude Code skills (SKILL.md + references/) |
scripts/ |
Core TypeScript scripts (capture, prefilter, analyze, etc.) |
templates/ |
User-facing templates (config example, GitHub Actions) |
tests/ |
Vitest tests + PNG fixtures |
Scripts double as both importable modules and CLI entrypoints:
- Export functions for programmatic use
- Include
if (isDirectRun)block for CLI execution - Accept args via
process.argvwhen run directly
Visual diffs are classified as:
- REGRESSION: Unintended visual change (bug). Severity: high/medium/low.
- INTENTIONAL: Deliberate change (feature, design update).
- NOISE: Insignificant rendering variance (anti-aliasing, sub-pixel).
See skills/visual-regression/references/classification-schema.md for full criteria.