跳到主要内容
知仓学习社ZHICANG

preview

Stand up the project's live app and hand it to the user to try a change firsthand, then gate on their verdict before continuing. Use when the user a…

不碰外部(只输出文字)无严重或高危命中tobihagemann/turbo

它会碰到什么

扫了多少1 个文本文件,5 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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:

  • Web app → start the dev server; the access point is the local URL and port
  • Desktop/native app → build and launch the app so its window is open

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) and wait until each reports ready. Pass run_in_background alone, never with a trailing &: 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:

  • The access point — the local URL and port for a web app, or confirmation that the window is open for a native app
  • When the surface sits behind a sign-in, each account to use with its password and the role that account holds
  • What changed
  • Each scenario worth trying, as many as the change needs: numbered steps naming the exact controls and inputs, the result the scenario should produce, and the judgment the user is being asked to make
  • When a verification pass preceded this hand-over, what it could not cover: paths needing real credentials, external services, or state unavailable in this session

Step 5: Verdict Gate

Use AskUserQuestion to ask the user for their verdict after they have tried the app. Three options, with keeping the app running as the default:

  • Looks good, keep it running — leave every process this skill started running so the user can keep using the app.
  • Looks good, shut it down — stop every process this skill started, and revert every override this skill made in a service that keeps running.
  • Needs changes — note what the user wants different, make the change, rebuild or refresh the running app so it is live, then repeat this step's gate. When the user's response or session context surfaces further open issues, resolve every known issue — fixing and re-verifying each — before re-asking the verdict; the gate re-fires only once no known issue remains.

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

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 403
本站分层T2
该仓技能数153
原文件路径claude/skills/preview/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 153 个技能

同名技能的其他版本

有 2 个不同仓库或目录里都有叫 preview 的技能。它们内容并不相同,别混用:

  • tobihagemann/turbo — Stand up the project's live app and hand it to the user to try a change firsthand, then ga