/design-flow:viewfrom design-flow
Show the design live and run the co-design loop: docs/ui rendered in the browser (token sheet with contrast verdicts, component gallery, screen states, candidate pick), with every user click and note landing in events.jsonl for the agent's next round. Use when the user says "cùng design", "cho tôi xem design", "preview the UI", "show the design", or when publishing the prototype as gate evidence. This skill shows and collects feedback; design-flow:ui-designer is the one that writes the artifacts.
Ships in design-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
docs/ui/. Fix the
data, never the shell — a per-project shell tweak is how "one payload, no contradictions"
dies..design-flow/preview/ is ephemeral and
gitignored. A draft that lands in docs/ looks governed when it is not.A design nobody can see gets approved by politeness. This surface puts the current direction on a screen — live, clickable, honest about what it does not know — so the person who can say "primary chói quá" says it by pointing at the thing.
node ${CLAUDE_SKILL_DIR}/scripts/ui_view.mjs --root . --out .design-flow/preview/model.json \
[--candidates .design-flow/preview/candidates]
node ${CLAUDE_SKILL_DIR}/scripts/preview-server.cjs --dir .design-flow/preview
The server prints a URL with a session key — open it for the user. Rewriting model.json
(i.e. re-running the extractor after any artifact edit) live-reloads every open tab over SSE.
The drawer and every clickable element on the surface POST to the server, which appends one
JSON line per interaction to .design-flow/preview/events.jsonl:
| Event | Meaning | Agent's move |
|---|---|---|
{type: "candidate-pick", name} | The user chose a direction by eye | Promote that candidate to docs/ui/tokens.json; record the others under Rejected defaults in the brief |
{type: "note", lens, target, text} | A comment aimed at a swatch / component / screen (or general) | Apply it if unambiguous; queue a question only if it conflicts with the brief or another note |
{type: "approve", lens} | The user signs off the current lens | Record it; when the lenses covering the deliverable are approved, move to close-out |
Protocol, every round (and immediately whenever the user says "đọc feedback" / "check the view"):
events.jsonl; process only lines after the count stored in
.design-flow/preview/events-processed.json (write {count} back after processing — the
file is the resume marker, so no event is applied twice or dropped).docs/ui/ artifacts, re-run
check_tokens.mjs, re-run the extractor; the browser re-renders on its own. Do not
re-ask in chat what the user already said on the surface.approve is a lens sign-off from the user's hand — it may be cited in the close-out
summary, but it is not a governed status flip; those stay with the owner under the
ratification policy.tokens.json, write
2–3 candidate token files to .design-flow/preview/candidates/<name>.json (each a valid
tokens shape with its own design read + palette + type), re-extract with --candidates, and
let the user pick on the Candidates lens. The pick event decides; the rejected candidates
become Rejected-defaults entries — real evidence the direction was chosen, not emitted.| Phase 1 — Preview | Phase 2 — Published | |
|---|---|---|
| When | co-designing; artifacts are draft | docs/ui/ is settled for this slice |
| Purpose | the user looks, clicks, decides | review surface + gate evidence |
| Output | .design-flow/preview/ — ephemeral, gitignored | docs/ui/_views/ (extractor with --mode published --out docs/ui/_views/model.json) |
| What changes | the artifacts — tokens, screens, brief | only which lens a reviewer opens |
Phase 2 is what gate-close cites: the red team and the owner review the rendered prototype — states, flows, contrast verdicts — instead of imagining them from prose, and the verifier can open the same payload the review saw.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub baodq97/govkit --plugin design-flow2 skills in this plugin