Preview

From tobihagemann/turbo · View interactive version

Preview is an AI agent skill from the GitHub repository tobihagemann/turbo. Stand up the live app for the user to try a change firsthand, then act on their verdict. Use when the user asks to \"preview the change\", \"let me try it\", or \"spin up the app so I can test it\".

How to use this skill

Skill file

Preview

Bring up the running app and let the user drive it themselves to judge the change, then act on their verdict.

Step 1: Determine Scope

Resolve what to preview using the first match:

  1. User-specified — the user says what to look at. Use that.
  2. PR — a PR URL or number is provided. Fetch its details and read the changed code.
  3. Conversation context — prior conversation contains recent work. Extract what changed, where it lives, and the expected behavior.
  4. App-level discovery — fresh context with no prior work. Examine entry points, routes, and the README to identify the app's core user-facing flows.

If the resolved scope has no user-visible surface to try (a CLI-only change, a library with no entry point, backend work with no UI to look at), present this message: "Nothing to preview — <one-line reason>." Then use the TaskList tool and proceed to any remaining task.

Step 2: Determine Launch Approach

Check for a project-specific skill or MCP tool that launches the app, and use it if present. Otherwise use the fallback for the surface type:

Step 3: Bring Up the Stack

Start backend services and frontend together — a frontend-only change still needs the backend running to be exercised. When a service runs at an address other than its default, find the settings elsewhere in the stack that name that default, such as allowed origins and sign-in callback URLs, and bring each in line through runtime overrides, leaving the working tree unchanged: add the new address beside the default in a list, and replace the default only where no process outside this skill reads the setting. Build first if the project requires a build step.

Start long-running processes with the Bash tool (run_in_background: true, timeout: 7200000) and wait until each reports ready. Leave a trailing & off a run_in_background call: backgrounding twice reports success within seconds while the servers are either dead with the wrapper or orphaned still holding the port. Confirm each process bound to its port before sending it traffic, since a readiness probe passes just as well against an orphan from an earlier attempt. Capture each process's PID and stop it by that PID and its process group, rather than by port or command-line pattern, which also match a concurrent agent's server. Tail their logs with the Monitor tool so backend errors and warnings surface while the user is trying the app.

If a required service cannot be stood up in this session (missing auth provider, external dependency, seed data), or a process fails to start or never reports ready, use AskUserQuestion to surface the blocker and let the user choose how to proceed.

Step 4: Point the User at the Running App

Output as text:

When a verification pass that preceded this hand-over captured the change on screen as the app now serves it, send those captures with the SendUserFile tool alongside that text, cropped to the changed area where that helps. Caption a capture of a state the user would not reach in ordinary use with what that state is, in the user's own terms.

Then end the turn, leaving every process this skill started running.

Step 5: Act on the User's Reply

Then use the TaskList tool and proceed to any remaining task.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.