/arkive:snapshot-testingfrom arkive
Configures golden snapshot testing with Arkive: sets retention policy, records goldens, verifies UI regressions, and wires verification into CI. Diagnoses verifyShowcase build failures.
Ships in arkive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Lock in approved UI with goldens and make regressions fail the build via
verifyShowcase<Variant>. Read
references/arkive-cheatsheet.md for retention semantics, paths,
and failure behavior.
Scope: this is code-vs-code-as-last-approved, judged pixel-exact against committed
goldens. Code-vs-design (Figma/specs, judged by eye) is /arkive:design-loop — it
needs no goldens at all. Don't conflate them.
UI tree files (uitree/*.json) are not goldens: they are never verified, never written to
the golden directory, and retention ignores them.
Version gate (do this first): check the project's pinned arkive version.
verifyShowcase exists from 0.0.3; on anything older, verification silently cannot
fail. If the pin is older, upgrade first (/arkive:setup covers resolving latest).
Read the module's arkive { snapshotRetention }:
BASE, and explain the change to
the user, don't just do it silently. The explanation: under NONE the showcase
consumes every snapshot and nothing is verifiable; BASE keeps exactly one golden per
component, which is the regression signal, without committing every font/density/RTL
variant — a real app went from 57 goldens to 725 with variants retained, which is why
ALL is not the default recommendation.ALL only if the user explicitly wants variant-level regression coverage, and
pair it with Git LFS for the golden directory.Check .gitignore (root and module) for the golden directory
(src/test/snapshots/). Goldens must be committable — verification in CI is
meaningless against images that only exist on one laptop. If ignored, surface it and fix
it with the user (scoped: Arkive's files are all prefixed com.infinum.arkive_).
Run ./gradlew :<module>:generateShowcase<Variant> (recording takes minutes), then
verify the outcome — do not assume it:
com.infinum.arkive_-prefixed PNGs in <module>/src/test/snapshots/images/.arkive-showcase.json —
under BASE they should match one-to-one.Arkive: no snapshot recorded for component warnings. A
crashed preview has no golden and will never be covered by verification — report
each one to the user rather than letting coverage silently shrink. (Re-run with
--info to see the test-side crash message.)Run ./gradlew :<module>:verifyShowcase<Variant> immediately. It must be green against
the goldens just recorded. Only then commit the goldens. Committing unverified goldens
means the first CI failure is undebuggable ("was it ever green?").
verifyShowcase fails with one aggregate error naming every mismatched component,
each with a delta-image path
(<module>/build/paparazzi/failures/<variant>/delta-*.png) and an accept command.
| Failure shape | Meaning | Action |
|---|---|---|
Arkive: snapshot verification failed for N component(s) | Rendering differs from the golden | View the delta image for each named component, then decide: regression → fix the code; intentional change → re-record |
| Missing golden for a component | Component added/renamed since goldens were recorded | Re-record and commit the new golden |
verifyShowcase... has nothing to verify — snapshotRetention is NONE | Fails fast at configuration time | Go to Step 1 |
The consumer's own verifyPaparazzi failing on non-Arkive tests | Their tests, their goldens | Out of scope — Arkive's generated test self-skips what retention didn't keep and never affects theirs |
Intentional change flow: generateShowcase<Variant> (re-records everything and
retention re-prunes) → verifyShowcase<Variant> green → commit the updated goldens in
the same PR as the UI change.
Run verifyShowcase<Variant> on pull requests. Goldens live in the repo; recording
happens locally, never in CI — a CI that re-records and verifies in one run can never
fail. If JVM rendering differs across OSes (fonts), pin the CI runner OS to what the
team records on.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub infinum/arkive --plugin arkive5 skills in this plugin
/annotateUse when adding, editing, or reviewing Arkive annotations — @ArkiveComposable, @ArkiveView, or curating what @Preview components show in the catalogue: names, groups, tags, skip, Figma designNodeId. Triggers every time a component or screen is added to the Arkive showcase or its catalogue metadata changes. Enforces the shared naming/grouping conventions so the sidebar tree stays consistent./design-loopUse when: (1) implementing UI from a Figma design in a project that uses Arkive, (2) validating UI changes against a design or spec, (3) reviewing screens visually after a change. Enforces the loop: implement with existing components → regenerate showcase → load snapshot + design truth in the same turn → enumerate differences → fix or STOP-and-ask. Compares against fresh showcase output — no goldens or snapshot tests involved. Runs Gradle locally./findUse BEFORE implementing any new screen or component from a Figma design or spec in a project that uses Arkive, and whenever asked "do we already have X?". Searches the Arkive catalogue (names, groups, tags, Figma node ids) plus the source code for existing implementations, visually triages the suspects in a subagent to keep images out of the main context, and returns one of: use it, extend it, or build new. Exists to prevent duplicating shared components./setupUse when: (1) adding Arkive (com.infinum.arkive) to a project for the first time, (2) upgrading an existing Arkive installation, (3) generating and viewing the showcase for the first time. Installs the published Maven Central version, configures every module that has previews, and ends with a browsable showcase — setup is not done until the user has seen it. Not for the arkive repo itself (it has its own bootstrap, see its CLAUDE.md).Other plugins' skills for the same job