Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs layout systems and responsive interfaces including grid systems, flexbox patterns, sidebar layouts, and responsive breakpoints. Use when structuring app layouts, building responsive designs, or creating complex page structures.
.claude/skills/ancoleman-designing-layouts/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 98% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 121% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -21% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 115% | 0% |
This skill provides comprehensive guidance for creating responsive layout systems using modern CSS techniques. It covers grid systems, flexbox patterns, container queries, spacing systems, and mobile-first design strategies to build flexible, accessible interfaces that adapt seamlessly across devices.
Invoke this skill when:
For structured, two-dimensional layouts, use CSS Grid with design tokens.
12-Column Grid:
css.grid-container { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--grid-gap); max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding-x); } .col-span-6 { grid-column: span 6; } .col-span-4 { grid-column: span 4; } .col-span-3 { grid-column: span 3; }
Auto-Fit Responsive Grid:
css.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--grid-gap); }
For complex grid layouts and advanced patterns, see references/layout-patterns.md.
For one-dimensional layouts and alignment control.
Holy Grail Layout:
css.holy-grail { display: flex; flex-direction: column; min-height: 100vh; } .holy-grail__body { flex: 1; display: flex; } .holy-grail__nav { width: var(--sidebar-width); flex-shrink: 0; } .holy-grail__main { flex: 1; min-width: 0; /* Prevent overflow */ } .holy-grail__aside { width: var(--sidebar-width); flex-shrink: 0; }
For additional flexbox patterns including sticky footer and centering, see references/css-techniques.md.
For component-responsive design that adapts based on container size, not viewport.
css.card-container { container-type: inline-size; container-name: card; } @container card (min-width: 400px) { .card { grid-template-columns: auto 1fr; gap: var(--spacing-lg); } } @container card (min-width: 600px) { .card { grid-template-columns: 200px 1fr auto; } }
Container queries are production-ready in all modern browsers (2025). For detailed usage and fallback strategies, see references/responsive-strategies.md.
Use mobile-first approach with semantic breakpoints.
css/* Mobile-first breakpoints using design tokens */ @media (min-width: 640px) { /* sm: Tablet portrait */ .container { max-width: 640px; } } @media (min-width: 768px) { /* md: Tablet landscape */ .container { max-width: 768px; } } @media (min-width: 1024px) { /* lg: Desktop */ .container { max-width: 1024px; } } @media (min-width: 1280px) { /* xl: Wide desktop */ .container { max-width: 1280px; } } @media (min-width: 1536px) { /* 2xl: Ultra-wide */ .container { max-width: 1536px; } }
For fluid typography and advanced responsive techniques, see references/responsive-strategies.md.
Implement consistent spacing using design tokens.
css/* Base unit: 4px or 8px */ :root { --spacing-xs: 4px; --spacing-sm: 8px; --spacing-md: 16px; --spacing-lg: 24px; --spacing-xl: 32px; --spacing-2xl: 48px; --spacing-3xl: 64px; } /* Apply systematically */ .section { padding: var(--section-spacing) 0; } .container { padding: 0 var(--container-padding-x); } .card { padding: var(--spacing-lg); } .stack > * + * { margin-top: var(--spacing-md); }
For utility-first approach with custom configuration:
javascript// tailwind.config.js module.exports = { theme: { extend: { spacing: { 'xs': 'var(--spacing-xs)', 'sm': 'var(--spacing-sm)', 'md': 'var(--spacing-md)', 'lg': 'var(--spacing-lg)', 'xl': 'var(--spacing-xl)', }, screens: { 'sm': '640px', 'md': '768px', 'lg': '1024px', 'xl': '1280px', '2xl': '1536px', } } } }
For Tailwind patterns and optimization, see references/library-guide.md.
Determine layout type and responsive behavior needed.
Use design tokens from skills/design-tokens/ for consistent spacing, breakpoints, and sizing.
For responsive breakpoints:
bashnode scripts/generate_breakpoints.js --approach mobile-first
For fluid typography scale:
bashnode scripts/calculate_fluid_typography.js --min-vw 320 --max-vw 1920
Check semantic HTML and landmark regions:
bashnode scripts/validate_layout_accessibility.js path/to/component.tsx
Test across device sizes using responsive preview tools and actual devices.
scripts/generate_breakpoints.js - Generate responsive breakpoint systemscripts/calculate_fluid_typography.js - Calculate fluid typography scalesscripts/validate_layout_accessibility.js - Validate semantic HTML and ARIA landmarksreferences/layout-patterns.md - Common layout patterns (sidebar, masonry, split-pane)references/responsive-strategies.md - Mobile-first design and responsive techniquesreferences/css-techniques.md - Modern CSS features (Grid, Flexbox, Container Queries)references/accessibility-layouts.md - Semantic HTML and ARIA landmarksreferences/library-guide.md - Framework integration (Tailwind, styled-components)references/performance-optimization.md - CSS performance and layout thrashingexamples/admin-layout.tsx - Complete admin dashboard with sidebarexamples/responsive-grid.tsx - Auto-responsive grid systemexamples/masonry-layout.tsx - Pinterest-style masonry gridexamples/split-pane.tsx - Resizable split-pane interfaceassets/breakpoint-config.json - Standard breakpoint configurationsassets/layout-templates.json - Common layout templatesassets/spacing-scale.json - Spacing system configurations| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 21,709 | 20,337 | -6% | 1 | 1 | 0% | 4,700 | 6,449 | +37% | 0 | 0 | — |
case-02 | fail→fail | 7,183 | 7,428 | +3% | 1 | 1 | 0% | 601 | 2,286 | +280% | 0 | 0 | — |
case-03 | fail→fail | 18,263 | 16,520 | -10% | 1 | 1 | 0% | 3,628 | 5,308 | +46% | 0 | 0 | — |
case-04 | pass→pass | 13,376 | 12,735 | -5% | 1 | 1 | 0% | 2,323 | 4,341 | +87% | 0 | 0 | — |
case-05 | fail→pass | 8,203 | 5,628 | -31% | 1 | 1 | 0% | 1,486 | 2,935 | +98% | 0 | 0 | — |
case-06 | fail→fail | 6,316 | 7,406 | +17% | 1 | 1 | 0% | 1,173 | 3,332 | +184% | 0 | 0 | — |
case-07 | fail→fail | 4,977 | 5,506 | +11% | 1 | 1 | 0% | 891 | 3,012 | +238% | 0 | 0 | — |
case-08 | fail→pass | 12,009 | 5,508 | -54% | 1 | 1 | 0% | 2,182 | 2,993 | +37% | 0 | 0 | — |
case-09 | pass→pass | 6,376 | 3,718 | -42% | 1 | 1 | 0% | 1,193 | 2,751 | +131% | 0 | 0 | — |
case-10 | pass→pass | 12,211 | 9,274 | -24% | 1 | 1 | 0% | 2,181 | 3,727 | +71% | 0 | 0 | — |
case-11 | fail→pass | 6,429 | 1,550 | -76% | 1 | 1 | 0% | 982 | 2,168 | +121% | 0 | 0 | — |
case-12 | fail→pass | 14,859 | 2,558 | -83% | 1 | 1 | 0% | 2,976 | 2,346 | -21% | 0 | 0 | — |
case-13 | fail→fail | 8,182 | 6,263 | -23% | 1 | 1 | 0% | 1,543 | 3,164 | +105% | 0 | 0 | — |
case-14 | fail→pass | 7,646 | 5,844 | -24% | 1 | 1 | 0% | 1,425 | 3,070 | +115% | 0 | 0 | — |
case-15 | pass→pass | 13,209 | 12,869 | -3% | 1 | 1 | 0% | 2,390 | 4,516 | +89% | 0 | 0 | — |
case-16 | pass→pass | 24,471 | 27,377 | +12% | 1 | 1 | 0% | 4,809 | 8,145 | +69% | 0 | 0 | — |
case-17 | pass→pass | 19,079 | 15,574 | -18% | 1 | 1 | 0% | 3,296 | 4,677 | +42% | 0 | 0 | — |
case-18 | pass→pass | 17,643 | 12,572 | -29% | 1 | 1 | 0% | 3,573 | 4,405 | +23% | 0 | 0 | — |
case-19 | pass→pass | 9,064 | 5,812 | -36% | 1 | 1 | 0% | 1,434 | 2,970 | +107% | 0 | 0 | — |
case-20 | pass→pass | 7,033 | 6,468 | -8% | 1 | 1 | 0% | 1,320 | 3,231 | +145% | 0 | 0 | — |
case-21 | pass→pass | 4,001 | 3,865 | -3% | 1 | 1 | 0% | 708 | 2,562 | +262% | 0 | 0 | — |
case-22 | fail→pass | 15,464 | 3,413 | -78% | 1 | 1 | 0% | 2,692 | 2,520 | -6% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.