design-layout-principles
npx skills add https://github.com/jacoblewisau/design-layout-principles --skill design-layout-principles
Agent 安装分布
Skill 文档
<core_philosophy> These designers share fundamental beliefs:
| Principle | Meaning |
|---|---|
| Code is the design tool | Static mockups can’t capture real interactions |
| Details compound | Small polish decisions add up to emotional impact |
| Build > plan | Ship experiments, iterate in code |
| Daily practice | Craft improves through consistent, meditative work |
| Performance is delight | Fast software is good design |
The Dynamic:
- Steve says “get the spacing and hierarchy right first”
- Rauno says “now sweat every detail”
- Mariana says “try something unexpected”
- Emil says “but only if it serves the user”
- Paco says “and make it fast” </core_philosophy>
<audit_workflow>
Step 1: Context Reconnaissance
Before auditing code, gather project context:
- Check CLAUDE.md or README for project type
- Review existing UI patterns and design system
- Identify target audience (productivity tool vs consumer app vs marketing site)
Step 2: Layout Gap Analysis
Proactively search the codebase for design philosophy violations:
Spacing & Layout Gaps
# Hardcoded pixel values (should use spacing tokens)
grep -r "margin:\s*[0-9]" --include="*.css" --include="*.tsx"
grep -r "padding:\s*[0-9]" --include="*.css" --include="*.tsx"
grep -r "gap:\s*[0-9]" --include="*.css" --include="*.tsx"
Color Gaps
# Hardcoded colors (should use color tokens)
grep -r "#[0-9a-fA-F]\{3,6\}" --include="*.css" --include="*.tsx"
grep -r "rgb\(a\?\)(" --include="*.css" --include="*.tsx"
Interaction Gaps
# Interactive elements missing states
grep -r "onClick" --include="*.tsx" -l # Then check for :hover/:focus
grep -r "cursor:\s*pointer" --include="*.css" # Should have hover state
Transition Gaps
# Style changes without transitions
grep -r ":hover\|:focus\|:active" --include="*.css" -A5 # Check for transition
Typography Gaps
# Hardcoded font sizes (should use type scale)
grep -r "font-size:\s*[0-9]" --include="*.css" --include="*.tsx"
Accessibility Gaps
# Interactive elements without accessible names
grep -r "<button" --include="*.tsx" | grep -v "aria-label"
grep -r "<img" --include="*.tsx" | grep -v "alt="
Z-Index Gaps
# Arbitrary z-index values (should use layering system)
grep -r "z-index:\s*[0-9]" --include="*.css" --include="*.tsx"
Gap Analysis Output
Document findings in categories:
- Token violations â Hardcoded values that should use design tokens
- State gaps â Missing hover, focus, active, or disabled states
- Transition gaps â Abrupt style changes without smooth transitions
- Accessibility gaps â Missing ARIA attributes, labels, or keyboard support
- Consistency gaps â Patterns that differ from established design system
Step 3: Designer Weighting
Weight perspectives based on project stage:
| Stage | Weight Higher |
|---|---|
| Early prototype | Steve (fundamentals), Mariana (experiment), Paco (ship fast) |
| Refinement | Rauno (polish), Emil (restraint) |
| Pre-launch | All five equally |
| Rough UI | Steve first, then others |
Step 4: Full Audit
Read the audit checklist first, then the designer reference files matching your context weighting:
Required reading order:
audit-checklist.mdâ Structured criteria for reviewreferences/steve-schoger.mdâ Foundation (always first)- Additional designer files based on weighting
Step 5: Structured Output
Present findings with:
- Quick Summary â 2-3 sentence overall assessment
- Per-Designer Sections â Using their voice and specific recommendations
- Combined Recommendations â Prioritized with severity indicators
- Designer Reference Summary â Which principles were most relevant </audit_workflow>
<output_format>
UI Craft Audit: {Component/Page Name}
Quick Summary
{2-3 sentences on overall state and key issues}
Steve Schoger (Fundamentals)
{Specific feedback on spacing, hierarchy, typography, color}
Rauno Freiberg (Polish)
{Specific feedback on details, consistency, soul}
Mariana Castilho (Experimentation)
{Opportunities for unexpected delight, component transformation}
Emil Kowalski (Restraint)
{Animation timing, necessity check, speed recommendations}
Paco Coursey (Performance)
{Keyboard support, accessibility, interaction polish}
Combined Recommendations
Critical (Must Fix):
- {Issue with specific fix}
Important (Should Fix):
- {Issue with specific fix}
Nice to Have:
- {Enhancement opportunity} </output_format>
<reference_index>
Reference Files
All in references/:
Designer Philosophies
| File | Designer | Focus |
|---|---|---|
| steve-schoger.md | Steve Schoger | Fundamentals â spacing, hierarchy, color, shadows |
| rauno-freiberg.md | Rauno Freiberg | Polish â details, soul, consistency |
| mariana-castilho.md | Mariana Castilho | Experimentation â unexpected delight |
| emil-kowalski.md | Emil Kowalski | Restraint â animation timing, necessity |
| paco-coursey.md | Paco Coursey | Performance â keyboard, accessibility |
| philosophy.md | Combined | Unified craft philosophy, weighting by project stage |
Technical Deep-Dives
| File | Focus |
|---|---|
| component-patterns.md | Buttons, forms, cards, modals, dropdowns, tooltips, tables, loading states |
| extended-components.md | Tabs, accordions, steppers, breadcrumbs, pagination, date pickers, file upload, avatars, tags |
| state-patterns.md | Loading states, error handling, empty states, offline states, permission patterns |
| composition.md | Grid systems, visual balance, rule of thirds, z-index layering, content density |
| navigation-patterns.md | Top nav, side nav, mobile nav, mega menus, command palettes, keyboard navigation |
| iconography.md | Icon sizing, stroke weights, optical alignment, icon buttons, animation |
| scroll-overflow.md | Sticky elements, scroll shadows, carousels, infinite scroll, scroll snap |
| content-handling.md | Truncation, i18n/RTL, user-generated content, variable lengths, missing data |
| accessibility-deep.md | ARIA patterns, live regions, focus management, WCAG 2.2, testing methodology |
| dark-mode.md | Color palette, elevation, contrast, halation effect, implementation |
| accessibility.md | WCAG contrast, focus states, keyboard nav, touch targets, motion |
| anti-patterns.md | Common mistakes consolidated by category with severity guide |
| responsive-design.md | Breakpoints, mobile-first, layout shifts, fluid typography |
| typography-systems.md | Type scales, font pairing, line height, measure, vertical rhythm |
| color-systems.md | Palette construction, semantic colors, contrast tooling |
| spacing-systems.md | Scale construction, component spacing, layout spacing, responsive spacing |
| data-visualization.md | Charts, graphs, data tables, metrics, KPIs, sparklines, progress indicators |
| motion-choreography.md | Orchestrated animations, page transitions, stagger patterns, loading sequences |
| design-tokens.md | Token architecture, primitives/semantic/component layers, theming, multi-brand |
| design-process.md | Design-to-code workflow, handoff patterns, component development, design QA |
| </reference_index> |
<quick_reference>
Designer Voice Quick Reference
Steve: “The hierarchy is unclear â everything competes for attention. Make the secondary text gray-500 instead of gray-700. Increase section spacing from 16px to 24px.”
Rauno: “The toggle switches lack satisfying feedback. Add a subtle scale animation (0.95 â 1.0) on press. Consider a subtle background color shift on hover.”
Mariana: “This layout is functional but predictable. Consider progressive disclosure for advanced settings. What if toggling a setting briefly highlighted its effect?”
Emil: “The section expand animation (300ms) feels sluggish. Reduce to 150ms or use instant toggle. Do you need animation on the toggle? Sometimes instant is better.”
Paco: “No keyboard navigation. Add Tab focus with visible ring. The save button should have an :active state that feels ‘pressed.'” </quick_reference>