/visual-design-principles:layout-spatial-structurefrom visual-design-principles
Guides building and reviewing page layouts using 12-column grids, 8-point spacing, CSS Grid vs Flexbox decisions, and Gestalt proximity principles.
Ships in visual-design-principles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every professional layout is built on a grid. The grid is not a suggestion — it is the structural skeleton that makes alignment effortless, spacing predictable, and responsive behavior automatic. Material Design, Bootstrap, and every major design system converge on the same fundamentals: a 12-column grid with an 8-point spacing system.
| Component | Purpose | Typical Value |
|---|---|---|
| Columns | Content containers; 12 divides evenly by 2, 3, 4, 6 | 12 columns |
| Gutters | Space between columns; consistent rhythm | 16px–32px (24px default) |
| Margins | Outer breathing room on left/right edges | 16px mobile, 24px tablet, auto-center desktop |
| Container | Max-width wrapper preventing ultra-wide lines | 1200px–1440px |
Grid adherence rule: >90% of element edges must align to grid lines. Audit by overlaying a 12-column grid on any screen — misaligned elements are immediately visible.
| Use Case | Choose | Reason |
|---|---|---|
| Page-level layout (header, sidebar, main, footer) | CSS Grid | Two-dimensional control over rows and columns |
| Card grids with uniform items | CSS Grid | auto-fit/auto-fill with minmax() handles responsiveness |
| Navigation bars, button groups | Flexbox | One-dimensional alignment with wrapping |
| Centering a single element | Flexbox | justify-content + align-items in three lines |
| Overlapping elements or complex placement | CSS Grid | Named grid areas and explicit row/column placement |
| Unknown number of items in a row | Flexbox | flex-wrap distributes naturally |
Default rule: Start with CSS Grid for layout, drop to Flexbox for component-level alignment.
Use the constrained 4px/8px spacing scale defined in the whitespace-density skill. All grid gutters, margins, and padding must come from that scale. Never use arbitrary spacing values.
Apply the Gestalt proximity rule (see whitespace-density skill for the full ≤50% rule and spacing tokens) to all layout decisions. Internal spacing within a grid region must be visibly tighter than spacing between regions.
Use CSS Grid auto-fit with minmax() for responsive card grids (see responsive-design skill for fluid grid techniques).
Minimum card width: 280px for content cards, 200px for thumbnail cards. Set gap using the spacing scale.
Place layout regions to support natural eye scanning. See the visual-hierarchy skill for F-pattern and Z-pattern rules — layout determines where regions go, hierarchy determines what draws attention within them.
| Anti-Pattern | Why It Fails | Fix |
|---|---|---|
| Random widths (347px, 513px) | No grid alignment; looks accidental | Snap to column spans or percentages |
| Mixing grid systems (12-col + 10-col) | Conflicting rhythms; nothing aligns | One grid system per project |
| Equal internal and external spacing | Groups are indistinguishable; flat hierarchy | Apply Gestalt proximity rule (see whitespace-density skill) |
| Hardcoded pixel widths on responsive layouts | Breaks on every viewport | Use fr, %, minmax(), or container queries |
| Nesting grids more than 2 levels deep | Compounding gutters create unpredictable spacing | Flatten structure; use subgrid |
Working implementations in examples/:
examples/grid-and-card-layout.md — Complete 12-column grid setup, responsive card grid with CSS Grid auto-fit, Tailwind configuration, and React componentWhen reviewing or building layouts:
whitespace-density skill)auto-fit/auto-fill with minmax() for responsive reflowwhitespace-density skill)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
layout, grid-system, css-grid, flexbox, spacing-system, responsive-design
npx claudepluginhub oborchers/fractional-cto --plugin visual-design-principles12 skills in this plugin
/accessibility-inclusive-designThis skill should be used when the user is implementing accessible design, checking color contrast ratios, adding keyboard navigation, supporting screen readers, handling color blindness, implementing ARIA attributes, designing focus indicators, meeting WCAG 2.2 compliance, or building inclusive interfaces. Covers WCAG 2.2 AA requirements, color contrast (4.5:1 body, 3:1 large text), color independence (never rely on color alone), keyboard navigation, focus indicators, touch targets, screen reader considerations, and automated testing with axe-core./color-theory-applicationThis skill should be used when the user is selecting colors, building color palettes, defining color systems, implementing dark mode, choosing brand colors, creating shade scales, applying the 60-30-10 rule, selecting data visualization colors, or checking color contrast. Covers HSL color model, harmony schemes (complementary, analogous, triadic), systematic shade scale generation, WCAG contrast requirements, semantic color systems, and dark mode design./consistency-design-systemsThis skill should be used when the user is building a design system, defining design tokens, creating component libraries, implementing CSS custom properties, ensuring visual consistency across pages, choosing between design systems (Material, Ant, Carbon), or auditing a codebase for design consistency. Covers design tokens (primitive → semantic → component layers), atomic design methodology, token governance, and systematic consistency./craftsmanship-polishThis skill should be used when the user is polishing UI details, optimizing images, implementing shadows or elevation systems, ensuring pixel-perfect alignment, defining border-radius systems, adding micro-interactions or transitions, handling loading/empty/error states, or reducing Cumulative Layout Shift (CLS). Covers VisAWI Craftsmanship facet, retina-ready images, layered shadows, consistent border-radius, transition timing, skeleton screens, and layout stability./design-evaluation-scoringThis skill should be used when the user asks to evaluate, score, or audit a visual design, wants to compare designs quantitatively, needs an anti-pattern checklist, or wants to understand the 8-dimension design quality framework. Covers the VisAWI-aligned 8-dimension scoring methodology (1-5 per dimension, 40-point maximum), processing fluency theory, the anti-pattern rapid screening checklist, and the complete evaluation workflow./responsive-designThis skill should be used when the user is implementing responsive layouts, choosing breakpoints, building mobile-first designs, using CSS container queries, implementing responsive images (srcset, picture), sizing touch targets, designing responsive navigation, or adapting tables for mobile. Covers mobile-first philosophy, breakpoint strategy, fluid grids with CSS Grid, container queries, responsive images, touch target sizing (44x44px minimum), and responsive tables.Other plugins' skills for the same job