modbender/skill-library-mcp/snapshot-writer

Claude Code and agent skill by modbender/skill-library-mcp

Trust tier 3
  • community
  • ext:[{"type":"context","description":"Custom context provider definitions"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate Jest snapshot tests for React components. Use when you need snapshot coverage for your UI components.

Install

npx vskill@latest install modbender/skill-library-mcp/snapshot-writer

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as modbender/skill-library-mcp/snapshot-writer.

Snapshot Test Writer

Snapshot tests are the fastest way to catch unintended UI changes. But writing them for every component gets tedious fast. This tool reads your React components and generates snapshot tests automatically. It figures out the props, renders the component, and creates the snapshot assertions.

One command. Zero config. Just works.

Quick Start

bash
npx ai-snapshot-test src/components/

What It Does

  • Reads React components and generates Jest snapshot test files
  • Automatically detects props and creates test cases with different prop combinations
  • Handles components with context providers and wrapper dependencies
  • Generates both default state and edge case snapshots
  • Outputs .test.tsx files ready to run with Jest

Usage Examples

bash
# Generate snapshot tests for all components
npx ai-snapshot-test src/components/
# Target a specific component
npx ai-snapshot-test src/components/Button.tsx
# Scan all TSX files in a directory
npx ai-snapshot-test "src/**/*.tsx"

Best Practices

  • Generate snapshots early in development - Easier to maintain when you start small
  • Update snapshots intentionally - When a snapshot fails, check if the change was intended before updating
  • Don't snapshot everything - Focus on components with stable output. Highly dynamic components make bad snapshot candidates.
  • Keep snapshot files in version control - They're your visual contract

When to Use This

  • You're building a component library and need regression protection
  • A redesign changed a bunch of components and you need to update test coverage
  • You want to catch accidental rendering changes during refactors
  • Your team requires snapshot tests but nobody wants to write them

Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

Find more:

  • GitHub: https://github.com/LXGIC-Studios
  • Twitter: https://x.com/lxgicstudios
  • Substack: https://lxgicstudios.substack.com
  • Website: https://lxgic.dev

Requirements

No install needed. Just run with npx. Node.js 18+ recommended.

bash
npx ai-snapshot-test --help

How It Works

The tool parses your React component files to extract the component signature, props interface, and any dependencies. It then generates test files that import the component, render it with various prop combinations, and create toMatchSnapshot assertions. The output is compatible with Jest's snapshot testing.

License

MIT. Free forever. Use it however you want.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • contextCustom context provider definitions

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/modbender/skill-library-mcp/snapshot-writer/badge)](https://verified-skill.com/skills/modbender/skill-library-mcp/snapshot-writer)

Something wrong with this skill or its page? Tell us.