sanity-bench
Skill by sanity-io
Runs, dispatches and reads the hermetic Studio performance benchmark suite in perf/bench. Covers local runs, the trigger:perf-bench PR label, Studio Bench workflow inputs and per-metric A/B verdicts. Built for maintainers who benchmark commits, PRs and releases.
Install sanity-bench
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.claude/skills && cp -r /tmp/sanity/.agents/skills/sanity-bench ~/.claude/skills/sanity-benchRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sanity/.agents/skills/sanity-bench ~/.gemini/antigravity-cli/skills/sanity-benchAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill explains how to run, dispatch and read the hermetic Studio performance benchmark suite in perf/bench. It measures a built studio in Chromium against an in-process mock of the Sanity API, with no tokens and no network. The main output is an A/B verdict per metric, taken from interleaved reference and experiment sessions with a cluster bootstrap. Verdicts can be regression, improvement, neutral or inconclusive.
The skill covers local runs and modes, the trigger:perf-bench PR label, and the Studio Bench workflow_dispatch inputs. It also explains how to read bench PR comments and failed Studio Bench runs, and how to add scenarios or extend the mock API. It is written for Sanity Studio developers and maintainers who need to benchmark a commit, compare two commits, or measure a release.
Written from the project's SKILL.md and checked against it.
What it can do
- Local bench runsRuns scenarios and modes such as pageload, inp, softnav and soak with pnpm bench run.
- A/B verdictsCompares reference and experiment sessions and reports a verdict per metric with a confidence budget.
- PR benchmarkingApplying the trigger:perf-bench label runs the suite on a PR head against its merge-base.
- Studio Bench dispatchUses workflow_dispatch inputs to run the suite, self-test, backfill a sha, or compare two commits.
- Release measurementMeasures a release commit and stores the result so it anchors the release marker in Radar.
- Soak testsRuns long-session soaks on singleString and article scenarios with excursions and presence.
- Scenario authoringDescribes how to add a bench scenario with a schema, a seeded defineScenario and CI matrix entries.
- Result interpretationExplains how to read verdict symbols, gates, missing scenarios and hermeticity failures.
What you need
- A built studio, via pnpm build:bench
- pnpm and a Node.js environment that can run the bench CLI
- Chromium for the browser-based benchmark runs
- GitHub CLI access to sanity-io/sanity to dispatch or watch Studio Bench runs
- Maintainer permission to apply the trigger:perf-bench label
Try asking
- Benchmark this PR against its merge-base using the bench suite
- Compare commit abc123 with commit def456 using Studio Bench A/B
- Explain the verdicts in this bench PR comment
Good to know
- Absolute numbers are host-relative and only comparable with the run's calibration score.
- Interaction runs default to 4x CPU throttle unless --throttle 1 is passed.
- Historical builds fall back or fail loudly depending on mode, as described in the source.
- A label on a PR re-runs the suite on every later push until the label is removed.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/sanity-bench/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB
Alternatives to sanity-bench
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
sanity-bench: common questions
What do the bench verdict symbols mean?
Red means regression, green means improvement, a check mark means neutral, and a white circle means inconclusive because the confidence interval is too wide within the budget.
Does the Studio benchmark need API tokens or network access?
No. The source says the suite runs against an in-process mock of the Sanity API with no tokens and no network.
How do I benchmark a pull request in Sanity Studio?
A maintainer adds the trigger:perf-bench label to the PR, and the suite runs an A/B comparison of the PR head against its merge-base.
How do I install sanity-bench?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sanity-bench free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is sanity-bench safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sanity-bench?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
