design-engineering
Design engineering principles and patterns for building polished, accessible web interfaces. Use this skill when building UI components, reviewing frontend code, implementing forms, handling touch interactions, optimizing performance, or creating marketing pages. Triggers on: design engineering, UI polish, input fields, form validation, button states, touch devices, mobile UX, accessibility, a11y, keyboard navigation, aria labels, font rendering, typography, layout shift, z-index, animations, transitions, easing, hover effects, tap targets, iOS Safari, prefers-reduced-motion, marketing pages, landing pages, dark mode, theme switching, scrollbars, gradients, shadows, virtualization, preloading.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- design-engineering
- model
- claude-opus-4-5
- context
- fork
- description
- Design engineering principles and patterns for building polished, accessible web interfaces. Use this skill when building UI components, reviewing frontend code, implementing forms, handling touch interactions, optimizing performance, or creating marketing pages. Triggers on: design engineering, UI polish, input fields, form validation, button states, touch devices, mobile UX, accessibility, a11y, keyboard navigation, aria labels, font rendering, typography, layout shift, z-index, animations, transitions, easing, hover effects, tap targets, iOS Safari, prefers-reduced-motion, marketing pages, landing pages, dark mode, theme switching, scrollbars, gradients, shadows, virtualization, preloading.
02 资源文件 9
- 参考文档aesthetic-direction.md3.7 KB
- 参考文档agents/openai.yaml189 B
- 参考文档animations.md7.8 KB
- 参考文档component-design.md7.2 KB
- 参考文档forms-controls.md4.9 KB
- 参考文档marketing.md3.4 KB
- 参考文档performance.md4.7 KB
- 参考文档touch-accessibility.md4.8 KB
- 参考文档ui-polish.md6.2 KB
03 SKILL.md 正文
Design Engineering Principles
A comprehensive guide for building polished, accessible web interfaces
Quick Reference
| Category | When to Use |
|---|---|
| Animations | Enter/exit transitions, easing, springs, performance |
| UI Polish | Typography, visual design, layout, colors |
| Aesthetic Direction | Visual direction, differentiation, anti-patterns |
| Forms & Controls | Inputs, buttons, form submission |
| Touch & Accessibility | Mobile, touch devices, keyboard nav, a11y |
| Component Design | Compound components, composition, props API |
| Marketing | Landing pages, blogs, docs sites |
| Performance | Virtualization, preloading, optimization |
Core Principles
1. No Layout Shift
Dynamic elements should cause no layout shift. Use hardcoded dimensions, font-variant-numeric: tabular-nums for changing numbers, and avoid font weight changes on hover/selected states.
2. Touch-First, Hover-Enhanced
Design for touch first, then add hover enhancements. Disable hover effects on touch devices. Ensure 44px minimum tap targets. Never rely on hover for core functionality.
3. Keyboard Navigation
Tabbing should work consistently. Only allow tabbing through visible elements. Ensure keyboard navigation scrolls elements into view with scrollIntoView().
4. Accessibility by Default
Every animation needs prefers-reduced-motion support. Every icon button needs an aria label. Every interactive element needs proper focus states.
5. Speed Over Delight
Product UI should be fast and purposeful. Skip animations for frequently-used interactions. Marketing pages can be more elaborate.
Decision Flowcharts
Should I Animate This?
Will users see this 100+ times daily?
├── Yes → Don't animate
└── No
├── Is this user-initiated?
│ └── Yes → Animate with ease-out (150-250ms)
└── Is this a page transition?
└── Yes → Animate (300-400ms max)
What Easing Should I Use?
Is the element entering or exiting?
├── Yes → ease-out
└── No
├── Is it moving on screen?
│ └── Yes → ease-in-out
└── Is it a hover/color change?
├── Yes → ease
└── Default → ease-out
Common Mistakes
| Mistake | Fix |
|---|---|
transition: all |
Specify exact properties |
| Hover effects on touch | Use @media (hover: hover) |
| Font weight change on hover | Use consistent weights |
Animating height/width |
Use transform and opacity only |
| No reduced motion support | Add prefers-reduced-motion query |
| z-index: 9999 | Use fixed scale or isolation: isolate |
| Custom page scrollbars | Only customize scrollbars in small elements |
Review Checklist
When reviewing UI code, check:
- [ ] No layout shift on dynamic content
- [ ] Animations have reduced motion support
- [ ] Touch targets are 44px minimum
- [ ] Hover effects disabled on touch devices
- [ ] Keyboard navigation works properly
- [ ] Icon buttons have aria labels
- [ ] Forms submit with Enter/Cmd+Enter
- [ ] Inputs are 16px+ to prevent iOS zoom
- [ ] No
transition: all - [ ] z-index uses fixed scale
Reference Files
For detailed guidance on specific topics:
- animations.md - Easing, timing, springs, performance
- ui-polish.md - Typography, shadows, gradients, scrollbars
- aesthetic-direction.md - Aesthetic direction, differentiation, anti-patterns
- forms-controls.md - Inputs, buttons, form patterns
- touch-accessibility.md - Touch devices, keyboard nav, a11y
- component-design.md - Compound components, composition, props API
- marketing.md - Landing pages, blogs, docs
- performance.md - Virtualization, preloading, optimization
04 同仓库更多 Skills
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
workflow-from-chats
Extract preferences from agent chats → skills, rules, workflow docs. For learning preferences, mining feedback, personalizing workflows.
winui3-csharp-app
WinUI 3 / Windows App SDK desktop apps in C#/XAML. MVVM, bindings, navigation, Mica/Acrylic, windowing, packaging, performance.
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
what-did-i-get-done
Summarize authored commits over a user-specified time period into a concise status update.
weekly-review
Produce a short weekly synthesis of authored commits with highlights by bugfix, tech debt, and net-new work.