sandbox-bench

sandbox-bench is a skill for Claude Code, Codex from vercel/next.js. It costs 212 tokens per session (4,056 once invoked), scanned A, original, MIT.

A benchmarking process that compares two React or Next.js code revisions by running otherwise identical applications on cloud virtual machines. It measures request speed, latency, tail latency such as p95, and other captured resource and response-size data.

In plain words
What is it for?
It is for measuring React or Next.js changes against a base revision, including requests per second, response timing, memory use, time to first byte, and document or Flight response size when available.
Why use it?
It shows whether a code change improves or worsens real end-to-end performance instead of relying only on local measurements. Paired comparisons help account for variation between benchmark runs.

Skill for Claude CodeCodex

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/vercel/next.js/sandbox-bench
Any agent
npx skills add vercel/next.js --skill sandbox-bench
Clone the repo
git clone --depth 1 https://github.com/vercel/next.js

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 sandbox-bench

README.md
[![agentmods](https://agentmods.dev/badge/skills/vercel/next.js/sandbox-bench.svg)](https://agentmods.dev/skills/vercel/next.js/sandbox-bench)
Your own site
<a href="https://agentmods.dev/skills/vercel/next.js/sandbox-bench"><img src="https://agentmods.dev/badge/skills/vercel/next.js/sandbox-bench.svg" alt="Measured on agentmods" height="20"></a>
Per session 212 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,056 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 $0.00212 $0.04056
Opus 5 $0.00106 $0.02028
Sonnet 5 $0.00042 $0.00811
Haiku 4.5 $0.00021 $0.00406

Measured 3d ago against content hash f21d8fe37f89, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sandbox-bench 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 3d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (scripts/bench-analyze.mjs, scripts/bench-collect.mjs, scripts/bench-common.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/sandbox-bench/SKILL.md · 321 lines

How it starts

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

Sandbox bench: paired A/B perf runs for React and Next.js changes

Measures what a change is actually worth, end to end: two revisions ("arms") built into otherwise-identical Next.js apps, exercised by the bench/render-pipeline harness on Vercel Sandbox VMs, compared with paired statistics that treat the VM boot as the unit of replication. All heavy work happens on sandbox VMs; the laptop only orchestrates.

Scripts live in scripts/ next to this file and run from anywhere. Arms are git refs, resolved in cached clones of react and next.js; the Next side defaults to canary. Everything is cached content-addressed: first use of a new pair builds caches (~45-60 min extra, once); later runs boot straight into measurement.

One-time setup

  1. node scripts/config.mjs show — if it reports NOT CONFIGURED, ask the user which Vercel team and project the sandbox VMs should run under (these are billed resources; never guess, never default), then node scripts/config.mjs set team=<slug> project=<name>. Config lives in ~/.config/sandbox-bench/config.json — never commit team/project names into the repo.
  2. The Vercel CLI session must have access to that team. On a 403, stop launching (don't retry through it) and check whether access is already back: vercel whoami --scope <team-slug> plus one scoped read call (e.g. vercel sandbox ls) — grants drop and recover on their own, and a transient 403 needs no login at all. If verification still fails, run vercel login <team-slug> yourself as a background task (the token lives with the CLI session, not with the user). It opens a browser/device confirmation — relay the URL if one is printed — but keep re-running the verification pair every minute or two while it waits: access often returns before the login flow reports success, and once verification passes, kill the pending login and resume. After a 403 outage, expect in-flight runs to have died: run node scripts/bench-status.mjs and follow its recovery actions (measurement VMs will have hit their ~5h timeout if the outage was long — those cells need relaunching, not collecting).
  3. react and next.js clones land in the cache on first use (or point reactRepo/nextRepo in the config at existing checkouts).

Read the full file on GitHub · 321 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. 3d ago First seen · 321 lines · 212 tokens per session scan A f21d8fe37f89

Subscribe to this mod's changes

sandbox-bench is a skill published in the GitHub repository vercel/next.js (142,020 stars, last pushed 3d ago), licensed MIT. It adds 212 tokens to every session and 4,056 once invoked, about $0.0011 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.