Agent skill

Analyses Snapshot Testing

by Opentrons in Opentrons/opentrons

Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/.

Apache-2.0Auto-check passedDevOps & Cloud

Install Analyses Snapshot Testing

skills CLI
$ npx skills add Opentrons/opentrons --skill analyses-snapshot-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Opentrons/opentrons analyses-snapshot-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Opentrons/opentrons.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/analyses-snapshot-testing .claude/skills/analyses-snapshot-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
analyses-snapshot-testing
GitHub stars
521
Token cost
~1.7k tokens
SKILL.md length
522 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/.

  • Works in 7 steps: Protocol Files (files/protocols/) —… → Analysis Engine (automation/analyze.py)… → Snapshot Storage (tests/snapshots/) —… → …
  • Working with protocol analysis snapshots
  • SKILL.md covers Overview, Architecture, Protocol Naming Convention and Development Workflow, plus 5 more sections
  • Calls make and uv

What it does

Analyses Snapshot Testing is an agent skill from Opentrons/opentrons. Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/. Use when working with protocol analysis snapshots, adding protocols, updating snapshots, or running snapshot tests.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud. The repository describes itself as: Software for writing protocols and running them on the Opentrons Flex and Opentrons OT-2. The licence is Apache-2.0.

When your agent uses it

  • Working with protocol analysis snapshots
  • Adding protocols
  • Updating snapshots
  • Running snapshot tests

Example prompts

  • “Use the analyses-snapshot-testing skill to convention for the analyses snapshot testing framework in analyses-snapshot-testing/”
  • “/analyses-snapshot-testing”

Requirements

  • Python 3
  • Node.js
  • Docker

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Protocol Files (files/protocols/) — testing protocols organized by source (standard, Protocol Designer exports, Protocol Library imports…
  2. Analysis Engine (automation/analyze.py) — runs protocol analysis in subprocess, 120-second timeout, JSON output
  3. Snapshot Storage (tests/snapshots/) — committed JSON snapshots managed by syrupy with custom JSON extension
  4. Test Suite (tests/) — analyses_snapshot_test.py (main), audit_snapshot_test.py (audit), custom_json_snapshot_extension.py (serialization)
  5. Audit (automation/audit_snapshots.py) — validates snapshots: Flex_S protocols must have zero errors; Flex_X and other failure-case…
  6. Protocol Registry (automation/data/) — protocols.py (auto-generated), protocols_with_overrides.py (manual), protocol_registry.py (combined)
  7. CI/CD (citools/, .github/workflows/) — matrix-based parallel execution via Docker

What it can do on your machine

Read from SKILL.md and the folder at commit a14fef9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Analyses Snapshot Testing loads about 1.7k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 522 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Opentrons/opentrons at commit a14fef9, republished under its Apache-2.0 licence (© Opentrons). 522 words, ~1,681 tokens.

Download SKILL.mdSave it as .claude/skills/analyses-snapshot-testing/SKILL.md (or your agent's skills folder).
name
analyses-snapshot-testing
description
Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/. Use when working with protocol analysis snapshots, adding protocols, updating snapshots, or running snapshot tests.

Analyses Snapshot Testing Instructions

Overview

The analyses-snapshot-testing directory validates that protocol analysis output remains consistent across code changes by comparing JSON results against committed snapshots.

  • Regression testing: Detect unintended changes in protocol analysis behavior
  • Protocol validation: Ensure Flex protocols analyze correctly
  • CI/CD: Automated testing in GitHub Actions with matrix-based parallel execution
  • Snapshot management: Track expected output and flag deviations

This repository is Flex-only. All protocols must target Flex (or OT-3) robots.

A standalone OT-2 compatibility test (tests/test_ot2_compatibility.py) runs via make ot2-compatibility-test. It uses a fixture protocol in tests/fixtures/ and is not part of chunk generation, protocols.py, or syrupy snapshots. CI runs it in analyses-snapshot-test.yaml (not the lint workflow).

Architecture

Core Components
  1. Protocol Files (files/protocols/) — testing protocols organized by source (standard, Protocol Designer exports, Protocol Library imports, generators)
  2. Analysis Engine (automation/analyze.py) — runs protocol analysis in subprocess, 120-second timeout, JSON output
  3. Snapshot Storage (tests/__snapshots__/) — committed JSON snapshots managed by syrupy with custom JSON extension
  4. Test Suite (tests/) — analyses_snapshot_test.py (main), audit_snapshot_test.py (audit), custom_json_snapshot_extension.py (serialization)
  5. Audit (automation/audit_snapshots.py) — validates snapshots: Flex_S protocols must have zero errors; Flex_X and other failure-case protocols are expected to have errors
  6. Protocol Registry (automation/data/) — protocols.py (auto-generated), protocols_with_overrides.py (manual), protocol_registry.py (combined)
  7. CI/CD (citools/, .github/workflows/) — matrix-based parallel execution via Docker

Protocol Naming Convention

markdown
{Robot}_{Status}_{Version}_{Source}_{Pipettes}_{Modules}_{Overrides}\_{Description}
  • Robot: Flex
  • Status: S (Success) or X (Failure expected)
  • Version: API version (e.g., v2_19) or PD (Protocol Designer)
  • Source (optional): PL_ (Protocol Library) or MPL_ (Manual Protocol Library)
  • Pipettes: e.g., P1000M_P50M
  • Modules: GRIP, HS, MM, MB, TC, TM
  • Overrides: Overrides if protocol has parameter overrides
  • Description: Max 25 characters

Example: Flex_S_v2_19_P1000M_GRIP_HS_TM_MB_KAPALibraryQuant.py

Development Workflow

Adding New Protocols
  1. Create protocol file in files/protocols/ following naming convention
  2. Run make prep (auto-updates automation/data/protocols.py, displays snapshot command)
  3. Generate snapshots: make snapshot-test-update PROTOCOL_NAMES=YourProtocolName OVERRIDE_PROTOCOL_NAMES=none
  4. Commit protocol file + snapshot + updated protocols.py
Adding Override Protocols
  1. Create generator in files/protocols/generators/
  2. Add entry to automation/data/protocols_with_overrides.py
  3. Generate snapshots: make snapshot-test-update PROTOCOL_NAMES=none OVERRIDE_PROTOCOL_NAMES=YourOverrideProtocol
  4. Commit generator + snapshot + updated registry
Show full SKILL.md (200 more words)Show less
Updating Snapshots
bash
make snapshot-test-update                                          # All
make snapshot-test-update PROTOCOL_NAMES="P1,P2" OVERRIDE_PROTOCOL_NAMES=none  # Specific
Running Tests Locally
bash
make snapshot-test                                                   # All (reduced verbosity)
make snapshot-test PROTOCOL_NAMES=Flex_S_v2_19_Example OVERRIDE_PROTOCOL_NAMES=none  # Specific
uv run python -m pytest -k analyses_snapshot_test -vv --tb=short    # Verbose debugging

Code Modification Guidelines

When Modifying Analysis Logic (api/, shared-data/)
  1. Run snapshot tests to detect changes
  2. Review diffs carefully
  3. Update snapshots only if changes are intentional
  4. Document breaking changes in commit messages
Protocol Registry (automation/data/protocols.py)
  • DO NOT manually edit — auto-generated by make prep
  • Regenerate after adding/removing protocols
Snapshot Extension (tests/custom_json_snapshot_extension.py)
  • Normalizes timestamps, IDs, file paths for stable comparisons
  • Add new normalization rules to replacement_patterns
  • Add new ID-like fields to id_keys_to_replace

Environment Setup

Prerequisites: Python 3.12, uv, Node.js/pnpm (for prettier)

bash
cd analyses-snapshot-testing
make setup    # Creates uv venv and installs dependencies

The setup script (bootstrap_uv_env.py) installs api and shared-data as editable packages so analysis uses local code. It creates a Python 3.12 venv by default (UV_PY=3.12).

Common Commands

bash
# Setup
make setup                    # Initial environment setup
make teardown                 # Remove virtual environment

# Testing
make snapshot-test            # Run all snapshot tests
make snapshot-test-update     # Update all snapshots
make snapshot-audit-test      # Validate snapshot audit metadata
make ot2-compatibility-test # Standalone OT-2 rejection test (not in snapshot battery)
make snapshot-validation    # snapshot-audit-test + ot2-compatibility-test

# Protocol Management
make prep                     # Regenerate protocol registry
make generate-protocols       # Generate override protocols

# Formatting
make format                   # Format Python + Markdown
make ruff                     # Format and lint Python

# CI Simulation
make gen-chunks               # Generate protocol chunks
make analyze-chunk CHUNK=chunk_0.json  # Analyze specific chunk

CI/CD Integration

Workflow (analyses-snapshot-test.yaml) triggers on:

  • PRs affecting api/, shared-data/, or this directory
  • Scheduled daily at 7:26 AM UTC
  • Manual dispatch

PR label gen-analyses-snapshot-pr auto-opens a PR with updated snapshots on failure.

Troubleshooting

  • Snapshot mismatch: Review diff, update if intentional (make snapshot-test-update PROTOCOL_NAMES=...), fix code if not
  • Protocol not found: Check registry, run make prep, verify file exists and follows naming convention
  • Analysis timeout (120s): Simplify protocol or increase timeout in automation/analyze.py
  • Environment issues: Run make setup, ensure uv is installed and Python 3.12 is available

© Opentrons, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/analyses-snapshot-testing of Opentrons/opentrons.

Open the folder on GitHubat commit a14fef9

Compare with similar skills

Analyses Snapshot Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Analyses Snapshot Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Analyses Snapshot Testing this skillOpentrons/opentrons521—~1.7kAutomated safety check: PassApache-2.0
Monitor CInrwl/nx29k6 repos~4.7kAutomated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw35k6 repos~4.2kAutomated safety check: PassApache-2.0
Vercel Optimize Auditvercel-labs/agent-skills32k9 repos~4.3kAutomated safety check: PassNone
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Analyze GitHub Action Logswithastro/astro63k1 repos~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Monitor CI

    nrwl/nx

    Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.

    29k GitHub starsUsed in 6 repos~4.7k tokens
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    35k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 9 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Official

    Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements.

    63k GitHub starsUsed in 1 repo~1.3k tokens
    DevOps & CloudAuto-check passed
  • Creates and queries KubeSphere users, workspaces and projects and assigns built-in roles, defaulting to least privilege and never deleting anything.

    17k GitHub starsUsed in 1 repo~3.1k tokens
    DevOps & CloudAuto-check passed

More from Opentrons/opentrons

All 17 skills in this repo
  • AI Client

    Opentrons/opentrons

    Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing.

    521 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • AI Server

    Opentrons/opentrons

    Conventions for the opentrons-ai-server FastAPI service — project structure, uv dependency management, settings, testing, Docker, and deployment.

    521 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check: notes
  • CSS Modules

    Opentrons/opentrons

    CSS Modules conventions, Stylelint rules, design tokens (spacing, colors, typography, border-radius), and patterns for the Opentrons monorepo.

    521 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Docs

    Opentrons/opentrons

    Authoring and styling guidelines for the Opentrons /docs MkDocs project.

    521 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • E2E Testing

    Opentrons/opentrons

    E2E testing conventions for Protocol Designer and Labware Library using Playwright + pytest in e2e-testing/.

    521 GitHub stars~3k tokensUpdated yesterday
    Auto-check: notes
  • JS Package Testing

    Opentrons/opentrons

    Vite demo and Playwright + Applitools tests for packed @opentrons JS packages in js-package-testing/.

    521 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Analyses Snapshot Testing

What does Analyses Snapshot Testing do?

Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/. Analyses Snapshot Testing is an agent skill from Opentrons/opentrons. Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/.

When should I use Analyses Snapshot Testing?

Analyses Snapshot Testing fits situations like: working with protocol analysis snapshots; adding protocols; updating snapshots; running snapshot tests.

How do I install Analyses Snapshot Testing in Claude Code?

Run `npx skills add Opentrons/opentrons --skill analyses-snapshot-testing -a claude-code`. Or copy the skill folder (.cursor/skills/analyses-snapshot-testing in Opentrons/opentrons) into .claude/skills/analyses-snapshot-testing in your project. Claude Code loads it when a task matches its description.

How do I install Analyses Snapshot Testing in Codex?

Run `npx skills add Opentrons/opentrons --skill analyses-snapshot-testing -a codex`. Or copy the skill folder (.cursor/skills/analyses-snapshot-testing in Opentrons/opentrons) into .agents/skills/analyses-snapshot-testing in your project. Codex loads it when a task matches its description.

Can I use Analyses Snapshot Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Opentrons/opentrons --skill analyses-snapshot-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/analyses-snapshot-testing, .gemini/skills/analyses-snapshot-testing, .github/skills/analyses-snapshot-testing and .opencode/skills/analyses-snapshot-testing in your project.

What does Analyses Snapshot Testing need to run?

Going by SKILL.md and its folder, Analyses Snapshot Testing needs the command-line tools its instructions call (make and uv). Our summary lists: Python 3; Node.js; Docker.

Does Analyses Snapshot Testing access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Analyses Snapshot Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Analyses Snapshot Testing use?

Analyses Snapshot Testing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Analyses Snapshot Testing use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Analyses Snapshot Testing?

Skills that share tags, products or a category with Analyses Snapshot Testing: Monitor CI (nrwl/nx, 29k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 35k stars), Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars) and Openclaw Live Updater (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Analyses Snapshot Testing?

Opentrons (a GitHub organization) maintains it in Opentrons/opentrons, which has 521 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.

Source: Opentrons/opentrons on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.