/shipwright-preview:shipwright-previewfrom shipwright-preview
Starts the local dev server and displays the browser preview URL. Activates when the user wants to preview the app, check the UI, or open the browser.
Ships in shipwright-preview. 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.
None: SKILL.md is the whole skill.
Start the development server and show the preview URL so the user can open the app in their browser.
╔══════════════════════════════════════════════╗
║ SHIPWRIGHT-PREVIEW ║
║ ║
║ Usage: ║
║ /shipwright-preview ║
║ "show me the app" ║
║ "preview" ║
╚══════════════════════════════════════════════╝
Execute these checks in order. Stop at the first failure and help the user fix it.
Check if shipwright_build_config.json exists in the project root and has at least one section with "status": "complete".
If no build config or no complete sections: Tell the user:
"Preview is not available yet. Complete at least one build split first (
/shipwright-build)."
Stop here.
Run the shared environment validator:
uv run "${SHIPWRIGHT_PLUGIN_ROOT}/../../shared/scripts/validate_env.py" \
--project-root ${SHIPWRIGHT_PROJECT_ROOT} \
--phase build
error / kind / exit 2-3 is a profile problem: stop and show the message, do not ask for env vars or edit .env.local): Do NOT just tell the user to "check logs". Instead, actively help them create or fix .env.local. Read the error output, identify which variables are missing, and guide them through setting the values.Check if the dev server is already running:
uv run "${SHIPWRIGHT_PLUGIN_ROOT}/../../shared/scripts/dev_server.py" \
status --cwd ${SHIPWRIGHT_PROJECT_ROOT}
Parse the JSON output. If "running": true, skip to Step 5.
Start the dev server using the project's own stack profile. Read profile from
${SHIPWRIGHT_PROJECT_ROOT}/shipwright_run_config.json (do not assume a stack). The name
must match ^[a-z0-9][a-z0-9-]*$, otherwise stop. Gate on the resolver (exit 0 with empty output = built-in defaults; any other non-zero exit = stop and show the message, do not retry):
uv run --no-project "${SHIPWRIGHT_PLUGIN_ROOT}/../../shared/scripts/tools/resolve_profile.py" \
resolve --project-root "${SHIPWRIGHT_PROJECT_ROOT}" --name "{profile}" --path-only
Then start it:
uv run "${SHIPWRIGHT_PLUGIN_ROOT}/../../shared/scripts/dev_server.py" \
start --profile "{profile}" --cwd ${SHIPWRIGHT_PROJECT_ROOT}
A profile problem (exit 2/3, kind in the output) is not fixable here: stop and show the message; do not retry.
Parse the JSON output:
"no_dev_server": true → the profile declares no web dev server (a library,
CLI or plugin project). Tell the user there is nothing to preview and stop."ready": true → proceed to Step 5"ready": false or error → investigate, unless the error is a profile problem (exit 2/3: stop, show the message, do not retry). Read the server logs, check for port conflicts, missing dependencies, or build errors. Fix the issue and retry. Do not just report the error — help resolve it.Display the preview URL prominently:
┌────────────────────────────────────────────┐
│ Preview running at: │
│ http://localhost:{port} │
│ │
│ Open this URL in your browser. │
│ The server stays running until you stop │
│ it or end the session. │
└────────────────────────────────────────────┘
The port comes from the dev server status output (it is whatever the profile's dev server declares; do not assume 3000).
The user can ask to stop the preview at any time in chat (e.g., "stop preview", "kill the server"). When asked:
uv run "${SHIPWRIGHT_PLUGIN_ROOT}/../../shared/scripts/dev_server.py" \
stop --cwd ${SHIPWRIGHT_PROJECT_ROOT}
The dev server also stops automatically when the Claude Code session ends (state file cleanup).
Preview uses the dev_server configuration from the stack profile JSON (project .shipwright/profiles/, user ~/.shipwright/profiles/, or bundled). When adding a new stack profile (e.g., SQLite + Flask, or Postgres + Django), define the dev_server section:
{
"dev_server": {
"command": "npm run dev",
"port": 3000,
"ready_timeout_seconds": 60,
"ready_path": "/"
}
}
The dev_server.py shared script reads this configuration automatically. No changes to the preview plugin are needed for new stacks — only the profile JSON.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub svenroth-ai/shipwright --plugin shipwright-previewOther plugins' skills for the same job