prototype
Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- prototype
- description
- Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
02 资源文件 2
03 SKILL.md 正文
Prototype
Prototype = throwaway code answering one question. Question decides shape.
Pick a branch
Name question from user prompt and surrounding code:
- "Does this logic / state model hold up?" → LOGIC.md. One shareable HTML file (free-play buttons + tabbed guided walkthroughs) pushing model through cases hard to reason about on paper; non-developer can drive it.
- "Which layout should this be?" → UI.md. Several structurally different variations on one route of real app, switchable via
?variant=search param and floating bottom bar.
Branches produce very different artifacts. Question still ambiguous? Ask user which before building. Backend module → logic; page or component → UI.
Not this skill:
- Whole visual identity up for grabs (new look, art direction): visual design skill, if installed.
- Decision user can settle by talking:
groundwork:grilling. - Real feature to build: project's normal workflow. Prototype answers question, then thrown away.
Rules that apply to both
- Throwaway from day one, marked so. Place prototype next to module or page it's for; put
prototypein file or route name. UI routes: follow project routing convention; no new top-level structure. - Trivial to run. Logic demo = one HTML file: open it for user (
start <path>on Windows,open <path>on macOS,xdg-open <path>on Linux) and give absolute path. UI prototype runs on project's existing dev command: give command and URLs with each?variant=key. - No persistence by default. State in memory. If question is about persistence, use scratch DB or local file named
PROTOTYPE-wipe-meor similar. - Skip polish. No tests, no error handling beyond making it run, no abstractions. Point: learn fast.
- Surface state. After every action (logic) or variant switch (UI), render full relevant state so user sees what changed.
- Speak domain. Labels, scenario names, variant names use terms in
GLOSSARY.mdwhen project has one.
When the question is answered
- Write verdict: question, answer, what surprised user.
- Fold validated decision into real code, rewritten properly. Prototype code had no tests or error handling.
- Decision with load-bearing reason future readers would re-litigate? Call Skill tool with
groundwork:domain-modeling, offer ADR. New domain terms surfaced? Same skill, updateGLOSSARY.md. - Remove prototype from working tree. Ask user first whether to keep copy, e.g. on
prototype/<name>branch. No branches or commits without asking.
04 同仓库更多 Skills
unslop
Use when writing or editing prose a person will read, or when text sounds AI-generated.
show-me
Use when asked to show, diagram, or walk through how code fits together or what a change does, or before explaining a multi-file flow in prose.
pr
Use when writing or updating a pull request description, or before running `gh pr create`.
commit
Use when writing a commit message, or before running `git commit`.
write-specs
Spec a feature's observable behavior. Use when asked for requirements, when a request says what the system should do but not how, or to capture what a built system already guarantees. Not for how to build it (write-plan).
write-skills
Write, fix, or audit a skill's frontmatter, trigger description, and body. Use when a skill is asked for, never fires, or fires at the wrong moment. Not for a hook (write-hooks) or the plugin manifest and catalog.