/prometheus-skill-pack:convert-htmx-reactfrom prometheus-skill-pack
Convert an HTMX + Alpine.js HTML artifact into a React TSX component ready for the scaffold-react-vite pipeline. Mechanical transforms run via a Node script; HTMX/Alpine constructs requiring judgment are surfaced as a sidecar markdown for review.
Ships in prometheus-skill-pack. 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.
None: SKILL.md is the whole skill.
Convert an HTMX + Alpine.js HTML artifact into a React TSX component.
artifact_type: html (input) → react (output)content_type: direct:reactreferences/domain/ui.mdThe user will provide: $ARGUMENTS
Parse the arguments for:
--source <path-to-html> (required)--feature-name <kebab-name> (required) — used to name the component (PascalCase) and the hook--output <path-to-tsx> (required)--ambiguous-sidecar <path> (optional; default <output>.ambiguous.md)Dispatch to the orchestration script:
node scripts/convert-htmx-react.mjs \
--source "${SOURCE}" \
--feature-name "${FEATURE}" \
--output "${OUTPUT}"
The script:
parse5 (spec-conformant HTML5 parsing).class → className, for → htmlForstyle="a: b" → style={{ a: "b" }}data-*, aria-*, role, id, src, href, etc. pass through unchangedx-data="{ count: 0 }" into a named hook use<Feature>State exporting useState declarations.@click="count++" → onClick={() => setCount((v) => v + 1)}@click="x = expr" → onClick={() => setX(expr)}x-text="count" → {count} JSX childhx-* behaviors (hx-get, hx-post, hx-target, hx-swap)x-show, x-model, x-if (non-trivial Alpine constructs)The sidecar <output>.ambiguous.md lists each region the script couldn't auto-convert with confidence. For each region:
Review each region, accept the recommendation or propose an alternative, and apply the change manually before feeding the TSX into the scaffolder. The script's job is to do 90% mechanical work and document the remaining 10% clearly — not to guess.
When the source HTMX contains Alpine x-data="{ ... }", the converter lifts
the state to React. The threshold determines the shape of the React state:
| Alpine x-data shape | React shape |
|---|---|
Single boolean field ({ open: false }, { active: true }) | Local useState hook |
Multi-field ({ count: 0, label: "idle" }) | zustand+immer store + hook adapter |
Single non-boolean field ({ count: 0 }) | zustand+immer store + hook adapter |
Rationale: per references/scaffolds/state-architecture.md, ephemeral
single-component state (e.g., dropdown open/closed) belongs in local useState;
anything that might be shared, persisted, or grow beyond a toggle belongs in
a store. The threshold catches counts, labels, and arrays at conversion time so
the scaffolder's useXxxStore routing picks them up correctly.
.html fragment or document..tsx file with a default-exported component named <PascalFeature> and (if Alpine state was present) a named hook use<PascalFeature>State.artifact_type: react
content_type: direct:react
outputs:
- path: <output>.tsx
description: Scaffolder-ready TSX with default component + optional named hook
- path: <output>.ambiguous.md
description: (only when ambiguous regions found) review-required transforms
constraints_satisfied:
- mechanical_transforms_complete
- alpine_state_lifted_to_useState
- htmx_behaviors_documented_for_review
- scaffolder_input_shape_matched
Typical flow:
HTMX artifact → convert-htmx-react → TSX → scaffold-react-vite → built Vite project
↓
(optionally) → rebrand-artifact for brand swap
scripts/convert-htmx-react.mjs — the orchestration scriptopenspec/changes/phase-3-conversion-layer/ — design rationaleWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub prometheus-ags/prometheus-skill-system --plugin prometheus-skill-pack218 skills in this plugin
/actor-modelTokio-native actor model pattern for Prometheus AGS projects. Implements actors as tokio tasks communicating via mpsc channels with a typed message enum, enabling safe concurrent state management without shared locks. Used in UAR session management, pk-librarian event broadcasting, and parking-lot scheduler design. Use when a component needs to own state exclusively while serving concurrent callers.
/adversarial-reviewIsolated, cross-model adversarial review of KBD artifacts and change diffs. Dispatches a fresh-context LLM judge over an OpenAI-compatible REST gateway (openai-proxy or `liter-llm api`) with an explicit mandate to find problems — the model that produced an artifact or change is never the model that reviews it. Runs as a pipeline stage inside kbd-assess/analyze/plan (artifact mode) and kbd-execute's single phase-boundary QA step (diff mode, once over the whole phase diff). Findings are severity-bucketed (CRITICAL/WARNING/SUGGESTION) and the judge's own report is screened by sycophancy-correction before it is surfaced.
/agent-team-creatorCreate, revise, package, and deploy agent-team definitions with staged questions and native exports for UAR, Codex, Claude Code, Copilot, Kimi Code, MiniMax CLI, OpenCode and DeepSeek. Use for team definition and catalog lifecycle; use agent-team-manage for active runtime task state.Other plugins' skills for the same job
2 plugins ship this exact skill · first indexed Jul 16, 2026