uiux-react-jsx-packager

uiux-react-jsx-packager is a skill for Claude Code, Codex from okwinds/miscellany. It costs 125 tokens per session (2,346 once invoked), scanned A, original, MIT.

A way to package an existing React interface into one self-contained JSX file. JSX is the HTML-like syntax commonly used to describe React user interfaces.

In plain words
What is it for?
Use it to package a React UI demo, preserve its interactions and navigation, replace external icon or chart dependencies, and include styles and image placeholders inside the output file.
Why use it?
It makes a demo easier to move or share by keeping the interface, styles, icons, images, and navigation in one file with only React required at runtime.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/okwinds/miscellany/uiux-react-jsx-packager
Any agent
npx skills add okwinds/miscellany --skill uiux-react-jsx-packager
Clone the repo
git clone --depth 1 https://github.com/okwinds/miscellany

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uiux-react-jsx-packager

README.md
[![agentmods](https://agentmods.dev/badge/skills/okwinds/miscellany/uiux-react-jsx-packager.svg)](https://agentmods.dev/skills/okwinds/miscellany/uiux-react-jsx-packager)
Your own site
<a href="https://agentmods.dev/skills/okwinds/miscellany/uiux-react-jsx-packager"><img src="https://agentmods.dev/badge/skills/okwinds/miscellany/uiux-react-jsx-packager.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,346 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00125 $0.02346
Opus 5 $0.00063 $0.01173
Sonnet 5 $0.00025 $0.00469
Haiku 4.5 $0.00013 $0.00235

Measured 5d ago against content hash 88df866b502f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

uiux-react-jsx-packager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/preview_single_jsx_vite.sh, scripts/verify_singlefile_jsx.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent/skills/uiux-react-jsx-packager/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

uiux-react-jsx-packager

Output Contract

  • Create one new *.jsx file (do not overwrite existing files unless explicitly requested).
  • Export the root component via export default.
  • Keep runtime dependencies to React only (no react-router, lucide-react, echarts, classnames, zustand, etc.).
  • Keep styles in-file via <style> injection and/or inline style={{...}}.
  • Replace icon libraries with inline SVG components.
  • Replace images with base64-inlined data URLs or deterministic placeholders.
  • Implement navigation via component state (optionally sync to location.hash for shareable URLs).
  • Preserve all interactions/animations/state logic; do not simplify behavior.
  • Prefer embedding the compiled CSS (if available) to preserve spacing/colors/shadows.

关于“像素级一致”(可选增强,不是默认门禁)

“像素级一致 / pixel-perfect”在工程上必须限定条件,否则不可验证。只有当你要对外宣称 pixel-perfect 时,才需要做像素 diff 验收:

  • 同一台机器、同一 OS 与同一浏览器版本(建议固定 Chrome 版本)
  • 固定 viewport(宽高)与 deviceScaleFactor(DPR)
  • 字体必须一致(包含字重):不要依赖系统字体差异;必要时把字体文件以 @font-face 形式内联进 CSS(base64 data URL)
  • 截图对比时必须处于“稳定态”:避免进行中动画/过渡影响像素 diff(见 Verification)

默认交付的强门禁是“可携带可跑、不白屏、导航可用”(见 Verification Gate)。

Workflow (do in order)

1) Discover structure and runtime surface

  • Find and follow any AGENTS.md instructions that apply to the target directory tree.
  • Locate the actual app entry (src/main.*, src/index.*, App.*) and identify:
    • Router entrypoints (hash router / react-router / custom)
    • Pages and module switch logic
    • Global providers (theme/style/toast/auth)
    • Global CSS + theme tokens (CSS variables, dark mode attribute, etc.)
    • Third-party runtime deps that must be removed (icons, charts, router, utilities)
  • Prefer reading the demo source plus the built output CSS (if it exists) to lock visuals.

2) Choose a “visual parity” strategy for styles (pick one)

  • Preferred: Embed production/built CSS (e.g. dist/assets/index-*.css) into const APP_CSS = String.raw\...`;and inject via`.
    • Keep existing className strings unchanged.
    • This is the most reliable way to keep spacing/colors/shadows identical without Tailwind tooling.
  • Otherwise: Inline/merge source CSS files into one <style> block (still in-file).

Read the full file on GitHub · 185 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 185 lines · 125 tokens per session scan A 88df866b502f

Subscribe to this mod's changes

uiux-react-jsx-packager is a skill published in the GitHub repository okwinds/miscellany (50 stars, last pushed 3mo ago), licensed MIT. It adds 125 tokens to every session and 2,346 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

v8-jit

V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals. Use when writing or reviewing hot-path code in app-render, stream-utils, routing, caching, or any per-request code path. Covers hidden classes / shapes, monomorphic call sites, inline caches, megamorphic deopt, closure…

vercel/next.js · 88 tokens

react-patterns

React 18/19 patterns including hooks discipline, server/client component boundaries, Suspense + error boundaries, form actions, data fetching, state management decision trees, and accessibility-first composition. Use when writing or reviewing React components.

affaan-m/ECC · 49 tokens

e2e-write-visual-test

Use when writing a Playwright visual regression (screenshot comparison) test, tagging a test @visual, generating or updating baseline screenshots, running visual tests locally, or debugging a failing screenshot comparison in CI.

payloadcms/payload · 50 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

verify

Use when you want to validate changes before committing, or when you need to check all React contribution requirements.

react/react · 23 tokens