
Better Layout
Layout structure for web interfaces, from grouping and alignment to reading order...
Install
npx skills add trycompai/crm --skill better-layout -g -a claude-code -y- Repository
- trycompai/crm11.8k
- Category
- Design
- Updated
- 4d ago
- License
- MIT
- Context cost
- Mediumabout 1,963 tokens
- Runs scripts
- No, instructions only
What it does
Layout structure for web interfaces, from grouping and alignment to reading order, progressive disclosure, and adaptive breakpoints. Use when structuring a page or component, spacing or aligning controls, deciding what collapses at small sizes, handling RTL layout direction, or reviewing frontend code for layout. Triggers on layout, spacing, alignment, grouping, negative space, whitespace, visual hierarchy, reading order, progressive disclosure, breakpoints, responsive layout, container queries, safe area, full-bleed, edge-to-edge, layout margins, RTL layout, logical properties.
Layout that communicates structure
Layout communicates before a single word is read: position, spacing, and alignment carry hierarchy on their own, and generous space beats decoration. A good layout also survives stress: resize it, translate it, mirror it for RTL, and it should still hold together. Apply these principles when building or reviewing UI code, and express every change in the project's existing styling system (Tailwind, plain CSS, CSS-in-JS); never introduce a second styling approach.
Hit-area sizes and focus behavior are covered by the better-accessibility skill; visual polish (radius, shadows, animation) by the better-ui skill; line length and text spacing by the better-typography skill.
Treat the numeric values below as starting points for interfaces without an established density or spacing system. Preserve deliberate platform chrome, compact professional tools, and project tokens when they remain usable under hit-area, zoom, localization, and viewport stress tests.
Quick Reference
| Category | When to Use |
|---|---|
| Grouping & Alignment | Space vs separators, alignment edges, logical properties, importance ordering |
| Spacing & Adaptivity | Spacing between targets, layout margins, progressive disclosure, full-bleed content, breakpoints, i18n growth |
Core Principles
1. Group with Space, Not Lines
Negative space is the primary grouping tool; background shapes second; separator lines last, only where space alone can't carry the structure. The gap between groups must be at least 2× the gap within a group (8px intra-group → 16px+ inter-group), or the grouping reads as noise.
2. Keep Controls Distinct from Content
Interactive elements must look interactive: a background shape, a border, or a consistent placement zone. Never style a control identically to adjacent static text.


