Lathe Verify
Testing & Qualitylathe-verifyLathe Verify is an Agent Skill for testing & quality published in the devenjarvis/lathe repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Verify that a stored Lathe tutorial actually works by following it end to end in a fresh scratch dir, in session. Use when the user invokes /lathe-verify with a slug like "/lathe-verify digital-synth-zig" (the "Verify this tutorial" button in `lathe serve` hands you that command).
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/devenjarvis/lathe/blob/HEAD/.claude/skills/lathe-verify/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/lathe-verify, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Lathe — Verify a Tutorial
Follow a stored tutorial exactly as a reader would, in a throwaway directory, and record whether it actually works. Triggered by /lathe-verify <slug>. Isolation is by instruction — a fresh mktemp -d, under the user's normal interactive permissions. No sandbox-exec, no Docker.
This skill is read-only with respect to the tutorial: never edit the parts or the metadata. The only writes are status updates through lathe verify-result.
Protocol
-
Mark it in-flight first:
lathe verify-result <slug> --status verifyingThis sets the spinner badge in the web UI. If it errors with "cannot verify while it is extending", stop — a part is mid-flight; don't verify on top of it.
-
Make a fresh scratch dir and work there:
cd "$(mktemp -d)"Everything the tutorial tells the reader to create happens here, not in the user's project. (Status is set by this skill, never by the web/CLI button — so an unclicked button can never strand a tutorial at
verifying.) -
Follow each part in order. Read
~/.lathe/tutorials/<slug>/part-NN.mdfrompart-01up. Install the prerequisites, create the files and paste the code blocks exactly as written, in order, then run the## Checkpointcommand and compare against the stated expected output.- Skip the pedagogical and provenance callouts —
> [!PREDICT],> [!RECALL], and> [!UNVERIFIED]are not verifiable steps. They prompt the reader or flag uncertainty; there's nothing to execute. - Treat the Checkpoint commands and code blocks as the executable surface.
- Skip the pedagogical and provenance callouts —
-
Record the terminal result with the matching command:
- Everything works →
lathe verify-result <slug> --status verified - A required tool isn't installed →
lathe verify-result <slug> --status skippedThis is not a failure — it's the ⚠️ Skipped badge, meaning "couldn't run it here," not "the tutorial is wrong." Use it whenever the toolchain the tutorial needs (compiler, runtime, SDK) is missing locally. - Something genuinely breaks (wrong output, code doesn't compile, a step contradicts itself) →
lathe verify-result <slug> --status failed \ --part <part-NN.md> \ --failed-step <1-indexed step number within that part> \ --error "<the error message or mismatched output>"
- Everything works →
-
Report to the user what happened — verified clean, skipped (and which tool was missing), or where exactly it failed.
Boundaries
- Read-only on the tutorial. Never edit a
part-NN.md,metadata.json, orverify-result.jsondirectly — the only state writes are vialathe verify-result. - No OS sandboxing. Isolation is the
mktemp -dscratch dir plus instruction, under the user's normal permission model. Don't reach for sandbox-exec or Docker. - Skipped ≠ failed. A missing toolchain is
skipped. Reservefailedfor the tutorial being genuinely broken. - Status is always set by this skill, never by the handoff button.