/use-html-theme:html-codesign [topic]from use-html-theme
Build a self-contained HTML page for reviewing unanswered questions, choosing options, adding notes, and exporting decisions. Use when the user asks for a codesign or decision page to compare designs, plans, or priorities asynchronously. Confirm the question set before generating. Not for settled material (html-explain), decisions walked through in chat (question-walkthrough), or signing Apple binaries.
Ships in use-html-theme. 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.
A single .html file that turns a decision into something a person can
operate. It opens as a step-through wizard by default — one question
per screen with Next/Back, a "Question N of M" progress line, and clickable
progress dots (answered/skipped state visible per dot); the last step's
Finish → review lands on all sections folded to their summary rows with
the export controls. A Wizard | List toggle in the control bar switches
to the classic full-list view and back at any time, resuming the exact
question. Under either view: sections of choices (pick-one or pick-any),
each opening with a collapsible context & recommendation preamble — free-form content
(prose, tables, inline SVG charts, images) shaped by a clarity scaffold,
with a ★ badge on the recommended option — plus per-section notes, a
Skip control on every question (deliberately-not-deciding is a
first-class answer), an Ask a question channel for "I can't answer
this yet", and three layers of manual collapse — fold the context away,
hide unchosen options (note stays visible), or fold a whole section to a
dense one-line summary (question · picks · followed/went-against marker ·
note) so a finished page scans as a review of the decision. The control
bar carries the contract — Export → MD, Export → JSON (slim by
default, full by toggle), Another draft, Here are my answers,
Questions first, plus Collapse/Expand all. The reader — who may not
be in this chat at all — opens the file anywhere, clicks, and sends the
export back. That text round-trip is the interface; it works identically
whether the page was generated from Claude Code, Codex, or anything else,
because the page never needs a live connection to an agent.
✓ "Give me 4 layout directions and let me pick"
✓ "Make a decision page for plan A vs plan B"
✓ "I want to prioritize these features — let me toggle and export"
✓ "Codesign the palette with me"
✗ A read-only page, report, or writeup (that is plain themed HTML — use-html-theme alone)
✗ A quick either/or the user can answer in chat (just ask; AskUserQuestion exists)
✗ Anything about signing apps or binaries — Apple's codesign is unrelated
Run references/_shared/context-triage.md in full, then gate.
context-triage.md
delivery-close.md
Never open codesign without human confirmation. Building a decision page is expensive, and a page of the wrong questions is worse than no page — it re-litigates settled work and asks the user to spend attention on choices they already made or never had.
The gate fires every time:
/html-codesign)An explicit invocation settles which page type, not which questions. An argument narrows the target but rarely pins the exact set — "codesign the caching questions" still leaves which ones, and whether the ones you found are the ones meant. An argument shortens the gate to a confirmation. It never removes it.
Show the actual questions before asking. List every section you would
put on the page, each with the sec-NN ID it will carry and the
recommendation you would argue — that is what makes the confirmation
meaningful rather than ceremonial:
Recent context has 4 open questions. Here's how I'd shape the page:
sec-01 Should the fallback ship as its own module, or fold into core?
→ I'd argue fold in — one less package to version.
sec-02 Do we keep the v1 endpoint alive through the migration?
→ I'd argue yes, behind a deprecation header.
sec-03 Who owns the rotation runbook — platform or on-call?
→ Genuinely neutral; I'd lay out both and not recommend.
sec-04 Ship behind a flag, or straight to default-on?
→ I'd argue flag — the blast radius is the whole write path.
A codesign page poses each of these with a reasoned recommendation and
lets you pick, skip, or ask back. It doesn't decide for you.
The example ends there on purpose. No "Generate it for these four?" tacked on the end — that question belongs in the dialog on the next turn, and appending it here is exactly the same-turn violation the rule below forbids. The ask lives in the option labels, never in the pre-read.
Frame the value honestly: codesign poses questions with recommendations — it does not decide. A user who thinks they're delegating the decision has misunderstood what they'll get back.
The gate is TWO turns, never one. Same-turn prose may never render — when a turn ends in a tool call the user can receive only the dialog, which here would mean approving a page whose questions they never saw. That is worse than no gate at all. So the question list above ends its turn — no tool call of any kind after it — and AskUserQuestion opens the next one.
Belt and suspenders: write every option to stand alone, in case the pre-read is lost anyway. "Generate the page for these 4 (sec-01…sec-04)" beats "Yes".
One AskUserQuestion, triage verdict recommended first, always including:
question-walkthroughhtml-explainUnanswered questions only. A question already asked and answered is
settled material — it belongs to html-explain as a deep dive on how it was
resolved. Never re-pose it. The user may explicitly ask to revisit one; that
is their call to make, never an offer to pad the page with.
If triage finds little that is open and a lot that is settled, say so and
offer html-explain as the recommended option instead.
Shape the decision. Identify the sections (one per question), whether
each is pick-one (exclusive: true) or pick-any, the 2–5 choices each,
and sensible defaults. If the structure is genuinely ambiguous, ask ONE
clarifying question (AskUserQuestion if available; plain numbered chat
list otherwise).
Author a context per section — always. Two parts. The spec gets the
envelope — a one-line summary, an argued recommendation, and
the recommended choice id(s); a page without one per section is
invalid (empty recommended only when the recommendation text argues
why the trade-off is genuinely neutral). The body is free-form HTML
authored in the page's .ctx block, default-shaped by the clarity
scaffold: .ctx-what (what this decision is, in plain words), then
.ctx-why (why it's being asked, what the answer drives), then a free
zone — prose, a pros/cons table, an inline SVG chart, a data:-URI
image, whatever genuinely orients — then the .ctx-rec ★ callout.
Hard writing rules: section titles are real questions ("Which
themes should learn the new look?", never "Theme overlay coverage");
write every context for a reader who was never in this chat — zero
session jargon, define each term of art at first use, orient before
arguing. Every question must be self-explanatory in clear, plain
language — decidable from its own screen, which the wizard view makes
literal (one question per screen, nothing else to lean on). When the
clear-technical-communication skill is available in this session,
invoke it and apply its reader-side checks to every section title,
context, and choice label before rendering; when it isn't, apply this
digest of it as the proxy:
Clear-communication digest (fallback proxy). Minimize what the reader must infer — never make them reconstruct your mental model. Gate every title, context, and label four ways: relevant (what this reader needs, no process chatter), findable (the question and recommendation are easy to locate), understandable (terms, references, and status explicit), usable (decidable in one pass). Pair every technical name with a plain description at first use — never judge that "this reader already knows it". Every choice states its consequence (behavior, cost, or risk), not just its name; the recommendation argues, it never merely points. Pick the form that exposes the structure: three or more options sharing dimensions suggest a comparison table in the context body; an exact snippet beats prose describing one. One primary assertion per sentence; literal verbs; essential constraints in main sentences, never parentheses; repeat the noun when a pronoun could point two ways. Cold-read to finish: could a stranger say what this asks, why it matters now, what each option costs, and what happens after — without having been in this chat?
Write the spec first. Author the codesign-spec JSON to
references/spec-format.md, with IDs per references/id-grammar.md.
Write it to a file next to where the artifact will go. Omit
defaultView (the page opens as a wizard) unless there's a reason to
open in list view — e.g. a 1–2 question page — in which case author
"defaultView": "list".
Validate before rendering. Run
scripts/validate_spec.py <spec-file> (stdlib Python, no deps). Fix
until exit 0. Never render from an unvalidated spec — a duplicate ID, a
missing context, or a double-selected exclusive section breaks the page
silently.
Resolve the theme. Follow references/theming.md: use the
use-html-theme session theme if one is active, else its persistence file,
else the neutral built-in style. Never mix themes.
Render from the template. Start from
assets/codesign-template.html. Embed the validated spec in the
<script id="codesign-spec" type="application/json"> tag (the validator
already rejects strings containing </script; if you must keep such
text, escape / as \/ — valid JSON, HTML-safe), author the DOM to
match it — every data-id mirrors a spec id, one .ctx block per
contexts envelope (scaffold + free-form body per step 2), a
.badge-rec on each recommended choice, and each section's .summary
row, .fold button, .sec-actions (opt/skip/ask toggles), and
.q-wrap with its q-NN textarea in place — and keep the engine
script intact. The wizard is engine-owned: keep the template's
single .wiz-nav element and the View seg in the control bar, set
<body data-view="…"> to match the spec's opening view, and author
nothing wizard-specific per section. Apply the theme layer per
step 5.
Deliver and explain the loop. Give the file path (and open/preview it only when the shared gate in the close-out below permits — never merely because the platform has a command for it). Tell the user the reader steps through the questions one per screen (Next/Back, clickable progress dots, Finish → review at the end) or toggles to the full list at any time, can review then collapse each context, skip questions they're not deciding, raise a question when they can't answer ("Questions first" bundles them into a paste-back), fold answered sections to scan their decisions, and export MD/JSON (slim by default; Full toggle for a human decision record) or click "Another draft" / "Here are my answers" and paste the result back into any chat with you.
Then close out per references/_shared/delivery-close.md: the full
absolute path on its own line (never relative — the reader is often not
in the shell that made the file), and a short prose list of what they might
want next. Those offers are strictly conditional — open it in the browser
only when this session runs on the user's own machine (same gate for
copying the path to the clipboard), add it to shelf only when
that skill is installed (if it isn't, don't mention it at all), and where
to save it whenever the file sits somewhere temporary or anywhere you
chose rather than the user. The save recommendation is read from
context, never a fixed ranking. The paste-back loop above leads; these
come after it.
On a returned export or re-prompt, follow
references/iteration-loop.md: reuse every surviving ID, mint new IDs
only for new choices, re-author every section's context for the v2,
honor skips (drop or re-frame, never re-ask unchanged), answer every
open_question quoting its q-NN, and treat the returned selections
as the user's decision.
html-explain's
material, not this skill's..html, embedded CSS/JS, no external requests, no
build step. The file must work from file://, an artifact host, or an
email attachment.data-ids mirror it exactly.skipped: true in JSON so the loop never re-asks unchanged.q-NN appears in every export and
re-prompt, even on skipped sections — skip governs decision content
only.codesign-answers documents (references/export-formats.md), slim by
default with a Full toggle. Don't make the user choose a format.defaultView ("wizard" when absent) decides only what the page opens
as; "list" is authorable with a reason (e.g. a 1–2 question page).
Navigation is always reader-initiated — Next/Back, clickable progress
dots, the Finish → review step — never auto-advance. The wizard is
engine-owned: one .wiz-nav element, zero per-section wizard DOM.<meta name="color-scheme" content="light">; dark theme → dark. (iOS Safari auto-darkens pages
that don't declare.):focus-visible states; respect
prefers-reduced-motion.validate_spec.py exit 0 on the embedded spec?data-id in the DOM, and vice versa —
including one .ctx block with a non-empty free-form body per
contexts envelope? (On load the engine hydrates selections FROM the
spec — a mismatched data-id silently drops that choice from exports.).ctx-what orientation a stranger could follow (no
session jargon), then .ctx-why?q-NN field; does "Questions
first" bundle every non-empty question into the paste-back?defaultView is absent, list when "list"); does exactly one section
show per step with Back disabled on the first; does the last step's
"Finish → review" land on list view with every section folded and the
toggle showing List active; does Wizard → List → Wizard resume the same
question; do the progress dots jump and show answered/skipped state;
does a section collapsed in list view still render in full when it
becomes the current wizard step; are the feedback block and bottom bar
hidden in wizard view and present in list view?skipped: true in JSON;
does an open_question surface in both; does Full add the context
envelope (summary + rec + verdict — never the body), all options, and
the followed/went-against verdict; do exports ignore collapse state?color-scheme meta present?shelf only if that skill is installed (and unmentioned if
not)?body[data-view], section[data-current], one
.wiz-nav). If a section needs something wizard-specific to work,
the change belongs in the engine, not the page.html-explain, which owns read-only pages
and their figures.html-explain deep-dives it without asking for a pick.
When the request could mean either, offer both rather than guessing —
this is where triage most often goes wrong.docs/decisions/); either way
the page file itself is the archive of the rich context.references/design-notes.md first — it
records the AskUserQuestion lineage of the sections core, the
input/output schema split, and the invariants edits must preserve.references/_shared/context-triage.md — the shared preflight this skill
runs before anything else; the routing authority between the two page
skills.html-explain (this plugin) — the sibling: read-only explainer pages for
settled material, including a deep dive on a question already resolved.references/_shared/delivery-close.md — the shared close-out: absolute
path, then the conditional convenience offers.use-html-theme (this plugin) — owns the page's look.question-walkthrough (this marketplace) — the synchronous alternative:
the same open questions worked through one at a time in chat.This skill's citations are spelled relative to the citing file. From the
skill root that means the sibling-skill theme overlay
../use-html-theme/references/themes/<name>/codesign.md and the vendored
_shared copies (context-triage.md, delivery-close.md, cited from here
as references/_shared/ paths); one level deeper, from references/, the same
overlay is ../../use-html-theme/references/themes/<name>/codesign.md and
in-skill siblings stay short (export-formats.md, design-notes.md,
id-grammar.md, ../scripts/validate_spec.py). The vendored copies are
generated from the plugin-level references/ sources — read the in-skill
copy, never reach past the skill directory for the source.
When this skill is installed as a symlink, the OS resolves the ../
segments through the link, so relative citations just work. When computing
a target lexically instead, anchor on the realpath of SKILL.md first and
resolve the citation from its directory. A bare copy of the skill directory
has no siblings: ../use-html-theme/... does not exist there, so fall back
to locating the install source (the plugin tree the copy came from) and
resolve the sibling-skill overlay against that.
assets/codesign-template.html (opens in a new tab)references/_shared/context-triage.md (opens in a new tab)references/_shared/delivery-close.md (opens in a new tab)references/design-notes.md (opens in a new tab)references/export-formats.md (opens in a new tab)references/id-grammar.md (opens in a new tab)references/iteration-loop.md (opens in a new tab)references/spec-format.md (opens in a new tab)references/theming.md (opens in a new tab)scripts/fixtures/invalid-spec.json (opens in a new tab)scripts/fixtures/valid-spec.json (opens in a new tab)scripts/validate_spec.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/html-explainBuild a read-only explainer page as one self-contained HTML file, with diagrams, figures, and small widgets where prose is not enough, confirming the target before generating. Use when an explanation should be a shareable page, such as "explain the design we landed as a page", "make an explainer for this spec", or "deep dive on X as a page". Not for inline explanations (explain) or pages that collect decisions (html-codesign)./use-html-themeOffer a small catalog of visual themes and apply the chosen one to every HTML page, artifact, mockup, or email generated in the session, saving the choice for the project with user consent. Use when the user asks to generate or restyle HTML and no theme has been chosen yet, or asks to preview or switch themes. Not for markdown, JSON, or non-HTML output, or when the user said [notheme].Other plugins' skills for the same job
npx claudepluginhub smorinlabs/smorinlabs-skills --plugin use-html-theme