Craft-level UI principles for your AI coding agent. Teaches the difference between correct and good — layered shadows, perceptual color, spring physics, optical alignment, and the thousand invisible details that separate polished interfaces from generic ones.
Distilled from Jakub Krehel and Emil Kowalski.
npx skills add dannyjpwilliams/design-engineer-skillWhen your agent builds, reviews, or refactors UI, this skill applies senior design-engineering judgment automatically. Instead of default shadows, generic easing, and mathematically-correct-but-visually-wrong alignment, your agent produces code that looks right.
Five principles guide every decision:
- Align to the eye, not the grid — geometric correctness != perceptual correctness
- Animate with physics, not math — springs over cubic-bezier,
bounce: 0by default - Sweat the invisible details — everyone unconsciously feels them
- Restraint over eagerness — the best motion is invisible
- Every value agrees on the same metaphor — contradictory values break the illusion
- Shadows — three-layer transparent system (4-8% opacity), replacing borders
- Color — OKLCH for perceptual uniformity, shade scales without hue drift
- Gradients — oklab interpolation, color hints, blend-mode layering
- Border radius — concentric formula for nested elements
- Optical alignment — icon/text balance, SVG-level fixes, baseline-aware padding
- Motion — spring configs, duration hierarchy by user intent, gesture patterns
- Micro-interactions — button press feedback, icon swap animations, drag gestures
- Performance — compositor-only properties, will-change discipline, overflow-clip
- Accessibility —
prefers-reduced-motion, focus states, keyboard equivalents - 10-point review checklist — systematic quality checks for any UI
The skill triggers automatically when your agent is:
- Building or styling UI components
- Adding animations, transitions, or hover/active/focus states
- Reviewing or refactoring frontend code
- Working with shadows, colors, gradients, spacing, typography, or border-radius
- Implementing drag interactions, layout animations, or icon transitions
- Asked to "think like a design engineer"
SKILL.md Core principles, quick rules, review checklist
references/motion.md Spring physics, gesture patterns, icon swaps, drag, shared layout
references/visual-craft.md Shadow system, OKLCH color, gradients, optical alignment, performance
MIT