Skip to content
Back to skills

Validate Changes

ASecurity

Choose how to check an Instrument change: unit tests, sandbox shell, a real agent across models, or the running app. Use after changing an agent tool, a prompt, a skill, the sandbox, or any behavior reading the code cannot confirm.

  • 6 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added August 31, 2026
ai-agentsrustgoshellbashsqlnodedebuggingdatabase

Works with

  • cli

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add instrument-org/instrument --skill validate-changes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Validate Changes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Validate Changes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/instrument-org-validate-changes/badge)](https://www.skillsdirectory.com/skills/instrument-org-validate-changes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: validate-changes
description: Choose how to check an Instrument change: unit tests, sandbox shell, a real agent across models, or the running app. Use after changing an agent tool, a prompt, a skill, the sandbox, or any behavior reading the code cannot confirm.
---

# Validating a change

Four ways to run this product, cheapest first. Each rung is slower and less
convenient than the one below it, and answers a question the ones below it
cannot. **Start at the lowest rung that can actually answer your question, then
stop.**

| Rung             | Runs                     | Agent | Model calls | Answers                 |
| ---------------- | ------------------------ | ----- | ----------- | ----------------------- |
| 1. Unit tests    | pure functions, machines | no    | no          | is the logic right      |
| 2. Sandbox shell | `just-bash` + shims      | no    | no          | does the command behave |
| 3. Real agent    | full agent loop          | yes   | yes         | does a model _use_ it   |
| 4. Studio        | the whole app            | yes   | yes         | does it work for a user |

The trap is stopping one rung too low and reporting the rung above's
conclusion. Rungs 1 and 2 have no model in them: you pick the inputs, so they can tell you a
mechanism works but never that an agent will find it, understand the tool
description, or choose the right arguments. Only rung 3 answers that.

## What did you change?

- **A pure function, a schema, an XState machine** -> rung 1.
- **A shell command, a shim, sandbox paths, network policy** -> rung 2.
- **A tool's inputs, output, or `toModelOutput` text** -> rung 1 for the text
  itself, then rung 3, because that text only matters if a model acts on it
  correctly.
- **A tool description, a system prompt, a skill, tool selection** -> rung 3
  only. There is nothing below it that involves a model, so nothing below it can
  answer the question.
- **New or changed behavior a user can reach** -> rung 4. A spacing, color, or
  copy tweak the diff already describes in full is not that, and neither is a
  change you can confirm in an instance that is already running: look at that
  one instead of booting another.

## Rung 1: unit tests

```bash
pnpm --filter @instrument-org/workspace exec vitest run <path/to/file.test.ts>
```

Root-level checks (`pnpm exec turbo run check:types check:lint`) are in the root
`AGENTS.md`.

## Rung 2: the sandbox shell

Boots the same `just-bash` sandbox the agent gets (same mounted filesystem, same command
shims, same network policy) without Studio.

```bash
pnpm --filter @instrument-org/workspace run --silent script:run-bash -- "<command>"
```

Full options, folders, and what the sandbox provides: `run-bash` skill.

## Rung 3: a real agent, on real models

Boots the real workspace machine and runs the agent loop against real models.
This is the only rung that tells you whether a model finds and uses what you
built.

```bash
APP_CLAUDE_CODE_PATH=$HOME/.local/bin/claude pnpm eval run --yes --prompt "<task for the agent>" \
  --model 'anthropic/claude-haiku-5.5?provider=claude-account&providerConfigId=claude-account' --paid
```

- Runs from the repo root; no `cd` first.
- `--prompt` runs the agent as a task of a chat the run makes for it; add
  `--chat` to send it through the chat the user talks to, which does quick
  work itself and hands the rest to tasks.
- **`--model` is required, and there is no default set.** `pnpm eval models
[pattern]` lists what the configured providers can run today, newest first,
  each row spelled the way `--model` takes it. Pick for the question you are
  actually asking, and say which models you ran and why when you report the
  result.
- **Claude Haiku 5.5 on the Claude account, as above.** It is the lowest
  intelligence level the product supports, so "does a model find this
  affordance" is answered there; answering it on a frontier model spends real
  money on a question that did not need one. It is metered, and anything
  metered is refused until `--paid` is passed. Workers AI (`cf:<id>`) runs
  unmetered, but its models leave finished work in the chat's folder rather
  than the person's, so a run on one says nothing about where work goes.
- `--model` repeats to build a case x model matrix. Different models fail
  differently; one model succeeding is weak evidence. `--repeat` samples the
  same model more than once, which is what a nondeterministic result needs.
- A bare slug reads as OpenRouter, and a full model URI
  (`<model>?provider=<p>&providerConfigId=<p>-config-id`) pins any other
  configured provider. Both are metered, so both need `--paid`.
- Each run prints the path to a rendered `session.md`, filed under
  `<case>/<model>`. **Read it.** The tool sequence is the result; the agent's
  closing summary is not.
- A proposed prompt rule, note or refusal cites the transcripts that show the failure (an eval's `session.md` checked against its commit, or real chats). A prompt read or a tally of failed assertion names is speculation; say so or don't raise it.
- Check the summary's failed-request line before trusting anything: a run that
  dies on a rate limit still produces a task and a transcript. A run reported as
  `Stopped` is not that: the harness or the case ended it on purpose.
- Exit status is non-zero when an assertion failed or a request was refused, so
  the run does not have to be read to know whether it passed. `--json` and the
  `summary.json` beside the results carry the same verdict per case and model.
- Changing an assertion costs nothing to re-check: `pnpm eval report <workspace
dir>` re-runs every assertion against the sessions already recorded. The run
  prints the exact command to use.
- **How a model reads one tool result** is cheaper than a harness run: render the result with the repo's real function, send it to the provider as a `tool` message after a synthetic `tool_calls` turn, and compare conditions over a few samples each. Classify on the reply text too, since tool calls against a hand-written schema often come back as prose.

Committed cases live in `packages/workspace/evals/cases/` (`pnpm eval list
[pattern]` names them, `pnpm eval run <pattern>` runs them); add one when a
behavior is worth guarding permanently. Details in the
`workspace-evals` skill.

**The browser here is not the app's.** The in-app browser lives in the
Electron app, so an eval run has no Studio guest: the harness stubs the
browser targets. `agent-browser` still works, because with no Studio target it
launches a Chromium of its own, so `open`, clicks, snapshots and our wrapper
around them all run for real, and an eval is the cheapest real check of how
the agent uses the browser: the skill, the targeting guidance, what a command
prints. What it cannot show is anything specific to the guest -- the CDP
bridge, guest sizing, the panel the user watches -- which has no rung below 4. Check the tool sequence for a real `open` and its output before believing
a browser eval either way.

## Rung 4: the running app

```bash
node .agents/skills/studio-chrome-devtools/scripts/studio-drive.mjs boot --purpose "change check"
```

Start it this way and no other, replacing the purpose with one or two short
words that identify what you are checking. `boot` reuses the instance already
running for this checkout instead of adding a second one, takes a debug port
derived from the checkout path so two checkouts never contend for one, and
records what it started so it can be stopped again. It runs the same
`electron-vite dev` underneath with main held at the bytes it booted with, so
a main-process edit needs a fresh boot, and renderer edits still hot reload:
an edit landing mid-run resets the state you navigated to.

- Drive it in the product's words (`studio-drive.mjs run -e '…'`), inspect
  it, or call an RPC route: `studio-chrome-devtools` skill.
- Read main-process logs: `studio-dev-logs` skill.
- Headless or in a VM: `.agents/cloud-dev.md`.
- `studio-drive.mjs stop` when the check is done, unless you booted it for
  someone to look at.

A scripted drag holds still and moves in clean steps, so it passes drags a hand cannot hit (a target that arms after a rest, say). Run it again with no rests and a jittered path, and report drag and hover behavior from a script as a scripted pass, not as working.

Three things not to do, each of which costs someone else their session:

- **`pnpm studio` or `pnpm dev` with a `REMOTE_DEBUGGING_PORT` you picked.**
  A hand-picked port is either already a window someone is using, and you will
  connect to their app and report confidently about the wrong code, or it is
  nobody's, and nothing can drive what you just started. Either way it is a
  second copy of an app that was probably already running.
- **`pkill -f electron-vite`, `pkill -f Electron`, or any sweep naming neither a
  pid nor a checkout.** Agents and a human share this machine, and those
  patterns kill every instance on it. `stop` targets the one it started.
- **Input or a reload sent to a window someone is using.** Whatever is under the coordinates gets clicked (an Allow button, say), and a reload drops their pages and work in flight. Screenshots and read-only `eval` are fine there; for anything else, boot your own instance.

## Inspecting a run afterwards

- `session-transcript` skill — render any task's session as markdown, including
  one from an exported `.zip`. This is also how you read a real user's run.
- `chat-database-query` skill — read a chat's records, or run read-only SQL
  against a database an unconverted or set-aside chat still has, when the
  transcript is not enough.
- `find-ui-changes` skill — which recent commits changed user-visible surfaces.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.