by diip3sh
Take a real UI component apart. A Claude Code skill + runtime that explodes a live component into paint layers, states and tokens. Nothing is redrawn, no number is typed.
# Add to your Claude Code skills
git clone https://github.com/diip3sh/explodedSee how exploded compares with popular alternatives.
exploded is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by diip3sh. Take a real UI component apart. A Claude Code skill + runtime that explodes a live component into paint layers, states and tokens. Nothing is redrawn, no number is typed. It has 50 GitHub stars.
exploded's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/diip3sh/exploded" and add it to your Claude Code skills directory (see the Installation section above). exploded ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
exploded is primarily written in JavaScript. It is open-source under diip3sh on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh exploded against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
This skill makes figures that take a real component apart. It floats over a cutting mat as a stack of glass sheets. Each sheet carries one kind of paint: the shadow it casts, its fill, its stroke, the chips and thumbs inside it, its text and icons, and its focus ring. Hover the figure and the stack opens. Hover a sheet and its measurements are printed on it in redline. Press 1–5 and the component changes state, and the sheets change with it. The real component sits beside the figure, live, and hovering or focusing it drives the figure.
One complete example ships with the skill: examples/gallery/index.html, which has four figures (a primary button with an icon and a shortcut chip, an email field, a switch and a review card). Open it before you start. Serve the folder (python3 -m http.server) or open the file directly.
Nothing is redrawn, and no number is typed. Every sheet is the real component, cloned with the browser's own computed styles, with every paint that belongs to another sheet made transparent. Every number on a sheet or in the readout comes from getComputedStyle, layout boxes and text ranges. Every token name comes from the CSS rule the author actually wrote.
A spec sheet fails in two ways:
The runtime avoids both by construction. Your job is to give it the real component in its real states, name what it finds, and prove the result.
If a number is wrong in the figure, the figure is not the problem: the component, the state or the harness is. Never patch the figure, and never edit the component to make the figure look better. Fix the harness or report what you found.
disabled, checked, variant), data attributes (data-state="open"), ARIA (aria-invalid, aria-checked) and pseudo-classes (:hover, :focus-visible, :active, :focus-within). Don't invent states it doesn't have, and don't skip states it does have.specimenWidth), when it is fluid.<Exploded> around the real component. See references/react.md.references/harness.md.document.fonts.ready). The wrapper waits for you.figure.model() (or read the margin) and look at the stack the runtime found: layer names, and a summary of each layer in each state. Then name things:
parts: { ".btn-kbd": "Shortcut chip", ".thumb": "Thumb" }, or data-xp-name="Thumb" on the element.splitStroke: "root" (default: the outer stroke gets its own sheet), "all" (every stroke gets its own sheet, for inputs and outlined components) or "none".data-xp-ignore."pressable" and "field" force CSS pseudo-classes. "pointer" also fires real pointer and mouse events, for components whose hover and press come from their own handlers (React state, motion, springs) rather than CSS :hover. Each state is any mix of pseudo (forced without a pointer), attrs (set on the state target, or on on: "selector") and apply(root, target) (any setup, returning an undo function). Every state is captured once it has settled: nothing that paints has changed for two frames (budget settle, 3000 ms). Never type a state's values by hand: drive the component and let it paint. Check in model() that every state really differs from rest: a state that reads the same as rest means the selector didn't apply (see Limits).fig number, a short title ("Button · primary"), and a theme that matches the host page. The hint, readout and margin keys are written for you.node scripts/audit.mjs <page> --out shots. It finds Chrome, Chromium, Edge, Brave or Aside (set CHROME_PATH for anything else). It must end with passed: every figure's audit passed, every state's pixels match the live component, and no page errors. Read every ⚠ line: they mark what the sheets can't show exactly (see Limits). Then read every PNG it writes, apart and together, and check the list in references/verify.md. Fix and repeat until there's nothing left to fix.const figure = await Exploded.mount(hostElement, { // resolves once every state is captured
target, // the live component's root element (required)
title: "Button · primary",
fig: 1,
states: "pressable", // "pressable" | "pointer" | "field" | [{ id, label, pseudo?, attrs?, on?, apply? }]
stateTarget: "input", // selector inside target that takes the states (default: target)
parts: { ".thumb": "Thumb" },
splitStroke: "root", // "root" | "all" | "none"
theme: "light", // "light" | "dark"
specimenWidth: 320, // width of the live slot, for fluid components
azimuth: -38, tilt: 56, // camera: turn and look-down angle in degrees
stack: 0.42, // share of the card's height the open stack may use
maxGap: 84, maxScale: 5,
tokens: true, // set false to skip token tracing on very large pages
settle: 3000, // ms each state may take to settle before it's captured
});
figure.setState(2); figure.apart(true); figure.setActive(1); figure.tokens(true); figure.turn(-50, 60);
figure.model(); // [{ state, w, h, settled, layers: [{ key, name, summary }] }]
figure.audit(); // { ok, checked, problems }
figure.pose(i); // puts the live component in state i; resolves to an async undo (used by the audit)
figure.composite(i); // state i's sheets stacked flat at zoom 1 (used by the audit's pixel check)
figure.destroy(); // puts the component back where it was
Keyboard on a focused figure: 1–9 states, E apart or together, ↑ ↓ select a layer (↑ starts at the bottom and climbs), ← → turn, T tokens or pixels, Esc reset. Drag turns it. Hover opens it.
The runtime finds the stack itself. Know the rules so you can explain what you see:
parts at the top level gets its own sheet (a button's base and its cap); deeper named parts share their depth's sheet.splitStroke: "all"), and edges: spread-only shadows that are already there at rest (an outline drawn with box-shadow: 0 0 0 1px).::before and ::after becomes a real element, so it lands on the right sheet too.shifted -1, 11, or z 8 in 3D), so a press that only moves something still reads.--xp-lit), and only on the active sheet.state · layer · values from the model, and in T mode it reads the tokens the author wrote.--xp-sans on the host's font.Say these to the user when they apply. Don't work around them silently.
:hover/:focus rules can't be forced, and their tokens can't be traced. Serve the CSS from the same origin, or use attrs and apply states.⚠ never settled.preserve-3d) keep their 3D inside each sheet, but sheets are stacked by kind of paint, not depth, so a deep edge can paint over a face that sits above it. The closed figure is exact; the audit marks the sheets ⚠ 3D.padding: 0 calc(var(--spacing) * 2.5) 0 …) it reports the first token. Pixel values are always exact.!important author rules can beat the frozen clone's inline styles. If the audit passes but a sheet looks wrong, look for them.| File | Use it for |
|---|---|
runtime/exploded.js |
The whole runtime as one classic script: capture, layer planning, painting, the 3D stage, motion, input and the audit. Exposes window.Exploded. |
runtime/exploded.css |
The figure's styles and both themes. Tokens are --xp-*. |
runtime/react/Exploded.tsx |
The React/Next.js wrapper. It waits for fonts, mounts on the child, and puts the child back on unmount. |
scripts/audit.mjs |
Headless Chrome with no dependencies: the stack per state, the audit, and PNGs apart and together. |
examples/gallery/ |
Four figures: button, field, switch and card. |
references/harness.md |
Getting a component onto a page the runtime can read: Next.js, Storybook, Vite, plain HTML. |
references/react.md |
The wrapper, server/client boundaries and re-mounting. |
references/verify.md |
The review checklist and the faults to look for. |
Take a real UI component apart. A skill for Claude Code, plus the runtime it uses.
Name a component and Claude renders it, then pulls it apart in isometric into its paint layers: elevation, surface, stroke, inner surfaces, content and focus ring. You can switch its states and read every measurement and design token right off the layers.
Nothing is redrawn, and no number is typed.
getComputedStyle, layout boxes and text ranges.So the spec sheet can't drift from what ships.
:hover/:focus/:active are forced by rewriting CSS rules, so no pointer is needed. The stack combines every state, so the focus ring layer waits, dashed and empty, at rest.T and every value becomes the token the author wrote: --radius-md, --spacing × 2.5. Hard-coded values stay raw, so drift is obvious.npx skills add diip3sh/exploded
It works with Claude Code, Cursor, Codex and any other agent that reads skills. Or clone it yourself:
git clone https://github.com/diip3sh/exploded ~/.claude/skills/exploded
Restart your agent, then:
/exploded document our Button, all states, for the Next.js docs
/exploded spec sheet for the email field and the switch, dark theme
You don't need the command. Claude uses the skill on its own for component docs, spec sheets, redlines and anatomy diagrams. SKILL.md has the whole workflow.
<link rel="stylesheet" href="runtime/exploded.css">
<script src="runtime/exploded.js"></script>
<script>
document.fonts.ready.then(() =>
Exploded.mount(document.querySelector("#fig"), {
target: document.querySelector(".btn"),
title: "Button · primary",
states: "pressable", // or "field", or your own
parts: { ".btn-kbd": "Shortcut chip" },
theme: "dark",
}));
</script>
React / Next.js:
import { Exploded } from "@/components/exploded/react/Exploded";
<Exploded fig={1} title="Button · primary" states="pressable">
<Button>Deploy</Button>
</Exploded>
Keys: 1–9 states · E apart · ↑ ↓ layers · ← → turn · T tokens · Esc reset. Hover opens it and dragging turns it.
node scripts/audit.mjs examples/gallery/index.html --out shots
This runs headless Chrome with no dependencies. It prints the layers for each state, runs the audit, and saves PNGs of each figure apart and together. Set CHROME_PATH if Chrome isn't in a standard place.
python3 -m http.server 8731
open http://127.0.0.1:8731/
apply state for now.Inspired by Anatomy by Ryan. Same rule: the thing itself is the explanation.
MIT © diip3sh