Skip to content
Back to skills

Update Snapshots Safely

ASecurity

Reviews every changed snapshot before updating it and flags the ones that hide a real regression.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 15, 2026
ai-agentsgit

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill update-snapshots-safely --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Update Snapshots Safely?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Update Snapshots Safely
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-update-snapshots-safely-ai-agent-templates/badge)](https://www.skillsdirectory.com/skills/workspace-templates-update-snapshots-safely-ai-agent-templates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: update-snapshots-safely
description: Reviews every changed snapshot before updating it and flags the ones that hide a real regression.
disable-model-invocation: true
---

Review snapshot changes safely. Scope: $ARGUMENTS (all failing snapshot tests if empty).

1. Run the tests without any update flag and list each failing snapshot with its test name and file. Check `git status` for snapshot files that already changed.
2. For every failure, show the diff in a compact form and classify it: **intended** (matches the code change you can see in `git diff`), **cosmetic** (whitespace, ordering, generated class names), or **suspicious** (removed content, empty output, error text, undefined or NaN, changed behavior with no matching source change).
3. Explain each suspicious case, find the cause in the source and propose a fix. Do not update those snapshots.
4. Update only the intended and cosmetic ones, one file at a time, using the runner's targeted option (for example `jest -u path -t "name"` or `vitest -u path`), never a blanket update.
5. Rerun the whole suite.

Report counts for intended, cosmetic and suspicious, what was updated, and what remains. Ask before committing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.