insta-snapshots

insta-snapshots is a skill for Claude Code, Codex from oxc-project/oxc. It costs 22 tokens per session (938 once invoked), scanned A, original, MIT.

A guide for updating Insta snapshot tests in Oxc, a Rust codebase. Snapshot tests save expected outputs so code changes can be compared with them.

In plain words
What is it for?
Use it to run tests, find pending .snap.new files, and read the proposed snapshot changes directly.
Why use it?
It explains how to review changed test outputs without using Insta’s interactive terminal screen.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

About the project

oxc-project/oxc is a Rust collection of tools for parsing, transforming, resolving, linting, formatting, and minifying JavaScript and TypeScript. It is used to build and maintain JavaScript development and build toolchains. Catalogue add-ons provide workflows for using Oxc tools.

oxc-project/oxc · 22,650 stars · on GitHub · oxc.rs

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/oxc-project/oxc/insta-snapshots
Any agent
npx skills add oxc-project/oxc --skill insta-snapshots
Clone the repo
git clone --depth 1 https://github.com/oxc-project/oxc

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for insta-snapshots

README.md
[![agentmods](https://agentmods.dev/badge/skills/oxc-project/oxc/insta-snapshots.svg)](https://agentmods.dev/skills/oxc-project/oxc/insta-snapshots)
Your own site
<a href="https://agentmods.dev/skills/oxc-project/oxc/insta-snapshots"><img src="https://agentmods.dev/badge/skills/oxc-project/oxc/insta-snapshots.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00938
Opus 5 $0.00011 $0.00469
Sonnet 5 $0.00004 $0.00188
Haiku 4.5 $0.00002 $0.00094

Measured 6d ago against content hash a4867aac228a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

insta-snapshots scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/insta-snapshots/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

This skill guides you through working with insta snapshot tests in the Oxc codebase without requiring terminal interaction.

What are Insta Snapshots?

Insta is a snapshot testing library for Rust. Oxc uses it extensively for:

  • Linter rule tests (crates/oxc_linter/src/snapshots/)
  • Semantic analysis tests (crates/oxc_semantic/tests/integration/snapshots/)
  • Other crate-specific snapshot tests

Snapshots track expected test outputs (often failures or errors). When code changes, new snapshots are generated as .snap.new files for review.

Running Tests and Generating Snapshots

Run tests for a specific crate:

cargo test -p <crate_name>

This generates .snap.new files if test outputs have changed.

Reviewing Snapshots Non-Interactively

IMPORTANT: Avoid using cargo insta review (the interactive terminal UI). Instead, follow these steps:

1. List all pending snapshots

cargo insta pending-snapshots
# Or for workspace-wide:
cargo insta pending-snapshots --workspace

This shows all .snap.new files waiting for review.

2. Read the snapshot files directly

New snapshots are stored as .snap.new files next to their corresponding .snap files. You can use cargo insta pending-snapshots to view the changes to the snapshot files.

3. Accept or reject changes

Accept all pending snapshots:

cargo insta accept
# Or workspace-wide:
cargo insta accept --workspace

Accept specific snapshot(s):

cargo insta accept --snapshot <snapshot_name>

Reject all pending snapshots:

cargo insta reject
# Or workspace-wide:
cargo insta reject --workspace

This deletes all .snap.new files.

4. Verify the changes

After accepting, the .snap.new files become .snap files. Check with git:

git diff <path/to/snapshots/>

Common Workflows

After fixing a bug or adding new snapshot tests:

  1. Run tests: cargo test -p oxc_linter (or relevant crate)
  2. Check pending: cargo insta pending-snapshots
  3. Read new snapshots to verify they match expected behavior
  4. Accept if correct: cargo insta accept
  5. Commit the updated .snap files

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 137 lines · 22 tokens per session scan A a4867aac228a

Subscribe to this mod's changes

insta-snapshots is a skill published in the GitHub repository oxc-project/oxc (22,650 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 938 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

oxc-docs

Comprehensive reference for the JavaScript Oxidation Compiler (Oxc) — a collection of high-performance JavaScript tools written in Rust. Covers parser design (lexer, AST, parser, errors, semantic analysis), architecture (parser, linter, test infrastructure, AST tools), ECMAScript specification and grammar, performance…

pledgeandgrow/pledge-skills · 131 tokens

handle-regression

Protocol for detecting, isolating, and fixing regressions in test262 pass count. Use when a test run shows fewer passes than expected.

loopdive/js2 · 32 tokens

regression-triage

Bulk-classify a list of test262 pass→other transitions from a CI run. Distinct from handle-regression (single fix) and analyze-regression (diff two runs). Use after a merge wave when the sharded run reports N regressions and you need to bucket them by root cause and decide which are false positives.

loopdive/js2 · 72 tokens

merge-wave

Triage N open PRs with sharded test262 results, rank by net pass delta, merge winners, close catastrophes. Use when multiple PRs have completed CI and you want to land a batch.

loopdive/js2 · 45 tokens

create-issue

Create a new issue file from a test262 failure pattern. Includes smoke test, sample extraction, and proper frontmatter.

loopdive/js2 · 28 tokens

test262-pass-rates

Show current test262 pass rates for both the js-host (gc) and standalone targets side by side, from committed baseline summaries — no network fetch, no compile. Use for a quick conformance status check.

loopdive/js2 · 48 tokens