prototype
mattpocock/skills · Agent Skill
建立單次原型以快速回答設計問題或邏輯問題。
前往安裝 ↓總覽
| 發布者 | |
|---|---|
| 儲存庫 | mattpocock/skills ↗ |
| 技能資料夾 | prototype |
| 星 | 303,922 |
| 分支 | 25,575 |
| 附帶檔案 | 4 |
| 授權 | MIT |
| 最近更新 | 2026年10月22日 |
| 連結 | 技能原始碼 ↗ · 儲存庫 ↗ |
Mozgi 檢查
我們在技能檔案中發現的內容。詳細資訊需訂閱。
安裝
技能就是一個含 SKILL.md 的資料夾。選擇你的代理,在專案根目錄的終端機(macOS、Linux 或 Windows 的 Git Bash)執行指令。
把提示貼到 Claude、Codex 或其他助理:它會自行檢查並安裝技能。
Install the “prototype” skill from mozgi.io (https://mozgi.io/skills/mattpocock-prototype/) for me. 1. Download the archive: https://mozgi.io/skills/mattpocock-prototype/download If it fails, take the skill folder from the source: https://github.com/mattpocock/skills/tree/main/skills/engineering/prototype 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “prototype” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/prototype/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/mattpocock/skills.git /tmp/skills mkdir -p .claude/skills cp -r /tmp/skills/skills/engineering/prototype .claude/skills/prototype
重新啟動 Claude Code — 技能就會出現在清單中,手動呼叫:/prototype。要套用到所有專案,請放在 ~/.claude/skills。
git clone --depth 1 --branch main https://github.com/mattpocock/skills.git /tmp/skills mkdir -p .agents/skills cp -r /tmp/skills/skills/engineering/prototype .agents/skills/prototype
Codex 會從目前資料夾往上到儲存庫根目錄,在 .agents/skills 中尋找技能;用 /skills 或 $prototype 呼叫。所有專案:~/.agents/skills。
git clone --depth 1 --branch main https://github.com/mattpocock/skills.git /tmp/skills mkdir -p .cursor/skills cp -r /tmp/skills/skills/engineering/prototype .cursor/skills/prototype
Cursor 啟動時會載入技能;在 Agent 聊天輸入「/」呼叫。Cursor 也會讀取 .claude/skills 與 .agents/skills。所有專案:~/.cursor/skills。
git clone --depth 1 --branch main https://github.com/mattpocock/skills.git /tmp/skills mkdir -p .gemini/skills cp -r /tmp/skills/skills/engineering/prototype .gemini/skills/prototype
任務符合時,Gemini CLI 會提議啟用技能,由你確認。所有專案:~/.gemini/skills。
安裝前請先檢視 SKILL.md 與相關檔案。點擊檔案即可預覽。
SKILL.md 內容
作者原文 · 唯讀Prototype
A prototype is throwaway code that answers a question. The question decides the shape.
Pick a branch
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 ↗. 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 ↗. 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.
Rules that apply to both
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.
常見問題
prototype 技能有什麼用途?
建立單次原型以快速回答設計問題或邏輯問題。
如何安裝 prototype?
打開本頁的「安裝」區塊並選擇你的代理 — Claude Code、Codex、Cursor 或 Gemini CLI:那裡有把技能資料夾複製到正確位置的現成指令。也可以複製「透過助理」分頁中的提示,讓助理自行檢查並安裝技能。
prototype 適用哪些 AI 模型?
技能是純 Markdown 指示(Agent Skills 格式),因此 prototype 適用任何讀取 SKILL.md 的代理:Claude Code、Codex、Cursor、Gemini CLI、GitHub Copilot、OpenCode 等。只有在任務符合技能描述時,模型才會載入指示。
prototype 是免費的嗎?
此技能由 mattpocock 公開發布,採用 MIT 授權。技能本身免費 — 你只需向 AI 供應商支付實際使用的 token 費用。
安裝技能安全嗎?
技能是代理會遵循的指示,安裝前請閱讀 SKILL.md 及相關檔案。技能資料夾中的腳本只有在代理執行時才會運行 — 留意它的動作,不要授予多餘權限。
技能和 MCP 伺服器或外掛有何不同?
MCP 伺服器或外掛為模型提供新工具 — 會執行並回傳結果的程式碼。技能提供的是知識與流程:如何處理任務、要遵循哪些步驟、好的成果長什麼樣子。它不需要伺服器或 API 金鑰。