Discover, restart, and validate local dev servers. Auto-detects Docker vs native, checks health, catches crash loops.
/restart [service] [--preflight]
Both arguments are optional — with none, it restarts all discovered services.
--preflight)/restart
What you’ll see: the services discovered from CLAUDE.md (or auto-discovered from your repo), a pre-flight validation pass, restarts in dependency order, then a final status table where every service reads STABLE after an 8-second crash-loop check.
/restart # discover → validate → restart all services
/restart backend # restart only the backend (plus any down dependencies)
/restart --preflight # validate only — Docker, deps, env files, ports; restart nothing
/restart backend --preflight # validate only the backend (and its dependencies) without restarting anything
| Flag | Values | Default | What it does |
|---|---|---|---|
[service] |
a service name | all services | Restarts only the named service (and its dependencies if they’re down) |
--preflight |
— | off | Discovery and validation only — doesn’t stop or start anything |
Local Dev Services table in CLAUDE.md; if missing, scans the repo (docker-compose, package.json, Makefile, pyproject.toml, .env, monorepo configs) to find each service’s type (Docker vs native), port, start command, health check, and dependencies. When discovery is ambiguous, it presents what it found and asks for confirmation — a user-confirmation checkpoint. Confirmed discoveries are written back to CLAUDE.md so future runs skip this step.node_modules / venv).env files existIf a port is held by an unexpected process, it warns you before killing it. With --preflight, it stops here and reports.
STABLE / CRASHED / SKIPPEDRESTART-RESULT: service=<name> status=<STABLE|CRASHED|SKIPPED> port=<port> — so downstream skills like /incident can parse the outcomeLocal Dev Services table in CLAUDE.md after a confirmed auto-discovery| Problem | Fix |
|---|---|
Docker: NOT RUNNING |
Start Docker Desktop and re-run — /restart won’t proceed without the daemon |
node_modules: MISSING / venv: MISSING |
Run npm install (or set up the venv) in the service directory, then retry |
A service shows CRASHED after restart |
Read the error in the report — it’s pulled from the service’s logs (e.g. a missing module means installing deps); fix and re-run |
WARNING: port <port> still occupied |
Another process is holding the port — the report identifies it; stop it or confirm the kill |
A service shows SKIPPED |
One of its dependencies failed — fix the dependency first; dependents are never started on a broken base. Example: if postgres crashes and backend depends on it, backend shows SKIPPED — fix and re-run postgres first, then /restart backend |