跳转到正文
报告库
用途分类 / 其他用途

Prototype Skill 安全审计

作者说它能做什么(原文)

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

第三方安全检查结论

发现安全风险

已检查文件
4
发现的风险
3
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 1 项风险
中风险

完成原型会触发持久的 Git 和议题记录更改

原文依据:3 处
发现了什么

该 Skill 不只生成临时文件,还要求提交一个临时分支,并在实现议题或提交中记录分支指针、结论和所解决的问题。这些是持久的仓库及项目记录变更,不只是本地预览。

为什么需要注意

若用户只授权制作或查看原型,代理仍可能创建提交、改变分支状态或使用用户账户修改共享议题,留下不需要的历史和通知。

该 Skill 明确要求在完成后创建提交到临时分支,并在实现议题或提交中保存分支指针、结论和问题。这些操作会持久修改 Git 历史及可能的项目托管账户记录,超出仅生成本地临时预览的范围。它要求分支位于 main 之外并清理主分支,降低了生产污染风险,但未说明在提交或修改议题前必须取得单独授权。用户可限制 Skill 只生成本地文件,并要求任何提交、建分支或议题更新先确认。

SKILL.md:26来自说明文档打开原文件
5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
查看另外 2 个位置
UI.md:98来自说明文档打开原文件
### 6. Capture the answer and clean upOnce a variant has won, capture the answer (which variant and why), then capture the prototype the way the [SKILL](SKILL.md) describes. Fold the winner into the real code and move the rest onto the throwaway branch, not into main:- **Sub-shape A**: fold the winner into the existing page; drop the losing variants and the switcher from main.- **Sub-shape B**: promote the winning variant to a real route; drop the throwaway route and the switcher from main.The full set of variants is the primary source, so it lands on the throwaway branch, not the bin, since variant components and the switcher left in the main branch rot fast and confuse the next reader.
SKILL.md:21来自说明文档打开原文件
1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious, but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.2. **Trivial to run.** A UI prototype starts from one command in the project's task runner: `pnpm <name>`, `python <path>`, `bun <path>`, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it.3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE, wipe me" name.4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 2 项风险
中风险

只隐藏切换栏,不能保证生产环境无法访问实验变体

原文依据:5 处
发现了什么

变体直接挂载在保留真实数据获取和认证的现有路由上,并由 `?variant=` 决定渲染内容。生产环境检查明确只用于隐藏切换栏,没有要求生产构建拒绝变体参数或排除变体代码。

为什么需要注意

如果原型代码意外进入生产环境,知道或猜到参数的用户仍可能直接打开未经测试、错误处理不完整的实验界面;隐藏切换栏本身不会阻止访问。

该风险有源码依据。在现有页面模式中,变体由 URL 参数选择,并继续使用真实数据获取和认证;生产环境门控明确只针对浮动切换栏。如果原型代码意外进入生产且没有执行后续清理,知道或构造 `?variant=` 的用户仍可能访问实验渲染。现有认证不会被绕过,但未经充分测试的界面可能暴露给已授权用户。用户可要求作者说明生产构建是否会排除全部变体代码或拒绝该参数。

UI.md:18来自说明文档打开原文件
### Sub-shape A: adjustment to an existing page (preferred)The route already exists. Variants are rendered **on the same route**, gated by a `?variant=` URL search param. The existing data fetching, params, and auth all stay. Only the rendering swaps. This is the default; pick it unless there's a specific reason not to.If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow), it's still sub-shape A. Mount the variants inside the host page.
查看另外 4 个位置
UI.md:85来自说明文档打开原文件
Behaviour:- Clicking an arrow updates the URL search param (use the framework's router, e.g. `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable.- Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.- Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.- Hidden in production builds: gate on `process.env.NODE_ENV !== 'production'` or an equivalent check, so a stray prototype merge can't ship the bar to users.
UI.md:107来自说明文档打开原文件
## Anti-patterns- **Variants that differ only in colour or copy.** That's a tweak, not a prototype. Real variants disagree about structure.- **Sharing too much code between variants.** A shared `<Header>` is fine; a shared `<Layout>` defeats the point. Each variant should be free to throw out the layout.- **Wiring variants to real mutations.** Read-only prototypes are fine. If a variant needs to mutate, point it at a stub: the question is "what should this look like", not "does the backend work".- **Promoting the prototype directly to production.** The variant code was written under prototype constraints (no tests, minimal error handling). Rewrite it properly when you fold it in.
UI.md:87来自说明文档打开原文件
- Clicking an arrow updates the URL search param (use the framework's router, e.g. `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable.- Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.- Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.- Hidden in production builds: gate on `process.env.NODE_ENV !== 'production'` or an equivalent check, so a stray prototype merge can't ship the bar to users.
UI.md:98来自说明文档打开原文件
### 6. Capture the answer and clean upOnce a variant has won, capture the answer (which variant and why), then capture the prototype the way the [SKILL](SKILL.md) describes. Fold the winner into the real code and move the rest onto the throwaway branch, not into main:- **Sub-shape A**: fold the winner into the existing page; drop the losing variants and the switcher from main.- **Sub-shape B**: promote the winning variant to a real route; drop the throwaway route and the switcher from main.The full set of variants is the primary source, so it lands on the throwaway branch, not the bin, since variant components and the switcher left in the main branch rot fast and confuse the next reader.
中风险

未经测试的逻辑模块被明确设计为可直接移入正式代码

原文依据:4 处
发现了什么

通用规则要求原型不写测试、只做最低限度错误处理;但逻辑分支又称核心模块“不是”一次性代码,并要求验证后将 reducer、状态机或函数集移入真实模块。这里没有像 UI 分支那样明确要求先按生产标准重写。

为什么需要注意

原型中未覆盖的非法状态、边界情况或错误路径可能进入正式业务逻辑,影响数据正确性或安全相关决策。

该风险有依据,但不是要求把整个原型页面直接上线。通用规则明确省略测试并只做最低限度错误处理,而逻辑说明又把核心模块称为非一次性代码,并表示其可直接移入真实模块。虽然“validated”意味着应先由原型验证设计,但没有规定生产级测试、安全检查或错误处理门槛。因此,若执行者把“lift”理解为原样复制,正式业务逻辑可能缺少验证。用户可要求在合并前进行独立审查、补充测试和失败处理。

SKILL.md:23来自说明文档打开原文件
2. **Trivial to run.** A UI prototype starts from one command in the project's task runner: `pnpm <name>`, `python <path>`, `bun <path>`, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it.3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE, wipe me" name.4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
查看另外 3 个位置
LOGIC.md:22来自说明文档打开原文件
### 2. Isolate the logic in a portable modulePut the actual logic (the bit that's answering the question) in a single `<script>` block written as a small, pure module that could be lifted out and dropped into the real codebase later. The page around it is throwaway; this module isn't.
LOGIC.md:56来自说明文档打开原文件
### 5. Capture the answer and the prototypeOnce the prototype has answered its question, capture the answer, then capture the prototype the way the [SKILL](SKILL.md) describes. The logic-specific mapping: the validated reducer / machine / function set lifts into the real module (the decision, absorbed); the HTML shell rides along to the throwaway branch that keeps the prototype as a primary source, and being one self-contained file, it stays trivially re-runnable there.
LOGIC.md:60来自说明文档打开原文件
## Anti-patterns- **Don't add tests.** A prototype that needs tests is no longer a prototype.- **Don't wire it to the real database.** Use in-memory state unless the question is specifically about persistence.- **Don't generalise.** No "what if we wanted to support X later." The prototype answers one question.- **Don't blur the logic and the page together.** If the pure module references the DOM, `document`, or button handlers, it's no longer liftable. Keep the page as a thin shell over a pure module.- **Don't reach for a framework, bundler, or server.** One file the recipient double-clicks; a React app or a dev server defeats "shareable".- **Don't ship the HTML shell into production.** The page is optimised for being clicked through by hand. The logic module behind it is the bit worth keeping.
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

2 个说明模块

该 Skill 根据用户要验证的是逻辑/状态还是界面外观,在逻辑原型和 UI 原型之间选择;若问题不明确,则依据周边代码自行选择并在原型中声明假设。

查看原文
SKILL.md:12来自说明文档打开原文件
Identify which question is being answered, using the user's prompt, the surrounding code, or by asking if the user is around:- **"Does this logic / state model feel right?"** → [LOGIC.md](LOGIC.md). Build a single shareable HTML file (free-play buttons plus tabbed guided walkthroughs) that pushes the state machine through cases that are hard to reason about on paper, and that a non-developer can drive.- **"What should this look like?"** → [UI.md](UI.md). Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.The two branches produce very different artifacts, so getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.

逻辑分支生成一个可双击运行、可转发的单文件 HTML,并在每次操作后显示完整相关状态;默认使用内存状态,只有明确测试持久化时才使用临时数据库或本地文件。

查看原文
SKILL.md:22来自说明文档打开原文件
1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious, but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.2. **Trivial to run.** A UI prototype starts from one command in the project's task runner: `pnpm <name>`, `python <path>`, `bun <path>`, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it.3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE, wipe me" name.4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
LOGIC.md:35来自说明文档打开原文件
### 3. Build the shareable HTML fileOne file, plain HTML/CSS/JS: no framework, no bundler, no server, everything inline so it opens by double-click and survives being emailed around. Anyone should be able to run it by opening it.Write it for a non-developer. Every label is in **domain language**, not code: buttons and state read like the business, not the reducer. Explain in plain words what's happening.

UI 分支优先把多个变体嵌入现有页面,保留原页面的数据获取、参数和认证,并用可分享的 URL 参数切换。涉及写操作时,说明要求使用存根而非真实后端。

查看原文
UI.md:18来自说明文档打开原文件
### Sub-shape A: adjustment to an existing page (preferred)The route already exists. Variants are rendered **on the same route**, gated by a `?variant=` URL search param. The existing data fetching, params, and auth all stay. Only the rendering swaps. This is the default; pick it unless there's a specific reason not to.If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow), it's still sub-shape A. Mount the variants inside the host page.
UI.md:107来自说明文档打开原文件
## Anti-patterns- **Variants that differ only in colour or copy.** That's a tweak, not a prototype. Real variants disagree about structure.- **Sharing too much code between variants.** A shared `<Header>` is fine; a shared `<Layout>` defeats the point. Each variant should be free to throw out the layout.- **Wiring variants to real mutations.** Read-only prototypes are fine. If a variant needs to mutate, point it at a stub: the question is "what should this look like", not "does the backend work".- **Promoting the prototype directly to production.** The variant code was written under prototype constraints (no tests, minimal error handling). Rewrite it properly when you fold it in.

完成后,该 Skill 要求把验证后的决定并入正式代码,把原型提交到独立的临时分支,并在实现议题中留下分支指针和结论。

查看原文
SKILL.md:26来自说明文档打开原文件
5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
从这里开始 · 工作说明SKILL.md
prototype
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

6 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录4 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • LOGIC.md已纳入全文
  • UI.md已纳入全文
  • agents/openai.yaml已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • LOGIC.md配套文件
  • SKILL.md工作说明
  • UI.md配套文件
  • agents/openai.yaml配套文件

代码和说明中提到的操作

读取密钥或账号配置
UI.md:90来自说明文档打开原文件
- Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.- Hidden in production builds: gate on `process.env.NODE_ENV !== 'production'` or an equivalent check, so a stray prototype merge can't ship the bar to users.
读取了多少行
212
文件校验值(用于核对版本)
cb5ae3dfa2bf30329390f656aad9353368c20f99d9f213db90de78ac166d1b6d