Drive the real Kasetto CLI (`kst` / `kasetto`) end to end in an isolated sandbox and capture proof - sync, add/remove, lock, list/doctor, clean, plugins - against a local fixture pack with no network and no writes to the real home or this repository. Use when a change to the Rust crate needs to be shown working in the built binary, not only in `cargo test`, or when asked to verify, reproduce, or demo a `kst` behavior.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Verify Kasetto?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/pivoshenko-verify-kasetto)
---
name: verify-kasetto
description: Drive the real Kasetto CLI (`kst` / `kasetto`) end to end in an isolated sandbox and capture proof - sync, add/remove, lock, list/doctor, clean, plugins - against a local fixture pack with no network and no writes to the real home or this repository. Use when a change to the Rust crate needs to be shown working in the built binary, not only in `cargo test`, or when asked to verify, reproduce, or demo a `kst` behavior.
---
# Verify Kasetto
Kasetto's user surface is the `kst` CLI (the `kasetto` binary is the same program). It is short-lived: there is no server to keep alive. "Launch" means build the release binary once and create a disposable sandbox. Every drive is one `kst` invocation with `HOME` and all `XDG_*` dirs pointed into that sandbox, against a fixture pack on local disk, so nothing reaches the network or the real machine.
The documentation site under `site/` is a secondary surface (Next.js, `just run-dev-server`). This skill does not cover it.
The feature map in `features/README.md` is the maintained list of what to prove and how. Read it before driving anything.
## The Helper
Everything goes through one script, run from the repository root:
```bash
H=.claude/skills/verify-kasetto/scripts/kst-verify
$H launch <run> # build if stale, sandbox + fixtures + baseline config
$H doctor <run> # read-only health check, run first when anything looks off
$H run <run> <label> [--cwd project|home|/abs] -- <kst args...>
$H snapshot <run> <label> # every file under home/ and project/ with its sha256
$H diff <run> <label-a> <label-b> # exit 1 when the two snapshots differ
$H cleanup <run> # delete the sandbox, keep the evidence
```
`<run>` is any `[A-Za-z0-9._-]+` id. Use a fresh one per verification, e.g. `sync-$(date +%s)`. In `run` arguments, the literal `@sandbox` expands to the sandbox path, so `add @sandbox/extra` names the second fixture pack.
What `run` enforces, and why:
- `env -i` with only `PATH=<sandbox>/bin:/usr/bin:/bin`, `HOME`, `XDG_CONFIG_HOME`, `XDG_DATA_HOME`, `XDG_CACHE_HOME`, `TMPDIR`, `KASETTO_NO_UPDATE_CHECK=1` and `NO_COLOR=1`. This scrubs `KASETTO_CONFIG`, `CODEX_HOME`, forge tokens and any `codex` on the real `PATH`
- `KASETTO_NO_UPDATE_CHECK=1` because the update check pings `kasetto.dev/latest`, which is the project's only active-install metric. A verification run must never inflate it
- The cwd is always inside the sandbox (default `project/`). Project scope roots at the config file's directory, and config discovery tries `./kasetto.yaml` first, so a `kst sync` from the repository root would write the repository's own `.claude/`, `CLAUDE.md` and `.mcp.json`
- The binary is a copy in `<sandbox>/bin/kst`, and `kst self ...`, `kst update`, `kst uninstall` are refused: they reach GitHub, replace the binary, or delete it
## Launch
```bash
H=.claude/skills/verify-kasetto/scripts/kst-verify
$H launch r1
```
`launch` runs `cargo build --release --bins` when `target/release/kst` is older than anything in `src/`, `Cargo.toml` or `Cargo.lock` (a cold release build takes about 3 minutes), then creates the sandbox at `${KST_VERIFY_ROOT:-$TMPDIR/kst-verify}/<run>` with:
- `home/` - the redirected `HOME` and XDG root. Global-scope installs land here (`home/.claude/skills`, `home/.local/share/kasetto/kasetto.lock`, ...)
- `project/` - the project root, holding the baseline `kasetto.yaml` (`scope: project`, `agent: [claude-code]`, all five asset kinds from `pack/` with `"*"`)
- `pack/` - fixture source: skill `hello-verify`, command `git:tidy` (`commands/git/tidy.md`), subagent `reviewer`, MCP pack `echo.json` (server `echo`), instruction `house-rules`
- `extra/` - second fixture source with one skill, `extra-verify`, for add/remove journeys
- `market/` - fixture plugin marketplace `verify-market` with one plugin, `greeter`
- `bin/kst` - the binary copy
Ready means the last line printed is `READY run=<run> sandbox=<path> evidence=<path>`. A sandbox that already exists is refused rather than reused: pick a new run id or clean up the old one.
## Doctor
```bash
$H doctor r1
```
Read-only. Prints `ok` / `FAIL` per check and exits non-zero on any failure:
- Sandbox and evidence dirs exist
- `target/release/kst` is newer than `src/`, `Cargo.toml` and `Cargo.lock` (the version string alone does not prove the binary has your change)
- The sandbox copy is byte-identical to `target/release/kst` and its version matches `Cargo.toml`
- The sandbox is outside the repository
- No kasetto-owned path outside the sandbox changed since launch: the repository's `kasetto.yaml`, `kasetto.lock`, `.mcp.json`, `CLAUDE.md`, `.claude/settings.json`, and the real `~/.config/kasetto`, `~/.local/share/kasetto`, `~/.cache/kasetto`
A stale-binary failure after editing `src/` is expected: clean up and launch a new run, which rebuilds.
This is the harness check. `kst doctor` is a feature under test (see `features/inspect.md`), not a substitute.
## Drive
Each `run` is one user command. Labels become evidence file names, so make them describe the step:
```bash
$H run r1 sync -- sync
$H run r1 sync-json -- sync --json
$H run r1 add-extra -- add @sandbox/extra --skill extra-verify
$H run r1 list -- list --type skills
$H run r1 global-sync --cwd home -- sync --global
```
`run` prints the command, stdout, stderr and the exit code, with the sandbox path shown as `<sandbox>`, and returns kst's exit code. Assert on that exit code and on the files the command wrote, never on the human report alone.
To inspect written files, read them directly under the sandbox path printed by `launch` (e.g. `cat <sandbox>/project/.mcp.json`). To change the fixture source between steps (simulating an upstream edit), edit files under `<sandbox>/pack/` with ordinary shell commands. That is the user's source repository, not kasetto state.
Agents other than `claude-code` can be driven by editing `agent:` in `<sandbox>/project/kasetto.yaml`. Their install paths are in `src/model/agent.rs`. The `codex` plugin leg shells out to the `codex` CLI, which is deliberately not on the sandbox `PATH`.
## Evidence
Every step writes to `target/verify-kasetto/evidence/<run>/` (gitignored, outside the sandbox, so cleanup never touches it):
- `00-launch.txt` - commit, version, binary sha256, sandbox path, launch time. `00-baseline-kasetto.yaml` - the starting config
- `NNN-<label>.cmd`, `.out`, `.err`, `.exit` - one set per `run`, numbered in order
- `NNN-<label>.tree` - one per `snapshot`: sha256 and relative path of every file under `home/` and `project/`, plus every directory as `(dir)` and symlink as `(link -> target)`. Runtime state under `home/.cache/` rewrites on every run, so it is listed as `(runtime)` instead of hashed
- `NNN-diff-<a>-<b>.diff` - one per `diff`
Proof standards:
- Drive the user path: real `kst` subcommands against a config file. No internal functions, no hand-written lock files, no test-only hooks
- Capture the action and the resulting state: a `snapshot` before and after any mutating command, plus the `run` that sits between them
- Verify side effects, not the report: the installed files, the `kasetto.lock` entries, the merged `.mcp.json` / `.claude/settings.json` keys, the managed block in `CLAUDE.md`. "+ added" in the report is not proof by itself
- For `--dry-run`, prove it wrote nothing with `snapshot` before and after and a `diff` that reports `identical`. Observe it rather than trusting the flag's name
- Fixtures are local paths, so these runs prove nothing about fetching remote URLs (GitHub/GitLab/Bitbucket tarballs, auth tokens, the source cache). Say so in the report rather than claiming a remote path is verified
- When a journey fails because the fixture lacks a precondition, report the failure and record the reason in that feature's Gotchas. Never weaken the journey to make it pass
## Cleanup
```bash
$H cleanup r1
```
Deletes only `<KST_VERIFY_ROOT>/<run>` (it refuses any path outside that root, and refuses a run with no evidence dir), then prints the evidence path and file count. No processes outlive a `run`, so there is nothing to kill. Run cleanup after every failed attempt too, so stale sandboxes do not pile up in `$TMPDIR`. Evidence under `target/verify-kasetto/evidence/` survives cleanup and `git clean`, but not `cargo clean`. Copy it elsewhere if it must outlive that.
## Isolation
Any number of runs can go side by side: each has its own sandbox, home, lock and evidence dir, and shares only the read-only `target/release/kst`. Do not run `launch` while another run's `launch` is rebuilding, since two `cargo build` calls contend for the same `target/` lock (the second waits, it does not corrupt).