/run-verify:run-skill-generatorfrom run-verify
Author or improve the run-<unit> skill — a per-project skill that tells agents how to build, launch, and drive this project's app. Use when the user asks to set up the project, get it running, write run instructions, or verify build/run steps work from a clean environment.
Ships in run-verify. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Your job is to produce a skill at <unit>/<skills-dir>/run-<unit-name>/
that lets a future agent build, launch, and drive this project from
a clean machine.
The skill has two parts that live together:
<unit>/<skills-dir>/run-<unit-name>/
SKILL.md ← agent-facing instructions — SHORT. Points at the driver.
driver.mjs ← (or driver.py, smoke.sh, … — or none: web apps use
an off-the-shelf headless-browser CLI, and the
heredoc in SKILL.md is the script)
That almost always means writing code, not just prose. If the app
has any interactive surface (GUI, TUI, long-running server, REPL), the
future agent needs a programmatic way to poke it. A markdown file by
itself cannot click a button — but sometimes the button-clicker
already exists: for web apps it's a headless-browser CLI, for servers
it's curl. You build (or script) that harness now, commit it
alongside the skill, and the SKILL.md documents how to use it.
You are done when all of these are true:
SKILL.md — whatever you used to drive the app in step 1.
(Graduated into scripts//e2e/? — fine, point at it. Web app with
an off-the-shelf browser CLI? — the inline script is the harness; no
separate file.)SKILL.md documents the harness as the primary agent path —
the section a future agent reads first is "run this driver / pipe
these commands to the browser CLI," not "run npm start and a window
opens."SKILL.md is a command you ran that worked.
This session. This environment. Not from the README, not inferred.If you're about to write the skill and you don't have (1), stop. You are about to paraphrase existing docs. That document already exists — it's called the README, and the whole reason you're here is that it wasn't enough.
Typical output is a skill directory containing both:
<unit>/<skills-dir>/run-<unit>/
SKILL.md ← SHORT. Points at the driver. Has the frontmatter
that lets the agent auto-load it when someone asks
to "run <unit>" or "screenshot <unit>".
driver.mjs ← (or driver.py, smoke.sh, … — or none: web apps
use a headless-browser CLI off-the-shelf, and the
heredoc in SKILL.md is the script)
The driver lives inside the skill directory by default. They are a pair — the skill's instructions and the code that implements them. A driver that lives here is allowed to be a bit messier than production code; it's agent tooling, not product surface.
Graduation: if the driver grows into something the project's own
test suite wants to reuse — shared launch helpers, a real e2e harness —
move it to scripts/ or e2e/ and update SKILL.md to reference the
new path. The skill stays; the driver finds a better home.
The exact shape depends on the project, but the principle is constant:
the driver is the deliverable. The SKILL.md is its man page. For
a web app, the driver already exists — a headless-browser CLI
(example) — and the skill is
the script that runs it. For a desktop app
(example), the driver is a custom
REPL under tmux that exposes launch/ss/click/eval. For a server,
the driver is curl. Whatever shape it takes, without something that
reaches into the running app, the skill is a description of a window
nobody can touch.
The skill lives at <unit>/<skills-dir>/run-<unit-name>/, where
<unit> is the directory for one deployable thing — an app, a
service, a library — and <skills-dir> is the skill convention the
repo uses:
.claude/skills/ — Claude Code's native project-skill location..agents/skills/ — the cross-agent convention read by Codex and
other agents following the Agent Skills standard.Match what the repo already uses. If it has neither and the team
works across multiple agents, prefer .agents/skills/; if it's a
Claude Code shop, .claude/skills/. Don't maintain two copies — pick
one home (a symlink from the other convention is fine if both agents
are in play).
Agents discover skills from nested skill directories: an agent working
anywhere inside <unit> will see run-<unit-name> as an available
skill, and it auto-loads when the request matches its description
(e.g. "run the desktop app," "take a screenshot of billing").
<skills-dir>/run-<repo-name>/ at repo root.apps/billing/<skills-dir>/run-billing/,
apps/desktop/<skills-dir>/run-desktop/.## Run: <name> section
per binary.If you're not sure where the unit boundary is, ask the user.
Slugify the directory name: lowercase, dashes for spaces, no slashes
(run-billing-api, not run-billing/api). The directory name and
the frontmatter name: should match — that's the skill's invocation
name.
List the project's skills with their descriptions (same probe the
run skill uses — users name these variously, so match on
description, not name):
d=$PWD; while :; do
grep -Hm1 '^description:' "$d"/.claude/skills/*/SKILL.md "$d"/.agents/skills/*/SKILL.md 2>/dev/null
[ -e "$d/.git" ] || [ "$d" = / ] && break
d=$(dirname "$d")
done
If one is about launching/driving this app — whatever it's named — refine, don't rewrite: verify its claims, fix what's wrong, add what's missing, preserve what works. Re-run the driver if there is one. Keep its existing name.
(Also check for a legacy .claude/run.md — earlier tooling produced
those. If you find one, migrate it: the body becomes the skill's
SKILL.md content, any referenced scripts move into the skill dir,
and delete the old file.)
If none exists, decide where to create it (see above) and continue.
Figure out what you're authoring for:
package.json, go.mod, pyproject.toml…) and
it's one self-contained thing → this is the unit.apps/, packages/, services/) →
ask which one. List candidates, let them pick, cd there.Survey the usual places: README.md, package.json scripts,
Dockerfile, Makefile, .github/workflows/, CONTRIBUTING.md. CI
configs are often more accurate than READMEs.
Every claim in existing docs is a hypothesis. Especially the negative ones:
| When docs say… | What you do |
|---|---|
| "Requires macOS/Windows" | Launch it on Linux anyway. Apps rarely refuse to start — they crash on a missing .so, which apt-get fixes. Native modules for your host's keychain/notifications may no-op; the core usually runs. |
| "Requires a GPU" | Try software rendering. Electron/Chrome fall back with --disable-gpu. |
| "Requires a paid account / feature flag" | The gate is code you can read. Find it (env var? build define? SSR-embedded JSON?) and patch it for your local run. Document the patch. |
"Run npm start" | That's the human path (spawns a window, waits forever). Find or build the programmatic path — electron-forge start to build then launch via Playwright, or equivalent. |
"Not supported on Linux" in a README written by a macOS developer means "I never tried." You're about to try. If you give up here, the skill you write is the README with extra steps.
You're likely in a headless environment. The app is going to fight you. That fight is the content of the skill.
Keep a running NOTES.md as you go. Every error → every fix → every
command that finally worked. This scratchpad becomes the
Troubleshooting section.
Work up to a real interaction:
Install + build. When something's missing, note the exact
apt-get / npm install that fixed it.
Launch the app. Not the test suite — the app. A desktop GUI
(Electron, native) needs xvfb-run and a handful of lib*
packages; a web app driven by a headless-browser CLI runs headless
and needs neither. Launch timeouts and cryptic crashes are normal at
this stage. Read the stack trace, install the missing thing, try
again.
Build a harness to drive it. You need a handle on the running app that lets you send input and observe output programmatically. The shape depends on the project (see table below).
Cover the layer(s) PRs actually touch. A tmux driver that pokes
the CLI's user surface is the right handle for UI changes — and the
wrong one for a PR that touches one internal function. For the
latter an agent wants NODE_ENV=test bun run script.ts (or
equivalent): import the function, call it, observe. If most PRs
here touch internals, that direct-invocation path is the driver's
main entry point, and the tmux launch is secondary. Look at recent
merged PRs: what layer do they touch? Cover that.
For a web app, a headless-browser CLI is the driver — you script
it, you don't write it (see example).
For a desktop GUI (Electron), write a REPL driver (stdin
commands → click/type/screenshot), run it inside tmux, and use
send-keys / capture-pane. You will iterate on that driver — it
starts minimal (launch, ss, quit) and grows whatever commands
you need to reach the interesting part of the app.
Do one real user flow end-to-end. Click the button. Fill the form. See the result in the DOM. Take a screenshot. Actually look at the screenshot. If it's blank or showing an error page, you're not done.
Then run the tests. Unit tests are a sanity check, not the main event.
Stop cleanly.
Obstacles are content. You will hit weird ones — coordinate systems that don't line up, APIs that return empty on this Electron version, feature gates that hide the thing you need to test. Each of these gets a bullet in Gotchas and (often) a helper in your driver. The gold standard is a Gotchas section full of things nobody could have guessed.
The driver script gets committed alongside the skill. It is not
scaffolding. It is the way future agents (and humans) will drive this
app. It defaults to living inside the skill directory (for a web app
using a browser CLI, that means inline in SKILL.md — the heredoc
is the script). If it outgrows that — if the project's real test
suite wants to import from it — move it to scripts/ or e2e/ and
update SKILL.md to point there.
Short. Point at the driver. Use template.md as the starting structure — it has the frontmatter shape.
The frontmatter matters. The name: becomes the skill's
invocation name (e.g. /run-billing in Claude Code). The
description: is what the agent scans to decide whether to auto-load
this skill — put the verbs an agent would actually type in it:
"run," "start," "build," "test," "screenshot." Generic descriptions
("helpful utilities for billing") won't match.
Body structure:
<driver-path> under xvfb/tmux for desktop, a headless-browser CLI
for web, curl for a server.apt-get install line you ran.sed
or edit.npm start → window
opens → Ctrl-C. Brief. Note that it's useless headless.Keep it verified (you ran it), prescriptive (one path, not options), honest (flaky? slow? say so).
Paths in SKILL.md are relative to <unit>/, not to the skill
directory. State this at the top if there's any ambiguity. When the
driver lives inside the skill, its path from <unit> is
<skills-dir>/run-<unit-name>/driver.mjs — it's long, but explicit.
Fresh shell, cd into the unit, follow the skill's SKILL.md
line-by-line without deviating. Any improvisation = a gap. Fix it.
Pick a starting shape for your driver. These examples are shared with
the run skill (same per-project-type patterns are used as the
fallback when no project-specific run skill exists) — if you're
authoring a new one, the example is your starting template.
| Project type | Driver shape | Example |
|---|---|---|
| Web server / API | Background-launch + curl-based smoke script | example |
| CLI tool | Representative-args smoke script, check exit codes + output | example |
| TUI / interactive terminal | tmux wrapper: send-keys / capture-pane | example |
| Electron / desktop GUI | Playwright _electron REPL driver under xvfb, screenshots, tmux-wrapped | example |
| Browser-driven | dev server + headless-browser CLI script | example |
| Library / SDK | Import-and-call smoke script | example |
For a web app, start from the browser example
— drive it with a headless-browser CLI, no custom driver needed. For a
desktop app, start from the Electron example
— it has the full _electron REPL driver skeleton, the tmux wrapping,
and the catalog of obstacles you'll hit.
apt-get
lines. The exact ones.scripts//e2e/), or inline in SKILL.md for browser-CLI
web apps; referenced from SKILL.md either way.yarn start:prod and
you never ran it, it's not in the skill. Full stop.Stop and reconsider if:
SKILL.md is the driver;
no separate file needed.)What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/runLaunch and drive this project's app to see a change working. Use when asked to run, start, or screenshot the app, or to confirm a change works in the real app (not just tests). First looks for a project skill that already covers launching the app; otherwise falls back to built-in patterns per project type (CLI, server, TUI, Electron, browser-driven, library)./verifyVerify that a code change actually does what it's supposed to by exercising it end-to-end and observing behavior — drive the affected flow, not just tests or typecheck. Run before committing nontrivial changes; bootstraps this repo's project verify skill if none exists yet. Don't invoke it on a diff that only touches tests, docs, or other code with no runtime surface to drive (a change to product source always has one) — there's nothing to observe.Other plugins' skills for the same job
run-verify@pleaseai is listed by pleaseai/claude-code-plugins — review the source before installing
npx claudepluginhub pleaseai/claude-code-plugins --plugin run-verify