
Preview Dev
Ship browser-visible web and fullstack apps with live preview, health-checked serves, and optional public community publish on Starchild.
Overview
Preview Dev is an agent skill most often used in Build (also Validate, Ship) that writes web and fullstack code, starts health-checked live previews in Starchild’s Browser panel, and can publish a public preview when you
Install
npx skills add https://github.com/starchild-ai-agent/official-skills --skill preview-devWhat is this skill?
- Mandatory post-serve checklist: read `health_check.ok` and fix `directory_listing`, `script_escape_error`, `blank_page`,
- Covers React, Vue, Vite, static HTML, Express, FastAPI, and any framework that yields a browser-viewable result
- Live preview in the Starchild Browser panel—working code only, no templates or placeholders
- Community publish flow for deploying or sharing a preview on the public internet
- Responds in the user’s language while acting as a web development engineer
- Mandatory checklist runs after every `preview_serve` using the `health_check` field
- Documented health issues include directory_listing, script_escape_error, blank_page, and connection_failed
Adoption & trust: 4k installs on skills.sh; 13 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want a web or fullstack feature your agent wrote to actually load in a browser, but preview servers often fail silently with directory listings, blank pages, or bad ports until you manually debug.
Who is it for?
Solo builders using Starchild who ship browser-based UIs or small fullstack apps and need enforced preview health checks before sharing.
Skip if: Native mobile-only apps, pure CLI tools with no browser surface, or teams not using Starchild’s preview_serve and Browser panel workflow.
When should I use this skill?
User wants to build a web page, frontend app, fullstack project, web UI (React, Vue, Vite, static HTML, Express, FastAPI), or deploy/publish/share a public preview.
What do I get? / Deliverables
You get working, health-verified preview URLs (and optional community publish) only after the agent fixes serve issues flagged by `health_check`, so you can iterate on UI with trustworthy live feedback.
- Runnable web or fullstack source with a live preview URL
- Health-checked serve result (`health_check.ok` true before user-facing ready message)
- Optional community-published public preview
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build because the skill’s core job is writing runnable web UI and fullstack code with an immediate browser preview—not one-off research or post-launch analytics. Frontend is the primary output (pages, React/Vue/Vite, static HTML); fullstack backends are in service of something viewable in the Browser panel.
Where it fits
Spin up a landing-page prototype with a verified preview before committing to a full SaaS build.
Implement a React or Vue screen and iterate only after `health_check.ok` confirms the Browser panel loads correctly.
Wire a FastAPI or Express backend to a simple UI and confirm command, port, and index routing pass health checks.
Community-publish a stable preview link once serve issues are fixed and the page is non-blank.
How it compares
Use instead of dropping HTML/React into chat without a gated live-preview and health-check ritual on a dev platform.
Common Questions / FAQ
Who is preview-dev for?
Preview Dev is for solo and indie builders on Starchild who build web frontends or fullstack projects and want live Browser-panel previews plus optional public publish—not for offline-only codebases.
When should I use preview-dev?
Use it in Validate when you need a clickable prototype; in Build when you are implementing React, Vue, Vite, static HTML, Express, or FastAPI UIs; and in Ship when you want to publish or share a community preview after `health_check.ok` is true.
Is preview-dev safe to install?
Treat it like any agent skill that runs dev servers and may publish previews: review the Security Audits panel on this Prism page and limit secrets in preview environments before community publish.
SKILL.md
READMESKILL.md - Preview Dev
# Preview Dev — Frontend & Fullstack Development with Live Preview You are a Web development engineer. You write code, start previews, and let users see results in the Browser panel. No templates, no placeholders — working code only. **Always respond in the user's language.** ## ⛔ MANDATORY CHECKLIST — Execute These Steps Every Time ### After preview_serve returns: 1. **Check `health_check` field** in the response - If `health_check.ok` is false → **fix the issue BEFORE telling the user** - If `health_check.issue` is `"directory_listing"` → you forgot command+port, or dir has no index.html - If `health_check.issue` is `"script_escape_error"` → fix the HTML escaping - If `health_check.issue` is `"blank_page"` → check JS errors, missing CDN, empty body - If `health_check.issue` is `"connection_failed"` → service didn't start, check command/port 2. **Only tell the user "preview is ready"** when `health_check.ok` is true ### When user reports a problem: 1. **DIAGNOSE FIRST** — `read_file` the HTML/code, use `preview_check` to get diagnostics 2. **FIX IN PLACE** — `edit_file` the existing file, do NOT create a new file 3. **RESTART SAME PREVIEW** — `preview_stop(old_id)` then `preview_serve` with SAME dir/port 4. **VERIFY** — check `health_check` in the response ### How to find preview IDs: - **Read the registry**: `bash("cat /data/previews.json")` — lists all running previews with IDs, titles, dirs, ports - **From previous tool output**: `preview_serve` returns `preview_id` in its response — remember it - **NEVER guess IDs** — preview IDs are short hex strings (e.g. `84b0ace8`), not human-readable names ### NEVER DO: - ❌ Create a new script file when the old one has a bug (fix the old one) - ❌ Create a new preview without stopping the old one first (auto-cleanup handles same-dir, but be explicit) - ❌ Guess preview IDs — always read `/data/previews.json` or use the ID from `preview_serve` output - ❌ Try the same failed approach more than once - ❌ Call an API directly via bash if a tool already provides it - ❌ Tell the user "preview is ready" when health_check.ok is false ## Error Recovery SOP When something goes wrong, follow this exact sequence: ### Step 1: Diagnose (DO NOT SKIP) ``` # Check preview health preview_check(preview_id="xxx") # Read the actual file to find the bug read_file(path="project/index.html") # If needed, check server-side response bash("curl -s http://localhost:{port}/ | head -20") ``` ### Step 2: Identify Root Cause | Symptom | Likely Cause | Fix | |---------|-------------|-----| | White/blank page | JS error, CDN blocked, script escape | Read HTML, fix the script tag | | Directory listing | Missing command+port, wrong dir | Add command+port or fix dir path | | 404 on resources | Absolute paths | Change `/path` to `./path` | | CORS error | Direct external API call | Add backend proxy endpoint | | Connection failed | Service didn't start | Check command, port, dependencies | ### Step 3: Fix In Place - Use `edit_file` to fix the specific bug - Do NOT create new files or directories - Do NOT rewrite the entire project ### Step 4: Restart and Verify ``` preview_stop(preview_id="old_id") preview_serve(title="Same Title", dir="same-dir", command="same-cmd", port=same_port) # Check health_check in response — must be ok: true ``` ## Core Workflow ``` 1. Analyze requirements → determine project type 2. Write code → create a complete, runnable p