craft
Skill11 starsChanged 7 days agoMITView on GitHub
Craft rules for building interfaces with @bydiorama/ui. Use when building or reviewing UI components, animations, hover states, shadows, radii, icons, or micro-interactions in a project that consumes the Diorama design system. Triggers on UI polish, "feels off", border radius, shadows, press feedback, enter/exit animations, icon states, motion review.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- Rtx09x/agentic-skillstheir own version, first seen Nov 29, 2026
- didiansyah/skillstheir own version, first seen Nov 22, 2026
- diego3g/crafttheir own version, first seen Nov 16, 2026
- Mrbaeksang/skillstheir own version, first seen Nov 16, 2026
- abhimanyusingh-gh/software-craftsmanshiptheir own version, first seen Nov 1, 2026
- devsolux/storytoldtheir own version, first seen Oct 20, 2026
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- diego3g/craft★ 523same name
- educlopez/ui-craft★ 490same name
- wormholeportal/Makone★ 27same name
- alexiolan/craft-skills★ 17same name
- devsolux/storytold★ 17same name
- abhimanyusingh-gh/Arkon★ 5same name
- abhimanyusingh-gh/software-craftsmanship★ 5same name
- pavelkorolevxyz/craft★ 4same name
- michaelengland/deckwright★ 2same name
- Mrbaeksang/skills★ 2same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-componentSkill
- app-motionSkill
- create-skillSkill
- demo-pageSkill
- design-componentSkill
- effectsSkill
- motion-componentSkill
- motion-mediaSkill
- review-uiSkill
- static-renderingSkill
- stills-renderSkill
- video-renderSkill
- visual-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 115
If it looks clickable, all of it is clickable: No dead zones — a checkbox and its label are one target.
- Distinctive: line 142
Never signal a state with a partial edge: No left bar, no bottom rule, no inset stripe — not for hover, not for current, not for …
- Distinctive: line 155
Two states that must differ need two values: If hover and current would paint the same fill, the answer is a missing token, not a marker …
- Distinctive: line 173
Contrast fixes move lightness: When a pair fails, adjust L and keep chroma and hue — that keeps the colour recognisably itself.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diorama UI craft
The small details that make interfaces built with @bydiorama/ui feel
finished. These rules complement — never override — the system's binding
conventions (CONVENTIONS.md in bydiorama/ui) and its semantic tokens:
when a rule below names a value, use the token that carries it, not the number.
Adapted for the Diorama design system from "skills" by Jakub Krehel (github.com/jakubkrehel/skills) — © 2026 Jakub Krehel, MIT. The full licence and permission notice are at the end of this file: MIT requires both to travel with substantial portions, and a pointer to another repository's CREDITS.md travels nowhere.
This skill was called ui-craft (installed as diorama-ui-craft) until
ADR 0027. Comments in the library still cite its rules as "ui-craft rule N":
the numbers are the same.
Review method
Slow the interface down: replay motion at 10% speed in the browser's Animations panel and walk every state — hover, focus, active, loading, empty. What feels off at 10% speed is what is subtly wrong at full speed.
Rules
Radii
- Concentric border radius. Nested rounded elements share a centre:
outerRadius = innerRadius + padding. Equal radii on a card and the button inside it is the single most common thing that makes a layout feel off. Derive from the--ui-radius-*scale; never invent a radius. - A large radius insets its bare text. Inside a panel at
--ui-radius-2xl, unboxed content — a title, a field label, a row of footer buttons — steps in by--ui-space-smbeyond the panel's own padding, because text sitting flush crowds the corner arc. Boxed children (an info well, an input, anything with its own fill or border) stay flush: their edge already reads as an edge. Getting this backwards is what makes a generously-rounded card feel cramped at the corners and loose in the middle.Popover.TitleandPopover.Descriptioncarry the inset for you. - Optical over geometric alignment. Icons in buttons, play triangles and asymmetric glyphs need manual nudging when geometric centring looks wrong. Trust your eye, then encode the nudge in the component, not the call site.
Elevation
- Shadows for elevation, borders for structure. A border whose only job is
depth should be a layered translucent shadow (
--ui-shadow-*). Keep borders that communicate structure or state: dividers, separators, selection, focus. - Image outlines. Give images a 1px translucent outline so they hold their edge on any surface — pure black in light scheme, pure white in dark, never a tinted neutral (a tinted outline picks up the surface underneath and reads as dirt on the image edge).
Motion
- Transitions for interaction, keyframes for one-shots. CSS transitions retarget mid-flight, so a toggle reversed halfway reverses smoothly; keyframes restart and feel broken. Keyframes are for staged sequences that run once.
- Press feedback is
scale(var(--ui-press-scale))— 0.96, exactly. Below 0.95 feels exaggerated; above 0.97 is imperceptible. Components takestaticTapto opt out where even this is noise. - Stagger only infrequent entrances. Staged entry (split into semantic
chunks,
--ui-stagger-stepapart) is for first loads, success and empty states — never for row hovers, keystrokes or repeated tab switches. The attention cost of motion repeats on every trigger. - Exits softer than enters. A small fixed
translateYand a fade, not a full-height collapse.--ui-ease-outboth ways. - Icon state changes cross-fade (
opacity+ slightscale), both icons in the DOM — never a hard swap. Skip entrance animation on first render.IconSwapis this rule as a component: a subtle dip (×0.8) with a little blur reads as one glyph re-forming; a deep scale (×0.5) reads as a pop. - Durations and easings come from tokens (
--ui-motion-*,--ui-duration-*,--ui-ease-*). Never a hard-codedms. Nevertransition: all— enumerate properties. The three motion levels are handled at the token layer (--ui-motion-traveland--ui-enter-scalefor anything that enters or leaves); JS-driven animation asksmotionLevel()explicitly. 11a. Seamless means front-loaded, short and single. One strong ease-out (--ui-ease-out, ADR 0030) for anything that settles; exits shorter than entries and never delayed; the fade shorter than the move; 4–12px of travel and never a scale from 0; a selection is one element travelling, not two fills cross-fading; new content enters from the side of what was chosen; a leaving row fades while its list closes, in one motion. A height animation folds the padding with it, or the element stalls at its padding and jumps shut.
Icons
- One SVG, recoloured per state. Icons use
currentColor; hover, selected and disabled states come from CSS colour and opacity, never separate assets. Outline is the default; fill marks the active state. - Match stroke to text weight. An icon beside text carries the text's
optical weight. One stroke weight per surface — and in Diorama projects,
griddy-iconsonly.
Control size
13a. Leave a Button at its default size (md) unless it sits inside
something already dense. Size follows the control's role: md for
every action in a composition (a card, a form, a dialog footer, a list's
add button), lg for a page's primary action, sm only inside a dense
part (table cell, icon toolbar, chip row). "Secondary" is a variant, not
a size; a denser screen is data-ui-density="compact", not size="sm".
Small buttons by instinct are the most common way a new composition
looks cramped (ADR 0029).
Hit areas
- If it looks clickable, all of it is clickable. No dead zones — a
checkbox and its label are one target. The conformance floor is
--ui-hit-area-min(24px); primary controls aim for--ui-hit-area-touch(44px). The visible element may stay small — extend the hit area with a pseudo-element on the wrapping label or button (replaced elements don't render::before/::afterreliably).
Pointer and disabled states
- Set
cursor: pointeron anything clickable — always, explicitly. No browser gives<button>a pointer cursor by default, and no reset in this stack adds one. It is the only signal a control is clickable before the click, so a missing pointer reads as "this isn't a button". Disabled controls getcursor: not-allowed. - Disable with the attribute, not
pointer-events: none.disabledalready blocks activation and removes the control from the tab order. Killing pointer events on top of that only makes the control unhoverable, which silently removes the tooltip that would explain why it is unavailable. Gate hover/press styling behindenabled:instead. - Don't expect a press animation on Enter. Pointer-press and Space-hold
paint
:active; Enter activates instantaneously, so the UA applies:activefor at most a frame. That is browser behaviour, not a bug worth "fixing" with JS state — the focus ring is the static cue and the resulting action is the acknowledgement. Rule 8 already requires a non-motion channel.
Separation and state
- Never signal a state with a partial edge. No left bar, no bottom rule, no inset stripe — not for hover, not for current, not for active-focused, and least of all thick. A ruler inside a control reads as clutter and multiplies: every marked row adds another line to the page. The channels that work are a background step, a full thin outline or border, or elevation — each of which changes the whole surface rather than decorating one side of it.
- Group with space, not with lines. A separator earns its place only when
space genuinely cannot do the job, and in this library it never has:
Menu.Separatoris 8px above and below with nothing painted, and it still announces asrole="separator". Grouping is the DIFFERENCE between two gaps. Reach for a rule and you are usually solving a spacing problem with ink. - Two states that must differ need two values. If hover and current would
paint the same fill, the answer is a missing token, not a marker bolted on
the side. The nav family had one fill and grew
--ui-nav-hover-bgthe day a 48px rail had no label left to change weight. - Strokes are solid — never dashed or dotted. A codified decision
(2026-11-02): no dash pattern on a border, outline, divider, underline or
SVG stroke, in code or on a sheet. Dashes read as unfinished or as a
placeholder; an empty slot is a fill, a drop target is a fill change.
Numbered 24 rather than inserted so rule 23 keeps the number code cites.
check:strokesfails the build onborder-dashed,outline-dotted, a dashedborderStyleor anystroke-dasharray.
Colour
- Semantic tokens only.
--ui-*roles, never raw values, never palette names. One colour, one meaning: if the link colour shows up as decoration, the decoration gets a neutral instead. Only the single primary action in a view gets a filled accent background. - Contrast fixes move lightness. When a pair fails, adjust L and keep chroma and hue — that keeps the colour recognisably itself. (This is what the theme resolver's audit does; do the same in one-off fixes.)
Type rendering
Text stays off the GPU at rest. A persistent
transform,will-changeorfilteron a text-bearing element promotes it to a compositor layer, where the glyphs are rasterised once and resampled — permanently soft text. Transient motion is fine: press scale (rule 7) and icon cross-fades (rule 10) end, and the text repaints sharp. The trap is promotion that outlives the animation — awill-changeleft in place "for performance", atranslateZ(0)hack, a decorativefilteron a container that holds copy. Clearwill-changewhen the animation ends and keep filters on sibling layers, not on the text's ancestor. Leavetext-renderingatauto; smoothing itself is the app root's job (CONVENTIONS §6), never a component's.backdrop-filteris NOT in that list, and it used to be. The two read alike and do opposite things to type:filterfilters the element, its own text included, whilebackdrop-filterfilters only what is BEHIND it and composites the element's content on top untouched. Measured in Chromium on the affixedHeader, whosebackdrop-blur-smsits on the<header>carrying the nav labels:on a text-bearing element glyph pixels changed backdrop-filter: blur(4px)0 — pixel-identical filter: blur(0.4px)9.31%, peak delta 139/255 So a translucent bar can have its blur and sharp labels both. Rule 23 banned a real technique on the strength of a plausible mechanism nobody had measured — which is the failure the rule itself is about, one layer up. Reach for
backdrop-filterfreely over a translucent ground; the thing to still avoid over text isfilter.
Effects
- Effects are a layer, not a feature. Glass, grain, sheen, glow,
shimmer, ink, the grounds and halo are a class on a component's root —
className={fx("glass")}— never a prop, never a restyle of its parts. One glass surface and one lit action per view; emphasis everywhere is none. The full guide is theeffectsskill.
Common mistakes
| Mistake | Fix |
| Equal nested radii | outer = inner + padding, from the --ui-radius-* scale |
| Border faking elevation | Layered translucent --ui-shadow-*; keep structural borders |
| Keyframes on a toggle | CSS transition, so it reverses mid-flight |
scale(0.9) on press | var(--ui-press-scale) |
| Stagger on every hover | Instant feedback, or ≤150ms opacity/colour |
Hard-coded 200ms | var(--ui-motion-standard) |
| Separate icon file per state | One currentColor SVG, states via CSS |
| 16px icon-button with a 16px hit area | Pseudo-element hit area ≥ --ui-hit-area-min |
| Raw hex in a component | The --ui-* role token that means it |
| Clickable element with the default arrow cursor | cursor: pointer — never inherited, always explicit |
pointer-events: none on a disabled control | The disabled attribute + enabled: gated hover, so tooltips survive |
| Asserting interaction in jsdom | A real browser — jsdom doesn't implement implicit activation |
Translucent panel built by hand with bg-surface/70 + backdrop-blur | fx("glass") — its tint is derived per brand so muted text still clears AA over anything behind it |
| A shimmer, sweep or glow on hover | Hover gets the component's own instant state change; light marks moments and states |
| Text soft/blurry after (or during rest between) animations | Layer promotion outlived the motion — clear will-change, no resting transform/filter on text containers |
Licence
The craft rules above are adapted from "skills" by Jakub Krehel (https://github.com/jakubkrehel/skills). Reproduced here rather than linked, because MIT requires the copyright notice and the permission notice to accompany substantial portions wherever they go — and this file is installed into other people's repositories.
MIT License
Copyright (c) 2026 Jakub Krehel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

