vs-show-me
Use when the user wants a complex topic explained or shown visually — a system, flow, architecture, or tradeoff; a proposal, RFC, design doc, decision brief, comparison, timeline, report, or dashboard; or asks to create, render, or edit an HTMDX artifact. A page of diagrams, metrics, and structured components replaces a wall of chat text. Produces one portable HTML file with editable HTMDX source.
- License 许可
- MIT
- 所属仓库
- vltansky/vs
- 最近更新
- 2026-11-06
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- vs-show-me
- description
- Use when the user wants a complex topic explained or shown visually — a system, flow, architecture, or tradeoff; a proposal, RFC, design doc, decision brief, comparison, timeline, report, or dashboard; or asks to create, render, or edit an HTMDX artifact. A page of diagrams, metrics, and structured components replaces a wall of chat text. Produces one portable HTML file with editable HTMDX source.
02 资源文件 43
- 参考文档agents/openai.yaml154 B
- 资产文件assets/artifact.html259.5 KB
- 脚本assets/check-verbosity.mjs5.6 KB
- 脚本assets/definitions.mjs214.6 KB
- 脚本assets/prediction.mjs6.0 KB
- 资产文件assets/proposal.html261.9 KB
- 脚本assets/render-check.mjs6.3 KB
- 脚本assets/review-overlay.mjs38.0 KB
- 脚本assets/sync-artifact-catalog.mjs4.3 KB
- 参考文档evals/evals.json1.7 KB
- 脚本scripts/mcp-app-resource-shape.mjs2.9 KB
- 脚本scripts/reject-htmdx-handoff.mjs3.2 KB
- 脚本scripts/run-write-slop.mjs7.1 KB
- 脚本test/authoring-contract.static.eval.ts13.7 KB
- 参考文档test/fixtures/handoff/bad-no-url/handoff.md104 B
- 参考文档test/fixtures/handoff/bad-shot-na/handoff.md77 B
- 参考文档test/fixtures/handoff/bad-url-only/handoff.md68 B
- 参考文档test/fixtures/handoff/clean-url-shot-failed/handoff.md115 B
- 参考文档test/fixtures/handoff/clean-url-shot/handoff.md129 B
- 参考文档test/fixtures/handoff/copy-owner-skill.md132 B
- 参考文档test/fixtures/handoff/slogan-only-skill.md115 B
- 参考文档test/fixtures/write-slop/clean-artifact.html316 B
- 参考文档test/fixtures/write-slop/clean-proposal.html412 B
- 参考文档test/fixtures/write-slop/dead-slash-skill.md199 B
- 参考文档test/fixtures/write-slop/exempt-non-prose.html463 B
- 参考文档test/fixtures/write-slop/mention-only-skill.md102 B
- 参考文档test/fixtures/write-slop/name-frontmatter.html334 B
- 参考文档test/fixtures/write-slop/runner-only-skill.md95 B
- 参考文档test/fixtures/write-slop/slash-only-skill.md201 B
- 参考文档test/fixtures/write-slop/slogan-only-skill.md88 B
- 参考文档test/fixtures/write-slop/slop-paragraph.html334 B
- 参考文档test/fixtures/write-slop/slop-proposal.html345 B
- 脚本test/handoff.static.eval.ts4.7 KB
- 脚本test/htmdx.eval.ts3.3 KB
- 脚本test/lifecycle-composition.static.eval.ts1.1 KB
- 脚本test/lifecycle-composition.ts1.1 KB
- 脚本test/mcp-apps-host.static.eval.ts6.3 KB
- 脚本test/prediction.static.eval.ts2.1 KB
- 脚本test/review-overlay.static.eval.ts9.4 KB
- 脚本test/show-me-exhibits.static.eval.ts16.8 KB
- 脚本test/visual-explanation.eval.ts3.9 KB
- 脚本test/vs-catalog.static.eval.ts33.8 KB
- 脚本test/write-slop.static.eval.ts6.8 KB
03 SKILL.md 正文
Show me
Turn source material into one visual artifact that a human can review in a browser and an agent can edit without touching generated markup.
This is a building block, not a research workflow. Preserve the supplied facts and conclusions. If the content is still unknown, gather it with the appropriate workflow first.
Optional inline preview
For a small interactive explainer or UI sketch to explore in the conversation, check inline preview before loading HTMDX. If eligible, use that route and return after its inline handoff. The HTMDX authoring, validation, URL + first-screen shot, and MCP Apps sections below apply to portable artifacts. Explicit HTMDX/file requests and complex reports or proposals retain that existing path.
Boundary
Use this skill when the user explicitly requests HTMDX, when HTMDX is the requested delivery format, or when the deliverable is a proposal or a complex explanation for a human — the two-layer contract in explanation-surfaces makes an HTMDX page the review surface and keeps chat to a short TLDR. For routine prose, plans, and machine-consumed state, use Markdown.
An HTMDX deliverable is:
- one portable
.htmlfile; - one editable
<script type="text/htmdx">source block; - a pinned browser runtime;
- a browser-local review overlay for text and element comments;
- feature-detected WebMCP tools that operate on those same comments;
- no generated HTML body and no Markdown twin.
Load the guidance
The component catalog, body grammar, and diagnostics are versioned with the runtime, so read them from the runtime rather than from memory. Run this before authoring, editing, or reviewing any HTMDX, from this skill's directory:
npx -y @wix/htmdx@4 skill --definitions ./assets/definitions.mjs
assets/definitions.mjs is the vs catalog: the vs layout the artifact
template names, which lives here rather than in the runtime. --definitions
makes the CLI answer against it — without the flag the linter reports
unknown-layout on a working artifact, and the skill output omits the
catalog's external topic. The template inlines a browser copy of the same
catalog, so a saved artifact renders it with no extra file.
When editing a file that already pins a runtime, read the guidance from that version instead, so it matches what the artifact actually loads:
npx -y @wix/htmdx@<pinned-version> skill --definitions ./assets/definitions.mjs
--definitions exists from 4.15.0. A pinned CLI that rejects the flag also
predates the vs layout — drop the flag there; those artifacts name
layout: default and lint without the catalog.
--definitions renders the catalog to read it, so it needs Node 22 or newer —
below that the call dies on ReferenceError: navigator is not defined before
printing anything. Rerun the same command through a newer runtime rather than
dropping the flag, since dropping it silently costs you the catalog:
fnm exec --using=24 -- npx -y @wix/htmdx@4 skill --definitions ./assets/definitions.mjs
# or: nvm exec 24 npx -y @wix/htmdx@4 skill --definitions ./assets/definitions.mjs
Whichever runtime answers, keep using it for every later htmdx call in the
task — the lint step takes --definitions too and fails the same way.
Follow that output as the source of truth for the artifact contract, component choice, body grammar, attributes, and the CLI. Load a companion topic when the task calls for it, at the same version that answered the first call:
npx -y @wix/htmdx@4 skill --list # available topics
npx -y @wix/htmdx@4 skill components # body grammar per component
npx -y @wix/htmdx@4 skill integration # React host, registration, testing
A pin that exits 2 with unknown command "skill" predates the command.
Rerun with @latest, and say in the handoff that the guidance is newer than
the runtime the artifact pins. If neither call loads, report the exact failure
and stop — do not reconstruct the component catalog from memory.
Start
State the artifact's review question in one sentence:
Review question: <what should become easier to understand or decide?>
Then determine the mode:
- Create: turn supplied files, notes, or results into a new artifact.
- Edit: update an existing file containing
type="text/htmdx".
Read every source the user identifies before choosing a layout. Separate verified facts from inference and preserve links, labels, units, dates, and uncertainty.
Create
-
Resolve the destination:
- use the exact path when the user supplies one;
- otherwise resolve
$PROJECT_IDwith ../vs-internal-shared/SKILL.md and write~/.vs/$PROJECT_ID/vs-show-me/YYYY-MM-DD-<slug>.html.
-
Pick the template shell by document kind:
- assets/artifact.html (
layout: vs) for reports, briefs, and analyses — the default; - assets/proposal.html (
layout: vs-proposal) for proposals, RFCs, and design docs that argue for a decision. Its hero renderstitle,project,owner,phase, andupdatedfrom frontmatter — keep the body h1-free — andphasetakes one of Draft, Proposed, Accepted, Rejected, or Superseded. Rejected and Superseded also render a notice band under the hero, so a dead proposal warns its reader before the lede; name the successor in the History section. The skeleton's section order (Problem → Proposal → Design details → Alternatives → Drawbacks → Rollout → Unresolved questions → Future possibilities → History → References) is the reviewer's reading order; drop a section only when it truly has nothing to say. Compose the Proposal section from Proposal exhibits.
Both carry the
vsartifact metadata the othervsreport skills share. Copy the complete shell; replace the title, frontmatter, and primary source placeholders. Generate a new UUID forvs-artifact-id; it is the artifact's stable browser-review identity and must not be reused when an existing artifact is copied into a new one. The shell's inline script is the browser copy of the vs catalog that the named layout renders through, plus the local review overlay — keep both intact. - assets/artifact.html (
-
Keep
@wix/htmdx@4pinned in both the renderer metadata and script URL. Everyvstemplate pins one major line — do not diverge from it for a single artifact. The major is the pin:@wix/htmdxpromises compatibility within a major and publishes a new minor on every merge, so a saved artifact picks up rendering fixes without being rewritten, while a major bump stays a decision. -
Build a reading sequence:
- conclusion first;
- decisive metrics, comparison, or timeline second;
- evidence and caveats next;
- detailed reference material last.
Lead summary-first: open with a
Brief(answer, why, main constraint, open question), start each long section with aTldrof the claims a skimmer keeps, and park that section's proof in a<Foldout title="Deep dive">right after it. A reader who only reads the Brief and the TL;DRs still gets the whole argument. For "what lives where" reach forZones; for what may and may not pass between two sides,Crossing. -
Before drafting, sketch a visual plan in working notes. Name the important information shapes — relationship, state, sequence, comparison, hierarchy, or spatial arrangement — and choose the clearest runtime primitive for each. Choose a visual thesis before component names: journey, fork, anatomy, stack, spectrum, or spatial map. An equal card grid is not a composition and is not the default. Establish one focal element and a clear hierarchy; use asymmetry, scale, overlap, or directional placement only when it explains importance, containment, progression, or choice. In explanation mode, give the core mental model two visual layers: a map of the mechanism and one purpose-built composition that makes its roles, state, or spatial logic recognizable at a glance. Build that composition from shadcn primitives for a familiar interface pattern, or Tailwind with allowlisted HTML for a bespoke mock, layered system, or state view. For a familiar UI explanation, combine at least two distinct shadcn primitives in one composition; Tailwind is not a substitute there. A lone
Badge, decorative card, or second rendering of the same facts does not count. This is a quality bar, not a component quota: reports, proposals, and genuinely one-shape explanations should not gain extra chrome. Use spatial position only when it carries meaning, and let different information shapes use different visual languages within one artifact. -
Draw structure as diagrams, not text. The runtime renders fenced
```mermaidblocks natively, so anything with branches, cycles, or topology — flowcharts, state machines, architecture graphs, ER diagrams — belongs in one; never ASCII-art a diagram or describe one in prose. The catalog'sFlow,Sequence, andTreecover only their strictly linear or hierarchical grammars; when the shape outgrows them, switch to mermaid rather than forcing the component.When the topic is logic, branching, or a mechanism (how a decision is made, how a state advances, how an algorithm chooses a path) — not pure topology alone — show both: the diagram and a short fenced pseudocode block. Stack them together; do not pick one the way
/vs-ship-itpicks a single Summary visual. Keep the short fenced pseudocode language-agnostic (not a real TypeScript/Python dump, not a prose walkthrough of the algorithm) and about ~12 lines so the compress bar stays honest. Pure structure or topology explainers may stay diagram-only.Litmus (auth flowcharts are both topology and logic; Create §6 alone would send every branch into mermaid): stack when the reader must predict the next step under a condition; diagram-only when they only need who/what connects. Do not turn every flowchart into three surfaces — the ship-it Summary pick-one firewall above stays: stack is both diagram and short pseudocode, not a third surface.
-
Compress the prose. The artifact is a review surface, not a transcript: keep the lede to two sentences, one idea per paragraph and at most three sentences each, and route anything enumerable — options, risks, scope, metrics, steps — through a component instead of paragraphs. A paragraph that packs three or more
**Label:**runs is not prose at all, it is a record with fields: put it inCatalogor another component. When the same labels repeat across many items, a section per item is the wall of text — oneCatalogholds twenty records the reader can scan, twenty###sections hold none. Sections carry budgets too: a problem statement in two to five short paragraphs that links background instead of restating it, one sentence per non-goal, one short paragraph per alternative and per risk, one or two sentences per open question — and remove a question once it is answered. After drafting, make one pass that challenges every sentence: cut restated context, hedges, and narration. When a section still runs past one short screen, link the detail or drop it. -
Populate components only from the sources. A metric, score, or status the sources do not contain is decoration, not evidence — leave a section lean rather than rounding it out with invented cards, filler grids, or secondary fact rows that restate the primary ones. Treat a gauge's maximum as a ceiling, not a target. Label the values that matter directly — on the point, the bar, the line end — and pair every color with a label or shape, so meaning never rides on color alone. A figure the artifact worked out rather than read — a percentage change, a total, a rate, a projection — carries the inputs it came from, because the reader cannot check arithmetic they cannot see and a wrong derived number is indistinguishable from a sourced one. Show both operands beside the result (
240 → 3,100, not a bare13× higher), keep the derived figure at or below the precision of its least precise input, and never derive across units, scopes, or time windows the sources kept apart. -
Remove every placeholder and unused section.
Proposal exhibits
A proposal reads like an engineering doc, not a pitch. Its first screen is three exhibits, in this order, with labels instead of paragraphs:
- Schematic hero. One inline SVG right under the hero band: the real
systems as boxes, the gate or rule as a diamond, and the flow between them
as wires. Draw the population the rule acts on as one mark per item,
colored by outcome, with counts beside each group. Dash the boxes that are
new code, so what exists today stays solid. Pin the open blocker on the
box it blocks. A subtle motion, such as dashes running along a wire, is
fine when it shows direction and stops under
prefers-reduced-motion. - The change. Two panes side by side. The left pane is the code change:
a file tree marked
+added and~changed, then the new surface (topics, routes, settings and their defaults). The right pane is the output for one real case, as adiffper file it writes. - Decide strip. One bordered row: the question reviewers must answer, what a yes commits to, and what a no keeps.
The skeleton sections below the first screen carry the detail: the example matrix, the alternatives, and the drawbacks. Never write a marketing headline or a lede that restates the diagram.
Engineers review a proposal that changes a rule or behavior by checking an example, not by trusting a claim. Build its Proposal section around one worked example:
- Example matrix first. One dominant table or grid: rows are the cases the rule decides, columns are the inputs and then the effective result. Every outcome the rule names gets a row, and each row carries a letter marker beside its color, defined once in a legend. This replaces a grid of equal rule cards.
- Real inputs, diffed output. Show the actual input files side by side,
then the effective result as a
diffagainst the default —-for what the proposal removes,+for what it adds. - Tradeoffs as small multiples. Run the same scenario under each option and show what runs and what is gone, with at most three terse verdicts per option. Mark the proposed option. Pros-and-cons paragraphs do not count.
- One color per meaning. One accent for the thesis outcome, green for added, red only for removed; unchanged stays neutral.
A variant switch (per host, per environment) or a highlight linking a matrix row to its source lines may sharpen the example, but the default view answers the review question without a click. Mark illustrative paths and outputs in the hero, not only in a footer. Avoid the looks that got proposals rejected: an oversized display heading, loose whitespace between disconnected boxes, metric tiles, and slogans in place of evidence.
Review comments
The rendered artifact supports human review without changing its canonical HTMDX source. Select text and choose Comment to write feedback, Remove to request its removal, or What? to request a clear, plain-language rewrite. The shortcuts record anchored requests; they do not mutate the source. Open Comments and choose Add comment to comment on an element. Mark comments resolved or reopen them from the panel; numbered markers return to their anchors.
Comments persist in localStorage, scoped to the artifact ID. Moving the same
artifact to another URL on the same origin keeps its comments; separate IDs
cannot share them. Legacy artifacts without an ID fall back to their URL
without its fragment. Comments do not travel with the HTML or sync to
another browser. Use a shared review system when feedback must be shared or
durable. This boundary is intentional: the artifact remains one portable
authored file while local feedback stays outside its source.
In browsers with document.modelContext, agents use the same local review
state through three WebMCP tools:
list_review_commentsreturns IDs, intents, statuses, and anchor summaries;add_review_commentanchors feedback to a CSS selector or unique text inside it;resolve_review_commentresolves or reopens a comment by ID.
Comments do not trigger an agent turn. After leaving feedback, the user must
send the agent a message asking it to read the comments; the agent then calls
list_review_comments and acts on the returned open items.
Treat remove and simplify intents as requested source changes: edit the
canonical HTMDX, render it again, and resolve the request only after the new
artifact reflects it. For simplify, apply
vs-write in Direct mode: lead with the main point, use
familiar words and short sentences, explain necessary terms, and preserve the
source's meaning, facts, and important details.
Interactive explanations
For a causal explanation or tradeoff the reader can learn by varying an input,
include one small <Prediction> experiment from the shared catalog. Choose two
to four meaningful setups; use its native controls to change the setup, predict
an outcome, then reveal the result and its reason. The component resets the
prediction and reveal when the setup changes. Use the same component for
/vs-eli5; do not build a second interaction framework.
Keep the core explanation and visual model readable before any click. Use
source-backed scenarios; label invented numbers and rules as an illustrative
simulation, never live measurements. Check a wrong prediction, a correct one,
and a setup change after reveal in the browser, including keyboard use.
Read all answers provides a direct reading path. The experiment works locally
inside MCP Apps and in the standalone HTML fallback, without WebMCP or new
network calls. Do not claim a click sends context to the chat agent.
Skip the experiment for a static fact, report, or proposal where changing an input adds no learning value. A plain prediction or recall prompt with nearby feedback is enough there. Keep this to one explanation, with no scores, persistence, learning records, or lesson navigation.
Authored WebMCP tools
Do not register a tool merely to read the artifact—the source and rendered page already carry that value. Register one when an authored interaction can shorten a real feedback loop: choosing X or Y, accepting a bounded proposal, or returning structured input the agent will act on.
Use the shell's generic window.vsArtifact.registerTool(tool) registry from an
authored <script data-vs-webmcp> after the generated review script. Build the
human control first, then connect its event and the WebMCP tool's execute to
the same handler. The handler must validate input, update the visible UI, and
return the recorded result; never create a second agent-only state path.
Initialize controls on htmdx:rendered because the source renders
asynchronously; registering the tool itself does not need to wait.
const choose = ({ choice }) => {
if (!['X', 'Y'].includes(choice)) throw new Error(`Unknown choice: ${choice}`);
renderChoice(choice); // The human buttons call this same handler.
return { choice, status: 'recorded' };
};
const registration = window.vsArtifact.registerTool({
name: 'choose_retry_policy',
description: 'Choose the retry policy shown in the artifact.',
inputSchema: {
type: 'object',
properties: { choice: { type: 'string', enum: ['X', 'Y'] } },
required: ['choice'],
additionalProperties: false,
},
execute: choose,
});
void registration.ready.catch(() => {}); // The human control still works.
The registry feature-detects document.modelContext and ties registration to
the artifact lifetime. Keep names stable and action-oriented. Do not use custom
artifact tools for secrets or destructive external actions; those still need
normal confirmation outside the artifact. Preserve any authored
script[data-vs-webmcp] when editing an existing artifact.
Do not add a polyfill or a second comment store: an agent-created review comment must appear in the human panel and persist by the same rules.
Expressive range
The catalog is the default voice, but the runtime gives an artifact more range when a section needs it:
- Compose the shadcn pack. The runtime ships its component pack already;
load the
componentstopic and combine primitives when they make a concept immediately recognizable. ACardcan frame one actor or state, aBadgecan label status, andProgress,Alert, orTooltipcan express a real value, warning, or aside. A shadcn scene combines at least two distinct primitives; raw HTML styled like cards does not exercise the component pack. Start from the relationship the reader must see, then place the components inside that composition: for example, one dominant active state can lead to smaller outcomes instead of four equal state cards. Compose one explanatory scene rather than sprinkling isolated widgets through the page. Do not add controls that imply behavior the artifact does not provide, and keep sequential reading in ordinary sections instead of hiding it behind interactive chrome. - Tailwind is live. Every artifact loads
@tailwindcss/browser@4, so any utility class works on theclassof components and allowlisted HTML — arbitrary values included (grid-cols-[240px_1fr],max-w-[52ch]). Reach for the theme's own hierarchy first; utilities are for the layout or emphasis the catalog does not cover. When a mock or SVG needs categorical color, use the theme's series tokens (var(--vs-series-1)…var(--vs-series-6)) in order rather than hand-picking hexes — they are the palette every chart on the page already speaks. Series text on a tinted ground takes the wash utilities (bg-blue-50,bg-red-50), whose alpha is calibrated to keep the matching accent above 4.5:1; a hand-mixedcolor-mix(in srgb, var(--vs-series-4) 24%, transparent)undercolor: var(--vs-series-4)lifts the ground toward the text and drops the label under AA no matter which accent it is. - Tooltips are declarative. Put
data-tip="text"on any allowlisted element for a hover-and-focus tooltip — addtabindex="0"so keyboard readers reach it too. It is for the aside a label has no room for (a definition, a source, an exact figure); content the reader must see stays in the visible body, never only in a tooltip. - Icons are inline lucide.
<i data-vs-icon="chart-line"></i>renders the named lucide icon at text size in the current color — in prose, headings, table cells, and mocks. Icons are decorative by default (hidden from screen readers), so keep the adjacent text self-sufficient. This is the sanctioned pictogram: an icon, never an emoji. - Mock UIs are markup. To explain a screen, a widget, or a layout idea,
build a one-off mock from allowlisted HTML (
div,section,figure,span) styled with Tailwind, directly in the body. No registration, no screenshot of a thing that does not exist — the mock lints, renders, and stays editable. When the mock depicts a real product, style it in that product's own colors, type, and chrome — the artifact theme is the report's voice, not the product's — and show one realistic state instead of an invented dashboard. Type is the one thing you must set yourself: a mock inherits Atkinson Hyperlegible Next, the report's own reading sans, so give it the product's face withstyle="font-family: …"or it reads as the report wearing a screenshot's layout. Promote a mock intoassets/definitions.mjsonly when a second artifact needs it. When the mock needs numbered callouts on named elements, wrap it in<Mock>with- markup: …and- #ref notepin rows (seenpx -y @wix/htmdx@4 skill components). - State screens use
<Machine>. When each lifecycle state has a screen the reader must see, prefer<Machine>(tap a state → that screen) over a mermaidstateDiagram. Keep mermaid for topology-only machines. Pair with<Prediction>when the reader should forecast the next state. - Annotated code uses
<Code>. For a slice with real line numbers, highlights, and a short note under a line, use<Code start hl>with trailing- @N noterows. Ordinary fenced blocks stay fine for unlabeled pseudocode. - Call trees use
<Tree>with@ path:line. Put the path in a trailing@ file:lineso it lands in its own column; mark counts appear in the header. Component names like<SendLaterMenu/>stay plain text. - Generated images embed. When a picture explains better than markup — an
illustration, a produced chart, a captured screenshot — generate it and embed
it with
or<img>: a file saved next to the artifact (relative path) or adata:image/...URI (png, jpeg, gif, webp, avif, svg+xml). Every image needs alt text. Keep embeds small — downsample screenshots and prefer webp or avif over png; a multi-megabyte data URI makes the one-file artifact sluggish to open, mail, and diff. Place each image with the claim it supports: a screenshot inFigurenext to the paragraph it proves, or a thumbnail row inside theCatalogrecord it belongs to. A separate section of screenshots forces the reader to hold twenty claims in their head and scroll back — if the images really are one set to compare, that isGallery, not a run ofFigureblocks under their own headings. - Draw with SVG. Author the SVG yourself for anything mermaid's grammars do
not cover — an annotated sketch, a custom glyph, a spatial layout. Inline
<svg>is not allowlisted and stays literal text, so embed the drawing as adata:image/svg+xmlimage or an.svgfile beside the artifact. Note that an SVG inside<img>cannot load external fonts — inline the shapes or accept the fallback face.
Edit
Treat the source block as the canonical document.
- Confirm the file contains exactly one
script[type="text/htmdx"]. A legacytemplate[type="text/htmdx"]artifact may be edited in place without migration. - Preserve the doctype, runtime pin, shell markup, review overlay,
vs-artifact-id, source container, and its attributes. If a legacy artifact has no ID, add a new UUID once before editing it. - Edit only the source block. The text inside the existing
<title>may also change when needed to keep the browser title accurate. - Preserve the artifact's current runtime and component contract. Do not silently upgrade an existing artifact.
- Hold new or rewritten content to the Create compression bar — challenge verbosity instead of matching the length of what is already there.
If an .html file has no HTMDX source block, it is ordinary HTML. Stop and say
that converting it requires a new HTMDX artifact rather than an in-place edit.
Verify
Before presenting the artifact:
- Read back the saved file and confirm it answers the review question without inventing facts, and that no placeholder survived.
- Lint the saved file at the version it pins. The linter reports every diagnostic in one pass with line and column, so it catches unknown components and props, invalid bodies, missing required props, disallowed HTML, and an unpinned runtime faster than reading for them:
npx -y @wix/htmdx@4 lint "$ARTIFACT_PATH" --strict --definitions ./assets/definitions.mjs
Exit 0 is clean, 1 means problems were found, and 2 means the check never
ran — do not read a 2 as a pass. Fix the first error and re-run; one
malformed body can mask the diagnostics after it, so a clean run is the only
evidence that the file is clean. The skill output explains the flags and each
diagnostic code.
A runtime-version-mismatch finding means the linted runtime and the pinned
major disagree, so the results describe a runtime the artifact does not load.
Change the npx version to match the pin rather than ignoring it.
- Check the prose against the Create budgets. The checker reads only the source block's paragraphs — components, code, and lists are exempt — and reports each overrun with its line number:
node assets/check-verbosity.mjs "$ARTIFACT_PATH"
Exit 0 is within budget, 1 lists overruns, 2 means it never ran. An
overrun is a prompt to compress or link, not a hard failure — when a long
paragraph is genuinely irreducible, say so in the handoff instead of padding
around the checker.
- Score the authored paragraph prose with
/vs-writereject-slop. The runner extracts the same source-block paragraphscheck-verbosity.mjsuses — frontmatter, headings, lists, tables, code, and component bodies are exempt — then execs../vs-write/scripts/reject-slop.mjs. This is the slop lock, not another length check.layout: vs-proposal/ assets/proposal.html is an HTMDX write, so the same runner covers proposal copy.
node scripts/run-write-slop.mjs "$ARTIFACT_PATH"
Exit 0 is clean. Exit 1 means rewrite the tells — do not handoff.
Exit 2 means it never ran; treat 2 as not checked, not a pass. Do
not claim READY_FOR_REVIEW if this runner did not run or exited 1.
Score the page pass with skills/vs-show-me/scripts/run-write-slop.mjs
(identity 76955fec80dace5a96afcc65d9c694ee044349c8646b62899496a53eb2061e08;
exit 1 is a fail). Exclusive is the live skills/vs-show-me/SKILL.md path
or a published skill-bytes pair. Exclusive cases live under
test/fixtures/write-slop.
- Render the saved file and confirm it compiled. An artifact is a thing the user looks at, so a structural check alone does not establish that it renders. Linting is not rendering either: it reads the source without loading the runtime, so it cannot see a CDN that never responds, a pin whose raw tags degrade to visible text, or a referenced screenshot that is not on disk.
node assets/render-check.mjs "$ARTIFACT_PATH"
The runtime replaces the document with its own diagnostic page on failure, so
Failed step: compile or Failed step: render in the output names the exact
component and reason. Fix and re-run until it passes; each pass reveals one
error, so expect to iterate rather than assume the first fix was the last.
Exit 2 means the check could not run, not that the artifact is fine. Fall back
to the host's browser tooling, or open the file:// path — no server is needed.
When nothing can render it, report structural validation as such and do not
claim rendered proof.
- Check the artifact's visual evidence. A report about something visible that shows none of it renders and lints perfectly, so nothing above catches it:
node ../vs-internal-shared/scripts/check-visual-evidence.mjs "$ARTIFACT_PATH"
Add --require-images when the subject is visual. See the
shared rich-artifact contract
for the embedding, capture, and path rules it enforces.
Handoff
Return:
Review question:the question the artifact helps answerSaved:a clickable absolute path to the.htmlURL:the rendered localhost or https URL when one is available; otherwise the openablefile://fallbackShot:the attached first-screen image, orShot failed: <reason>Source:the inputs usedVerified:structural checks and, separately, rendered browser proofStatus: READY_FOR_REVIEW
Do not echo the file body into chat. Do not commit unless the caller or user requested a commit.
First-screen shot
This skill owns capture. After the artifact is saved, the same user-facing reply must include an openable URL and an attached first-screen shot.
- When the host has a native browser panel, serve the artifact over localhost
with an available static preview server and open the resulting HTTP URL as a
Browser target. In Codex Desktop, pass the URL to
open_in_codexwith target typebrowser. Do not open the HTML as a file/editor tab; that shows its source instead of the rendered UI. - Keep the preview server alive for the user's review, then stop it when the
review interaction ends. If the browser panel or a localhost preview is
unavailable, say why and fall back to the openable
file://URL; do not skip presentation silently. - Render the first screen and screenshot above the fold.
- Attach that image in the same reply as the URL.
If the shot fails: still send the URL. Say Shot failed: plus the reason.
Do not block the handoff. Callers inherit this section; they do not restate
it. Score handoffs with skills/vs-show-me/scripts/reject-htmdx-handoff.mjs
(identity 785c48021f874e6ec5b61cbdd4919886a2c003c1ad14d12426c9f1080ca0a217;
exit 1 is a fail). Exclusive cases live under test/fixtures/handoff.
Shot: is a real image path, or Shot failed: <reason>. Shot: n/a is not a shot.
MCP Apps host (progressive enhancement)
When the host supports MCP Apps, present the saved HTMDX artifact as App UI
after it is on disk. When it does not, keep the portable .html + URL +
first-screen shot + TLDR path. Load and follow:
../vs-internal-shared/references/mcp-apps-host.md
Branch:
- App-capable host → after save/verify, present via MCP App using
ui://vs/show-me(text/html;profile=mcp-app), with critical payload incontent/structuredContentand_meta.ui.resourceUri(optionalopenai/outputTemplatealias). Shape helper:node scripts/mcp-app-resource-shape.mjs --skill show-me --html "$ARTIFACT_PATH". Callmcp__vs_artifact__vs_show_me(or the host'svs.show-meequivalent) with the saved artifact path when available. If the call is unavailable or fails, use the file, URL, and shot handoff below. - Non-App host (e.g. Grok Bot) → mandatory fallback: existing HTMDX file + URL + first-screen shot + TLDR. Do not skip the fallback because an App path exists in the reference.
If CDN-pinned HTMDX cannot load in an App iframe, keep the file fallback; do not introduce a bundler here. OpenAI sidebar/file/composer entrypoints are out of scope.
Flow Contract
- Kind: Building block
- Inputs: source material or an existing HTMDX artifact
- Outputs: one portable
.htmlartifact - Status:
READY_FOR_REVIEW | BLOCKED - Consumers: direct human invocation and workflows that need a rich deliverable
- Skip conditions: Markdown or a native visualization answers the question more directly
Output style
Apply the shared output style to every user-facing message.
Workflow
Direct: emit Next only. Composed: return to caller.
Prev: research, analysis, or supplied source material
Next: done
Relevant: /vs-eli5
04 同仓库更多 Skills
vs-write
Use when asked to write, rewrite, edit, tighten, simplify, or polish prose for clarity, or to put text in STE, ASD-STE100, or controlled language. Produces plain, direct, accessible copy without losing substance or precision.
vs-fake-verify
暂无简介
vs-fake-verify
暂无简介
vs-verify
Use when asked to verify, prove it works, check completion, or before claiming done. Produces evidence-backed PASS/WARN/FAIL status.
vs-fake-verify
暂无简介
vs-verify
Use when asked to verify, prove it works, check completion, or before claiming done. Produces evidence-backed PASS/WARN/FAIL status.