clarify-ui
Skill0 starsChanged 3 months agoMITView on GitHub
Build an interactive HTML prototype — a functional shell with real interaction logic, no backend, no visual design — so the user can feel the UX before implementation, and iterate until approved. Invoke ONLY when the user names clarify-ui or clarity-flow enters the ui step; never self-activate from a passing mockup request.
In this repository8 other files it gives its agents.
- clarify-acceptanceSkill
- clarify-architectureSkill
- clarify-behaviorSkill
- clarify-dataSkill
- clarify-directionSkill
- clarify-requirementsSkill
- clarity-flowSkill
- clarity-previewSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Publish: Run clarity publish — the prototype appears in the site index alongside the diagrams.
- Very specific: line 46
All artifacts live in the staging dir <projectRoot>/docs/clarity/ — for this capability, docs/clarity/prototypes/<name>/ (clarity root …
- Very specific: line 49
All tools via the clarity CLI (never relative tool paths).
- Distinctive: line 79
Never let prototype and behavior spec disagree.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
clarify-ui — feel the app before building it
Called when a UI's experience must be judged by using it, not by reading about it. Produces
docs/clarity/prototypes/<name>/index.html + ui-notes.md in the staging dir (see
Paths), and registers the prototype in the preview site.
What the prototype is
- A single self-contained HTML file (inline CSS/JS, placeholder data, no build step, no network calls) that opens straight in a browser — or via the preview server.
- Behaviorally faithful to the approved behavior spec: if a
behavior.yamlexists, every state, event, guard-outcome and transition is observable, and the embedded state machine mirrors the YAML 1:1 (state names identical). Actors are simulated with timers/promises; failures and cancellations must be triggerable (small dev panel: "simulate failure", "simulate slow network"). - Visually neutral: grayscale, system fonts, boxes and labels. Layout, hierarchy, copy and interaction — real. Colors, icons, animation, branding — absent.
Method
- UI interview (batch the questions). Layout preferences? Navigation pattern? Reference
apps the user likes? Density? Pet peeves? Record answers in
ui-notes.md. - Implement the prototype. One HTML file; states rendered as the UI the user sees in that state; controls wired to events; dev panel for actor outcomes.
- Publish. Run
clarity publish— the prototype appears in the site index alongside the diagrams. Works with zero diagrams in the staging dir too (check is vacuously green; the site still builds). Never start the server yourself — that's the user-invokedclarity-previewskill. In conversation, walk the user through which flows to try, especially failure, retry and cancel paths — the conversation is the guide, the browser is the experience; don't point at files for explanation. - Iterate until the user explicitly approves. Two kinds of feedback:
- Behavioral ("cancel should keep the file selected") → if a
behavior.yamlexists, change it FIRST, re-validate, redraw affected views, then update the prototype. The model stays the source of truth. - Presentational ("search should be at the top") → change the prototype +
ui-notes.md.
- Behavioral ("cancel should keep the file selected") → if a
- On approval: record it in
ui-notes.md. What happens next (implementation, and how the prototype informs it) is the governing workflow's call.
Paths (derived, never chosen)
- All artifacts live in the staging dir
<projectRoot>/docs/clarity/— for this capability,docs/clarity/prototypes/<name>/(clarity rootshows the derived root). Never invent or negotiate other locations. - All tools via the
clarityCLI (never relative tool paths). If missing:export PATH="$HOME/.local/bin:$PATH", retry once, then STOP and report — never improvise.
Modifying existing artifacts
The prototype and ui-notes.md record presentation decisions; behavioral feedback
goes through behavior.yaml first (the model is the source of truth), then the
prototype is updated to match.
Fidelity checklist (verify before presenting)
- Every specified state has a distinct, labeled UI representation
- Every user-sourced event has a working control
- Every actor outcome (done/error) can be simulated from the dev panel
- Guard outcomes are demonstrable (e.g. retry limit reached → retry disabled)
- No real backend calls, no external assets, opens offline
- Grayscale only
Optional diagram
A journey (cross-module UX review: stages, actions, satisfaction scores — scores
force honest UX thinking) is optional when the user wants to judge the experience
across modules/stages, not just within this prototype. It must force a UX decision;
otherwise skip it.
Rules
- The prototype is throwaway: production code does not reuse it; it is the layout/interaction reference.
- Never let prototype and behavior spec disagree. The spec wins — unless the user decides the behavior itself changes (then the spec changes first).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

