Skip to content
Back to skills

Workspace Evals

FSecurity

Run, write, or read Instrument agent evals (`pnpm eval`) against real models, including chat evals that hand work to tasks. Use once an eval is the chosen check (the validate-changes skill decides that), or when adding a case under packages/workspace/evals/cases/ or reading eval-results.local.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentspythongobashexpressapi

Works with

  • claude code
  • terminal
  • api

Security analysis

F35/100
  • highCreates or modifies cron jobs for persistent execution
  • criticalModifies startup scripts or system services for persistence
  • criticalSends environment variables or credentials to an external URL

Pro shows the line behind each finding and how to fix it

Scanned December 1, 2026

npx -y skills add instrument-org/instrument --skill workspace-evals --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workspace Evals?

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

Security grade badge for Workspace Evals
[![Security: F — Skills Directory](https://www.skillsdirectory.com/api/skills/instrument-org-workspace-evals/badge)](https://www.skillsdirectory.com/skills/instrument-org-workspace-evals)

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: workspace-evals
description: Run, write, or read Instrument agent evals (`pnpm eval`) against real models, including chat evals that hand work to tasks. Use once an eval is the chosen check (the validate-changes skill decides that), or when adding a case under packages/workspace/evals/cases/ or reading eval-results.local.
---

# Workspace evals

`packages/workspace/evals/` boots the real workspace machine and runs the actual agent loop against real models. `evals/cases/` holds committed cases with assertions; `--prompt` runs a throwaway one.

The harness is the agents' own tool. Nobody runs evals by hand, so it serves whatever check you need next: when a behavior cannot be expressed as a case (a state the run never reaches, a wait it cannot script, an assertion with no helper), change the harness until it can, rather than recording the behavior as untested.

Writing a case or extending the harness needs no ask, but running one does: propose the run (cases, models, why, rough cost) and wait for the go-ahead, then run one model, few cases, serially. A subagent runs an eval only when its brief carries the user's go-ahead for that run (which cases, which models, rough cost), and stays inside it; without one it writes the case and stops.

`pnpm eval` also exists at the repo root, so none of these need a `cd` first.

```bash
pnpm eval models [pattern]                        # what the providers can run today
pnpm eval list                                    # committed cases
pnpm eval run [pattern] --model <model> --paid     # run them
pnpm eval run --yes --prompt "..." --model <model> --paid # one ad-hoc case
pnpm eval report <workspace-dir>                  # re-report a past run, at no cost
```

Flags: `--model` (**required** for `run`, repeatable; `cf:<id>` means Workers AI, bare slug means OpenRouter, full model URI pins any configured provider), `--paid` (required before any metered model runs), `--effort` (`none|low|medium|high|max`, recorded on every task the run creates), `--name`, `--repeat`, `--concurrency`, `--dry-run`, `--include-context`, `--json`.

The ChatGPT account, the provider most users sign in with and the cheapest one to test real models on, is configured from `APP_CHATGPT_ACCOUNT_TOKEN`. `pnpm --silent script:chatgpt-account-token` prints the token of the first account signed in to the installed app (`--email <address>` for another, `--dev` for a dev build's), so a run is `APP_CHATGPT_ACCOUNT_TOKEN=$(pnpm --silent script:chatgpt-account-token) pnpm eval run --model 'openai/gpt-5.6-sol?provider=chatgpt-account&providerConfigId=chatgpt-account' ...`. Evals name that config `chatgpt-account`; the app gives each account an id of its own, so a model URI copied from a real transcript needs its `providerConfigId` swapped. The token lasts about an hour and only the app renews it, so it does not belong in `.env`; the same token works for direct requests to `https://api.openai.com/v1/responses` with `store: false` and `stream: true`.

`run` and `report` exit non-zero when an assertion failed or a model request was refused, so a failed suite is visible without reading the output. A run a model request failed in (or that ended between a call and its running) is errored: its assertions describe a run that never happened, so they are left out of `passed`, `total` and `pass_rate`, and the run is listed first, under `errored` in `summary.json` and at the top of the printed summary, with the first error and where its results are. `--json` prints the whole report as one line on stdout with all narration on stderr; the same payload is always written to `summary.json` in the results directory, which is the more reliable thing to script against. Color is emitted only to a terminal, so a piped run needs no escape-stripping.

A run stops itself at `--max-run-cost` ($2, its model requests and searches together) or `--max-run-seconds` (1800). `--max-run-tokens` caps tokens when given; without it, a 1M-token cap applies only to a run whose cost cannot be read, such as a Workers AI model, since an agent's tokens are mostly cheap cache reads. Each takes `0` to disable. Neither is a failure and both are reported apart from one: a stopped run is `Stopped`, only a refused request is `Errored`. The seconds cap is one deadline for the whole run rather than one per wait, so a case with follow-ups cannot quietly take three times the number you set.

Every run gets a home directory of its own in the system's temp folder, or wherever `INSTRUMENT_EVAL_HOME` points (`evals/lib/sandbox-home.ts`), and each folder a case attaches is copied into it (at its top level, else in Documents, Desktop or Downloads), where a person keeps their folders. This is not optional tidiness: every chat reaches the user's real home and their real `~/Documents/Instrument` without being sent either, and every task it starts reaches the same folders, so an unsandboxed suite is several agents at once holding read-write on your actual files. Both folders derive from one `$HOME` for the whole process, so chat cases want `--concurrency 1` and a separate process per model when two runs must not see each other's output.

Cases without `macApps` reach this Mac's real apps (`osascript` is a sandbox command), so a run can leave reminders or calendar events, or install a LaunchAgent in the real home. After a run, check `~/Library/LaunchAgents`, `crontab -l` and `atq`, remove what it installed, and report what it left. Never run a case that could send a real message unless the send waits on a choice.

A computer with room off its boot disk names a folder there as `INSTRUMENT_EVAL_TMPDIR` in its own `packages/workspace/.env` (`evals/lib/eval-tmpdir.ts`), and every run's temp folder, workspace and the shared runtime go there. The run's home, the folders copied into it and a case's stand-in drives stay in the system's temp folder, so the paths an agent is handed look like a person's rather than sitting beside the app's data on a drive with a long name. The folder has to exist: when its drive is not mounted, the run says so and uses the system's temp folder. A folder with a space in its path gets a warning, since agents still see it in their work folder and the runtime's skills, and models garble spaced paths.

A case built from a problem report reproduces the failure's shape, never the person's words, files or an identifying subject: reword every prompt, change the subject, use public-domain or drawn fixtures, and say where a fixture came from. Running the verbatim wording locally to confirm a reproduction is fine; committing it is not.

People never ask for work "in the background" or "as a task": whether work forks is the harness's call. A case's prompt never cues it, and no case fails a run only because no task started; judge forking by what the person gets (the chat stays free, stop stops it, the result lands). A low fork rate is fine, so never add prompt lines that push forking up.

## Choosing models

**There is no default model set, and `--model` is required.** A list of models living in a source file is one nobody re-reads: it goes stale as providers ship, and it answers whatever question it was written for rather than the one being asked now. A default is also what an unattended agent takes, which is how a change ends up validated against models chosen by whoever last edited a constant. `pnpm eval models [pattern]` asks the configured providers what they can run today, newest first, with each row spelled the way `--model` takes it.

So the choice is yours to make per question, and yours to report: **say which models you ran and why you picked them**, in the same breath as the result. A result that does not name its models is not a result anyone can weigh.

**Claude Haiku 5.5 on the Claude account is the model to test on, and the only model to run unless the person names others.** It is the lowest intelligence level the product supports: what works for it works at least as well on every model above it, so a second or third model adds cost rather than confidence. It is also fast, cheap, and runs on credits the team already has. It is the model named in the error a bare `run` produces (`HOUSE_FLOOR` in `evals/harness.ts`); it is a hint rather than a default, and nothing runs it unless someone passes it. A case that hinges on the agent's own judgment gets `--repeat 3` or more, since the spread between runs of one model outweighs most differences between models. It is metered, and a metered model is refused without `--paid`, because the cost of a suite is one case times one model list and lands long after the command that started it. Workers AI (`cf:<id>`) runs without `--paid`, but every model on it leaves finished work in the chat's folder rather than the person's, so a run on one says nothing about where work goes.

**A Claude model runs through the Claude account, never through OpenRouter.** Point `APP_CLAUDE_CODE_PATH` at a signed-in Claude Code and name the model on that provider: `APP_CLAUDE_CODE_PATH=$HOME/.local/bin/claude pnpm eval run <cases> --model 'anthropic/claude-haiku-5.5?provider=claude-account&providerConfigId=claude-account' --paid`. That runs on the signed-in plan, through the same harness the app uses. Without the variable there is no `claude-account` config, and the run stops with `Provider config for claude-account not found`. Claude Code keeps what each run did outside the eval home: transcripts in a folder under `~/.claude/projects/` named for the eval home, and resume records in `~/.claude/instrument-sessions/`. The run deletes both once its report is written (`evals/lib/claude-account-leftovers.ts`); a run killed before then leaves them.

The harness prints what each model resolved to and records it as `resolvedModelId` in the run's `eval-case.json`, which matters for a `--paid` run against an OpenRouter `~author/<name>-latest` alias, since "latest" is not a build anyone can identify a month later.

## Results

Results land in `eval-results.local/<timestamp>/<case>/<model>/` as `session.md` (the rendered transcript), `stats.json`, `errors.json`, `assertions.json`, and `eval-case.json`, with copies of the chat's records (`record/`), its work folder (`task/`) and its own folder under `Chats/` (`chat-folder/`). Case and model name the path and every printed line, because a seven-model run is otherwise twenty-one directories distinguished by a numeric suffix. Each run's cost says where it came from: `billed` is what the provider's responses reported charging (OpenRouter's `usage.raw`, with the upstream charge when the key is the person's own), `estimate` is the catalog price on tokens for a step that reported nothing, and searches are a separate estimate (`searchCostUSD`). A step stopped before its usage arrived is counted as unmetered rather than priced at zero.

An assertion a judge model scores (`evals/lib/judge.ts`: Haiku 5.5 through OpenRouter, on `APP_OPENROUTER_API_KEY`) reads the run's words against a rubric, as every reply-language (`rl-*`) case does with its entry in `REPLY_LANGUAGE_RUBRICS`. When the judge has no key, fails, or answers without a verdict, the assertion is unscored: printed with `?`, counted as `unscored` in `assertions.json` and `summary.json`, and left out of `passed`, `total` and `pass_rate`. A run whose assertions are all unscored measured nothing.

A run of more than one case or model, or with `--repeat <n>`, runs each case of each trial on each model in a process of its own, with its own home and workspace, so no run sees the files or memories another saved. Each writes to `trial-<n>/<case>/` in the run's directory (`trial-<n>/<case>/<model>/` when the run names more than one model), and the run's `summary.json` holds every result, each with its `trial`, plus each case's min, median and max cost and tokens across trials under `spread`.

`summary.json` carries a `provenance` block so a directory can still say what it measured months later: the commit and branch, whether tracked files differed from it, and the sha256 of the system prompt each task was actually scored against (also per task, in `eval-case.json`). The dirty flag is the one to read, because measuring a prompt edit before committing it is the ordinary way a change gets scored. More than one digest in a run means the session context was rebuilt part way through and the tasks were not all scored against the same prompt. `report` omits the commit, which would describe the checkout re-scoring rather than the one that ran; the digest comes from the sessions and survives.

Every run uses one runtime folder, `instrument-eval-runtime` in the temp folder (`evals/lib/workspace-cleanup.ts`), as the app keeps one runtime for every workspace on a computer: the Python base, caches and skill environments, 500 to 700 MB, built by the first run and reused by every later one, including runs going at once, which rely on the app's own handling of several processes sharing a runtime. Nothing removes it; delete it by hand to make the next run build it again. `--fresh-runtime` gives a run a runtime of its own in its workspace, built from nothing as on a first launch, and removes it once reported unless `--keep-workspace` is passed. The shared runtime holds one copy of the bundled skills, which every launch rewrites from its own checkout, so a run scoring an edit to a bundled skill while another checkout's runs are going passes `--fresh-runtime`. `APP_REGISTRY_DIR_PATH` points a run at another registry root holding `skills/` (a skills checkout, or a copy with one skill edited), so a skill change is scored before it is pinned (`resolveRegistryDir` in `evals/utils.ts`). It is read per process, so A/B arms run as separate processes. Either way the workspace a run leaves is the chats' records, what the agents made anywhere in it, and the run records `report <dir>` rescores from, well under a megabyte. Each run starts by sweeping both temp folders: fixtures go after a day, the runtime of a `--fresh-runtime` run that never removed its own after a day, and workspaces and homes after 30 days, or sooner if the OS reaps the folder; the run prints its workspace's path either way. Rescoring with `report <dir>` lasts that long, or until the storage format moves past it. What lasts is `eval-results.local`. Before each case starts, the run waits while the disk holding the temp folder has under 20 GB free, rechecking every 30 seconds, and fails after 30 minutes. Each run records its case, model, trial, session and home in that workspace when it starts (`evals/lib/run-record.ts`), and `report <dir>` reads them back, so it scores a past run against the same session and the same home the run had, whatever the app has titled the chat since.

## Chat evals

`kind: "chat"` (or `--chat` with `--prompt`) runs a case through the agent the user talks to, which does quick work itself and hands the rest to tasks with `instrument task new`, each a child session in the chat's records. Write assertions that pass either way: score what landed and what the user was told, reading the chat's own session beside its tasks'. These things differ from an ordinary case:

- The run is not over when the conversation's turn ends. If it started tasks, they are still running and the wake that carries their results back is 1.5s behind them. The harness waits for the whole tree to go quiet, so `usage` is the conversation alone and `treeUsage` is what the run actually cost.
- The harness makes the `~/Documents/Instrument` output folder the way `window.ensure` does in the app, and the chat reaches it and the home folder without being sent either. Without them it cannot read back what its own tasks wrote: measured, that is ten tool calls and 240K tokens hunting a file, against two and 96K when it can see it.
- Assertions get `childSessions()` alongside `sessions`, because the work being scored may have happened in a task rather than in the conversation.
- `finishesAs` stands in for the tasks when only the conversation's reply to a finish is being scored: each task it starts is stopped once the first turn settles, and the conversation is woken through the real wake path with the receipt and the window tabs the case scripts. It is also the only way a finish note names a window tab, since a run's tasks browse in a Chrome of their own.

`packages/workspace/scripts/chat-handoff-report.ts <workspace-dir>` prints what each task handed back and whether the wake note's ceiling cut it, which is the number to watch: a task's last message travels whole up to that ceiling, and everything past it was composed, paid for, and dropped.

`packages/workspace/evals/handoff-matrix.ts` runs the hand-off suite (`evals/cases/handoff.ts`) as a matrix of case, model, and trial, one process and home per run, and writes `matrix.json` and `report.md` with what each cost the user (pass rate, time to the first line and to done, tokens). Its header lists the models it will spend on and how it guards the OpenRouter key.

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.