Skill59.6k repo starsupdated yesterday
run-skill-generator
Teach /run and /verify how to build and launch your project by creating a per-project run skill with a driver script.
Install in Claude Code
Copygit clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/run-skill-generator && cp -r /tmp/run-skill-generator/Anthropic/Claude Code/bundled-skills/run-skill-generator ~/.claude/skills/run-skill-generatorThen start a new Claude Code session; the skill loads automatically.
Definition
SKILL.md
Your job is to produce a **skill** at `<unit>/.claude/skills/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>/.claude/skills/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
chromium-cli off-the-shelf, 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 `chromium-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.
## Definition of done
You are done when **all** of these are true:
1. **You launched the app in this container and interacted with it** —
not its test suite, the actual running app. For anything with a GUI,
that means you have a screenshot file on disk that you took.
2. **The interaction harness is committed** next to the skill. A driver
script, a REPL wrapper, a smoke test, or the `chromium-cli` heredoc
inline in `SKILL.md` — whatever you used to drive the app in step 1.
(Graduated into `scripts/`/`e2e/`? — fine, point at it. Web app with
`chromium-cli` off-the-shelf? — the inline script is the harness; no
separate file.)
3. **The `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 `chromium-cli`," not "run `npm start` and a window
opens."
4. **Every code block in `SKILL.md` is a command you ran that worked.**
This session. This container. 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.
## The deliverables are code AND docs
Typical output is a skill directory containing both:
```
<unit>/.claude/skills/run-<unit>/
SKILL.md ← SHORT. Points at the driver. Has the frontmatter
that lets Claude auto-load it when someone asks
to "run <unit>" or "screenshot <unit>".
driver.mjs ← (or driver.py, smoke.sh, … — or none: web apps
use chromium-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 — `chromium-cli`
([examples/playwright.md](examples/playwright.md)) — and the skill is
the script that runs it. For a desktop app
([examples/electron.md](examples/electron.md)), 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.
## Where the skill goes
The skill lives at `<unit>/.claude/skills/run-<unit-name>/`, where
`<unit>` is the directory for **one deployable thing** — an app, a
service, a library.
Claude Code **natively discovers** skills from nested `.claude/skills/`
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").
- **Single-project repo:** `.claude/skills/run-<repo-name>/` at repo root.
- **Large repo with many apps:** one per app, colocated —
`apps/billing/.claude/skills/run-billing/`,
`apps/desktop/.claude/skills/run-desktop/`.
- **App with multiple binaries:** still **one** skill at the app's
root with a section per binary. They share setup. Start from the
closest single-binary example and add a `## 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 slash command.
## Process
### 0. Find any existing skill about running this app
List the project's skills with their descriptions (same probe `/run`
uses — users name these variously, so match on description, not name):
```bash
d=$PWD; while :; do
grep -Hm1 '^description:' "$d"/.claude/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 versions of this
tool 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