skills$openclaw/snapshot-writer
lxgicstudios1.1k

by lxgicstudios

snapshot-writer – OpenClaw Skill

snapshot-writer is an OpenClaw Skills integration for coding workflows. Generate Jest snapshot tests for React components. Use when you need snapshot coverage for your UI components.

1.1k stars8.2k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namesnapshot-writer
descriptionGenerate Jest snapshot tests for React components. Use when you need snapshot coverage for your UI components. OpenClaw Skills integration.
ownerlxgicstudios
repositorylxgicstudios/snapshot-writer
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lxgicstudios/snapshot-writer
last updatedFeb 7, 2026

Maintainer

lxgicstudios

lxgicstudios

Maintains snapshot-writer in the OpenClaw Skills directory.

View GitHub profile
File Explorer
3 files
.
_meta.json
293 B
README.md
504 B
SKILL.md
2.7 KB
SKILL.md

name: snapshot-writer description: Generate Jest snapshot tests for React components. Use when you need snapshot coverage for your UI components.

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

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

# 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:

Requirements

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

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.

README.md

Snapshot Test Writer

Generate Jest snapshot tests for React components.

Quick Start

npx ai-snapshot-test src/components/

What It Does

  • Generates Jest snapshot test files from React components
  • Detects props and creates multiple test cases
  • Outputs ready to run .test.tsx files

Part of the LXGIC Dev Toolkit

110+ free developer tools. No paywalls.

MIT License.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. ```bash npx ai-snapshot-test --help ```

FAQ

How do I install snapshot-writer?

Run openclaw add @lxgicstudios/snapshot-writer in your terminal. This installs snapshot-writer into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/snapshot-writer. Review commits and README documentation before installing.