/uxd-prototype:uxd-prototype-exportfrom uxd-prototype
Captures prototype screens as static HTML, React component trees, or PatternFly implementation specs. Installs the Prototype Bar for ad-hoc captures and batch-exports journey screens from journey/state files.
Ships in uxd-prototype. 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.
Captures prototype screens as portable artifacts — from the running app (Prototype Bar) or in batch from journey + scenario files. Also installs the Prototype Bar (Sources, Prototype|Eval, State, Export).
Family: uxd-prototype-create writes journeys.json / states.json / prototype-bar.json; this skill captures them; uxd-prototype-evaluate reports can be opened from the bar; uxd-prototype-publish copies evals into static Pages.
| Input | Required | Source |
|---|---|---|
| What to export (current page, journey batch, or install bar) | Yes | User; skill asks if omitted |
Live prototype URL (--base-url) | Yes for capture | Running app |
journeys.json + states.json | Yes for batch | artifacts/{ID}/ from create |
Prototype source path (--source) | Yes for --install-bar | Standalone dir or workspace root |
If the user says "export" without details, stop and ask which path (below).
Under .artifacts/{ID}/exports/ unless --out is set:
| Output | Description |
|---|---|
index.html + export-manifest.json | Gallery and manifest |
{journeyId}/{stepId}--{scenarioId}.html | Static HTML snapshot (inlined CSS; not a live React app) |
*.tree.json / *.tree.txt | Component tree (when tree format) |
*.pf-spec.json / *.pf-spec.txt + implementation-spec.json | PF implementation spec (when pf-spec) |
current/page-{timestamp}.* | Ad-hoc / bar captures |
Formats: references/export-formats.md. Point implementation agents at implementation-spec.json (or per-capture .pf-spec.json).
Node.js 18+ (CLI and optional helper). Playwright for journey/batch export:
cd "${CLAUDE_SKILL_DIR}" && npm install
$ARGUMENTS
Parse as: [--install-bar] [--base-url <url>] [--journeys <path>] [--formats html,tree,pf-spec] …
| Flag | Values | Default | Description |
|---|---|---|---|
--install-bar | flag | off | Install Prototype Bar |
--config | path | auto-detect | prototype-bar.json (with --install-bar) |
--base-url | URL | — | Live prototype URL for Playwright |
--journeys | path | .artifacts/{ID}/journeys.json | Journey definitions |
--scenarios | path | sibling states.json | Page state catalog |
--out | path | .artifacts/{ID}/exports | Output directory |
--formats | html, tree, pf-spec | html | Export formats |
--source | path | — | Prototype dir or workspace root (install bar) |
--mode | standalone, workspace | auto-detect | Install target type |
What should I export?
- Current page — capture whatever is on screen (use the Prototype Bar, or give me a URL)
- Journey steps × states — batch-export from
artifacts/{ID}/journeys.json+states.json- Install Prototype Bar — add the sticky bar (Sources, Eval, State, Export)
A. Install Prototype Bar
With --artifacts, this syncs prototype-bar.json, installs bar assets, and copies the eval report for Pages when present.
bash "${CLAUDE_SKILL_DIR}/scripts/install-prototype-bar.sh" \
--artifacts ".artifacts/{ID}" \
--source "<prototype-or-workspace-path>" \
[--mode standalone|workspace]
Assets-only (no config sync): omit --artifacts and pass --config if you already have prototype-bar.json. Schema: references/prototype-bar-config.md. Scenario runtime (?state=<id>) is uxd-scenario-runtime.js.
If workspace/React auto-mount fails, copy templates/PrototypeBar.tsx + CSS and mount <PrototypeBar /> in the app shell. Mock branching: create skill references/state-mocks.md.
B. Export current URL
bash "${CLAUDE_SKILL_DIR}/scripts/export-current.sh" \
--url "http://localhost:3000/some-route?state=empty" \
--out ".artifacts/{ID}/exports" \
[--formats html,tree,pf-spec]
C. Batch-export journey steps × scenarios
Requires journeys-schema.md and optionally states-schema.md. For each export: true step, captures every scenario for that route (?state=<id>, then step actions).
node "${CLAUDE_SKILL_DIR}/scripts/export-journey.mjs" \
--base-url "http://localhost:3000" \
--journeys "artifacts/{ID}/journeys.json" \
--scenarios "artifacts/{ID}/states.json" \
--out "artifacts/{ID}/exports" \
--formats html,pf-spec
D. Optional export helper (artifact writes + local Eval)
node "${CLAUDE_SKILL_DIR}/scripts/export-helper.mjs" \
--out ".artifacts/{ID}/exports"
Listens on 127.0.0.1:9417. Bar POSTs captures here when healthy; otherwise the browser downloads (including on Pages). GET /evals/{ID}/ serves .artifacts/{ID}/eval/evaluation-report.html.
E. Sync bar config for static Pages
node "${CLAUDE_SKILL_DIR}/scripts/sync-prototype-bar-config.mjs" \
--artifacts ".artifacts/{ID}"
bash "${CLAUDE_SKILL_DIR}/scripts/copy-eval-for-pages.sh" \
--artifacts ".artifacts/{ID}" \
--pages-root public
Sync merges Sources and flattens states.json into prototype-bar.json. copy-eval-for-pages copies the report to public/evals/{ID}/index.html and sets views.eval to /evals/{ID}/.
Report paths to the user. Static HTML is a visual snapshot — it does not rehydrate React. Point implementation agents at implementation-spec.json.
| Zone | Controls |
|---|---|
| Left | Brand + Sources (outcome / RFE / Figma / description) |
| Center | Prototype | Eval + State ▾ (enabled when ≥2 scenarios match the route) |
| Right | Export (Static HTML | Component tree | PF spec) + status |
Eval resolution: helper /evals/{id}/ when healthy → else views.eval under <base href> then site root → else disabled. State switching sets ?state=<id> and reloads; pages read window.UxdScenario.get().
Shared capture: scripts/serialize-page.js and templates/serialize-page.browser.js.
public/evals/{ID}/ — the Export menu is client-side capture, not those pre-baked files.| Doc | When to load |
|---|---|
| export-formats.md | Format details |
| journeys-schema.md | journeys.json |
| states-schema.md | states.json |
| prototype-bar-config.md | Bar config schema |
README.md (opens in a new tab)eval/cases/asks-export-path/annotations.yaml (opens in a new tab)eval/cases/asks-export-path/input.yaml (opens in a new tab)eval/cases/batch-export/annotations.yaml (opens in a new tab)eval/cases/batch-export/input.yaml (opens in a new tab)eval/cases/current-page-capture/annotations.yaml (opens in a new tab)eval/cases/current-page-capture/input.yaml (opens in a new tab)eval/cases/install-bar-pages/annotations.yaml (opens in a new tab)eval/cases/install-bar-pages/input.yaml (opens in a new tab)eval/eval.yaml (opens in a new tab)package-lock.json (opens in a new tab)package.json (opens in a new tab)references/export-formats.md (opens in a new tab)references/journeys-schema.md (opens in a new tab)references/prototype-bar-config.md (opens in a new tab)references/states-schema.md (opens in a new tab)scripts/copy-eval-for-pages.sh (opens in a new tab)scripts/export-component-tree.js (opens in a new tab)scripts/export-current.sh (opens in a new tab)scripts/export-helper.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
prototype-export, patternfly, component-tree, static-html, prototype-bar
npx claudepluginhub rh-uxd/ai-helpers --plugin uxd-prototype4 skills in this plugin
/uxd-prototype-createCreate or refine a UX prototype from a Jira ticket, Figma design, feature description, or rough idea. Enumerates user journeys and page states (empty/error/alternate conditions), wires mock data via ?state=, writes a design spec for QE test-plan ingest, and supports export of each step × state. Use when starting a new prototype, integrating into an existing codebase, generating standalone HTML, or applying evaluation feedback./uxd-prototype-evaluateEvaluate a running prototype against a Jira ticket's acceptance criteria, automatically fix what fails, then run persona-based usability walkthroughs. Produces an HTML evidence report with screenshots, scores, and findings. Use when you want to validate a prototype, check usability, or generate evidence for an MR review./uxd-prototype-publishOther plugins' skills for the same job