Skip to main content
skill CX Codex

browser-preview — Claude Code skill: preview and iframe diagnostics

Walks the agent through a broken Preview tab: service registry, ports, and static asset paths that 404 behind the proxy.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Starchild-ai-agent/official-skills --skill browser-preview -a claude-code
Open on GitHub

What browser-preview does

This skill kicks in when the preview panel breaks: white screen, tab gone, assets returning 404, service not loading. It gives the agent a fixed order of steps. First read the running-service registry at /data/previews.json, then the history at /data/preview_history.json, then check the port with curl server-side. If the process died but the registry entry is still there, the skill says to recreate it with preview_stop and preview_serve.

The rule it drills hardest: users cannot reach localhost or 127.0.0.1. Previews go through a reverse proxy, so the only URL worth handing over is /preview/{id}/. The second common break is absolute paths in static files. Because everything is served under the /preview/{id}/ prefix, the browser asks for /static/app.js from the domain root and gets a 404. The skill tells the agent to check every place a path can hide: src and href attributes, fetch() calls, CSS url(), JS string literals, and bundler config like publicPath and base.

It also forbids poking around workspace folders such as preview/ or output/ with ls and find. Those hold user data, not service state. The registry, the history file, and the preview_serve and preview_stop tools are the only sources of truth. If the RUNNING SERVICES list looks empty while the port still answers, the frontend lost sync — recreating the service forces it to register the tab again.

What it helps with

  • figure out why the Preview tab shows a white screen
  • track down 404s on static assets after starting a preview
  • recreate a service when the process died but the registry entry stayed
  • bring back a closed Preview tab through the RUNNING SERVICES list
  • keep preview state separate from user files in the workspace

Example prompts for the agent

  • the preview won't load, check the registry and tell me what's running
  • the Preview tab disappeared, bring the service back
  • static files are 404ing, check the paths in HTML and JS

How to install browser-preview

1Skills CLI (Vercel)

npx skills add Starchild-ai-agent/official-skills --skill browser-preview -a claude-code

2Manually: put the files in place

~/.claude/skills/browser-preview/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/browser-preview/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about browser-preview

How do I install browser-preview in Claude?

Run npx skills add Starchild-ai-agent/official-skills --skill browser-preview -a claude-code. The skill lands in ~/.claude/skills/browser-preview/SKILL.md.

What does browser-preview do?

It helps the agent debug a broken preview panel: reading the service registry and history, checking ports, hunting absolute paths in static files, and recreating a service when needed.

Why can't I open localhost in the preview?

localhost and 127.0.0.1 point at the server container, not your machine. Previews run through a reverse proxy, so open the /preview/{id}/ URL instead.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set18

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor