workshop-local-run
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWorkshop local-run
Workshop本地运行
Open the student's local HTML or Next.js prototype in a browser. The student does not use the terminal.
This skill does not write PRDs, change MVP functions, edit product code, or deploy (no GitHub / Vercel / Supabase).
When a product skill is already running, keep that product skill in charge of stages. This skill only checks and starts the local prototype.
在浏览器中打开学员的本地HTML或Next.js原型。学员无需使用终端。
本skill不负责撰写PRD、修改MVP功能、编辑产品代码或部署(不涉及GitHub / Vercel / Supabase)。
若已有产品skill在运行,仍由该产品skill负责各阶段流程。本skill仅负责检查并启动本地原型。
Required references
必要参考资料
Before running commands, read:
- — OS detect, Node, folder, port, install, open browser
references/checks.md - — error text → one student sentence
references/errors.md
执行命令前,请阅读:
- — 系统检测、Node、文件夹、端口、安装、打开浏览器
references/checks.md - — 错误文本 → 转化为学员易懂的单句表述
references/errors.md
Caller handshake
调用方交互约定
If invoked from or a Group wrapper, use what they passed:
hr-workshop-mvp-flow| Field | Meaning | If missing |
|---|---|---|
| | Detect: student confirmed a plan → |
| | Detect from files (below) |
| Folder that contains the app | Search from |
| Path to open after Next.js starts (e.g. | |
Do not assume Group 6 paths (, ) unless that instructor wrapper is explicitly active.
talent-mapping-next/login若由或Group包装器调用,请使用其传入的参数:
hr-workshop-mvp-flow| 字段 | 含义 | 缺失时处理方式 |
|---|---|---|
| | 检测逻辑:学员确认了计划 → |
| | 根据文件检测(见下文) |
| 包含应用的文件夹 | 从当前目录 |
| Next.js启动后要打开的路径(例如 | 除非运行中应用的路由显示更合适的初始页面,否则默认使用 |
除非明确激活了Group 6的包装器,否则不要默认使用Group 6的路径(、)。
talent-mapping-next/loginTwo entry points, one core
两个入口,一套核心逻辑
Preflight — student confirmed the HTML or Next.js plan. Run the core loop before writing app files or running . If class is , say one sentence that they can start, then return to the product skill.
npmReadyRepair — student says it will not open, nothing happens, terminal error, or blank page. Same core loop; then open the page.
Standalone prompts such as or use Repair.
Node 沒裝npm run dev 不行预检(Preflight) — 学员确认了HTML或Next.js的运行计划。在编写应用文件或执行命令前先运行核心循环。若判定为状态,告知学员可以开始,然后返回产品skill。
npmReady修复(Repair) — 学员反馈无法打开页面、无响应、终端报错或页面空白。执行相同的核心循环,然后打开页面。
诸如「Node 沒裝」或「npm run dev 不行」的独立求助请求,使用**修复(Repair)**模式。
Core loop
核心循环
- Read-only checks from . Do not change the computer yet.
references/checks.md - Detect OS. Ask which computer only if detection is unreliable.
- Detect (HTML vs Next.js).
kind - Classify the machine (below).
- Explain in plain language. Ask permission before any install, long download, admin prompt, or .
npm install - Agent runs the command. Never ask the student to type terminal commands.
- Verify by opening the page. Success is the page, not exit code 0.
- 从执行只读检查。暂不修改电脑设置。
references/checks.md - 检测操作系统。仅当检测结果不可靠时,才询问学员使用的电脑类型。
- 检测类型(HTML还是Next.js)。
kind - 对当前机器进行分类(见下文)。
- 用通俗易懂的语言解释情况。在执行任何安装、长时间下载、权限提示或前,需征得学员许可。
npm install - 由Agent执行命令。绝不要让学员手动输入终端命令。
- 通过打开页面验证是否成功。成功的标志是页面正常加载,而非命令返回退出码0。
Detect kind
类型检测
- with a
package.jsonscript →devnextjs - Workshop single and no Node app to run for this step →
.htmlhtml - Both → one question: which to open now
- Neither → class . Stop. Tell the student to use File → Open Folder on the project folder. Do not invent a project.
Wrong folder
- 带有脚本的
dev→package.jsonnextjs - Workshop对应的单个文件,且此步骤无需运行Node应用 →
.htmlhtml - 两者都存在 → 询问学员:现在要打开哪一个
- 两者都不存在 → 归类为(错误文件夹)。停止操作。告知学员通过「文件→打开文件夹」选择项目文件夹。不要凭空创建项目。
Wrong folder
Classification
机器分类
Label exactly one:
| Class | When |
|---|---|
| Ready | HTML file exists, or Next.js has Node 20+, correct folder, |
| Missing Node | |
| Wrong folder | |
| No admin / company-locked | Needed install failed without admin, and user-level install also failed |
| Port in use | A dev server is already listening |
| Network / proxy | |
| Unknown | Anything else. Stop. Send to instructor |
Do not give every student the same script. Branch on the class.
npm install必须且只能选择以下分类之一:
| 分类 | 适用场景 |
|---|---|
| Ready(就绪) | HTML文件存在,或Next.js已安装Node 20+、处于正确文件夹、存在 |
| Missing Node(缺失Node) | |
| Wrong folder(错误文件夹) | 当前目录 |
| No admin / company-locked(无权限/公司设备锁定) | 需要的安装因无管理员权限失败,且用户级安装也失败 |
| Port in use(端口被占用) | 开发服务器已在监听该端口 |
| Network / proxy(网络/代理问题) | |
| Unknown(未知问题) | 其他所有情况。停止操作。转交 instructor 处理 |
不要给所有学员使用相同的脚本。需根据分类分支处理。
npm installHTML success
HTML运行成功标准
Agent finds the correct and opens it (). Not blank, not file-not-found. Do not ask the student to hunt in Finder. Node is not required.
.htmlchecks.mdAgent找到正确的文件并打开(参考)。页面非空白、无文件未找到提示。不要让学员在Finder中手动查找文件。无需Node环境。
.htmlchecks.mdNext.js success
Next.js运行成功标准
All of:
- Node 20 or newer
- Working directory is the folder that contains (not the course parent)
package.json - present, or Agent ran
node_modulesafter permissionnpm install - Dev server running — reuse if already up; never start a second one
- Browser opens using the port printed in the terminal (
http://localhost:<port><successPath>or3000, not hard-coded if the log differs)3001
需满足以下所有条件:
- Node版本为20或更高
- 工作目录是包含的文件夹(不是课程父文件夹)
package.json - 存在,或Agent已征得许可后执行了
node_modulesnpm install - 开发服务器正在运行 — 若已启动则复用;绝不要启动第二个服务器
- 浏览器打开,其中端口使用终端中打印的端口(
http://localhost:<port><successPath>或3000,若日志显示不同则不要硬编码)3001
Missing Node
缺失Node的处理流程
Explain: "Node is the tool that lets this web app run on your computer." Ask permission.
- Admin available → official installer in
checks.md - No admin → user-level install in
checks.md - After install → new shell, re-check
node -v - Still failing → class . Stop. Name that class. Ask them to get the instructor. Do not pretend
No admin / company-lockedworked.npm run dev
解释:"Node是让这个Web应用在你的电脑上运行的工具。"然后征得学员许可。
- 有管理员权限 → 使用中的官方安装程序
checks.md - 无管理员权限 → 使用中的用户级安装方式
checks.md - 安装完成后 → 打开新终端,重新检查
node -v - 仍失败 → 归类为(无权限/公司设备锁定)。停止操作。明确告知分类结果,让学员联系instructor。不要谎称
No admin / company-locked已成功。npm run dev
Interaction
交互规范
- One question at a time. Prefer choices. Do not ask what you can detect.
- Exception to "Agent runs commands": a system permission window. Explain what they will see and which button to press. Wait until they say they clicked it. Never collect the computer password in chat. Never ask for API keys.
- Pause before Node install, multi-minute download, admin prompt, long .
npm install - Summarize command output. Do not ask them to paste the terminal.
- Translate errors with .
references/errors.md - Define Node, npm, folder, port, dependency in one sentence when first used.
- On success, only the next student action: open this URL, or "The HTML file is open in your browser."
- Mirror the student's language.
- Repair failed → name the class, send to instructor, stop. Do not edit MVP code.
- 一次只提一个问题。优先提供选项。不要询问可自动检测的信息。
- 「Agent执行命令」规则的例外:系统权限弹窗。需向学员解释他们会看到什么提示,以及要点击哪个按钮。等待学员确认已点击后再继续。绝不要在聊天中收集电脑密码。绝不要索要API密钥。
- 在执行Node安装、长时间下载、权限提示、耗时较长的前,需暂停并告知学员。
npm install - 总结命令输出。不要让学员粘贴终端内容。
- 使用翻译错误信息。
references/errors.md - 首次使用Node、npm、文件夹、端口、依赖等术语时,用一句话定义。
- 成功后,仅告知学员下一步操作:打开该URL,或「HTML文件已在你的浏览器中打开」。
- 匹配学员的语言风格。
- 修复失败 → 明确分类结果,转交instructor处理,停止操作。不要修改MVP代码。
Do not
禁止操作
- Do not write or revise a PRD
- Change the 5 MVP functions
- Change product code to make the environment work
- Deploy, push to GitHub, or configure Vercel/Supabase
- Install Docker, Homebrew as a bundle, or tools this prototype does not need
- Start a second
npm run dev
- 不要撰写或修订PRD
- 不要修改5项MVP功能
- 不要修改产品代码以适配运行环境
- 不要部署、推送到GitHub或配置Vercel/Supabase
- 不要安装Docker、Homebrew等捆绑工具,或本原型不需要的其他工具
- 不要启动第二个进程
npm run dev