MCPInstall

layout-system

Fix or build responsive layout: page shells, grids, card layouts, sidebars, breakpoint strategy, container queries. Use when the user says 'this breaks on mobile', 'the layout is messy', 'things don't line up', 'our spacing is inconsistent between sections', 'make this responsive', 'center this properly', or asks for a dashboard/page/grid layout. Inspects existing CSS for layout smells (fixed widths, absolute positioning, media-query sprawl), then produces working layout code — refactored CSS/JSX with Grid/Flexbox decision rules applied, breakpoints derived from content, and a responsive verification checklist. Hands off pure spacing-token questions to design-foundation and text-readability questions to typography-system.

Installs
94
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/sanky369/vibe-building-skills --skill layout-system
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads layout-system automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Layout System

Produce working, mobile-first layout code for the user's actual screens — a refactored page shell, grid, or component layout — not a CSS tutorial. Governing principle: content determines structure. Choose Grid vs Flexbox by the shape of the content, place breakpoints where the content breaks, and let flexible tracks absorb the rest.

When to use / handoffs

  • Use for page structure, alignment, responsiveness, grids, overlap/overflow bugs, and breakpoint strategy.
  • Spacing values themselves inconsistent across the app (no scale) → establish tokens first via skills/frontend-design/design-foundation.
  • Text hard to read at some widths (line length, fluid type) → skills/frontend-design/typography-system.
  • Layout is fine but the screen feels cluttered → skills/frontend-design/visual-hierarchy-refactoring.

Step 1 — Inspect the codebase

  1. Locate the target. If the user named a screen/component, read it plus its CSS. Otherwise glob the main layout files (**/layout.*, **/App.*, **/*page*, global CSS).
  2. Detect the styling system. Tailwind classes vs CSS Modules vs styled-components — deliver in the same system.
  3. Grep for layout smells and record counts:
    • width:\s*\d+px|w-\[\d+px\] — fixed widths (breakage source #1)
    • position:\s*absolute outside overlays/badges — layout by coordinates
    • float:|margin-top:\s*-|margin-left:\s*- — legacy/negative-margin hacks
    • @media — count distinct breakpoint values; >4 distinct min-widths = breakpoint sprawl
    • overflow-x and 100vw — horizontal-scroll suspects
  4. Read existing breakpoints (Tailwind screens, or media queries) — reuse them unless they're the problem.
  5. Check for spacing tokens — if a scale exists, all new gaps/padding must use it.

Step 2 — Intake

Ask in one batch, only if not inferable: which screen/flow matters most, and the smallest and largest viewports that matter (default: 320px–1440px, content capped ~1200–1280px). Infer density and stack from the code. Don't stall — with a named target and visible code, state assumptions and build.

Step 3 — Build mobile-first, with these decision rules

  1. Start at 320px, single column, then add columns only where content earns them. Never shrink a desktop design downward.
  2. Grid vs Flexbox:
    • Rows AND columns must align (page shell, dashboard, gallery, form with aligned labels) → Grid.
    • One direction, sizes driven by content (navbar, button row, tag list, media-object) → Flexbox.
    • Card grid with unknown item count → Grid with repeat(auto-fit, minmax(min(100%, 280px), 1fr)) — zero media queries.
    • If you're using Flexbox with percentage-width children to fake columns, switch to Grid.
  3. Page shell: Grid with grid-template-areas; collapse areas at smaller widths. Canonical:
.shell { display: grid; gap: var(--space-4); grid-template-areas: "header" "main" "footer"; }
@media (min-width: 768px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-areas: "header header" "sidebar main" "footer footer";
  }
  .sidebar { position: sticky; top: 0; height: fit-content; }
}

(minmax(0, 1fr) — not bare 1fr — so wide children can't blow out the track.) 4. Breakpoints from content: resize until something breaks (line too long, column too squeezed, orphaned whitespace) and put the breakpoint there. Keep to 2–3 per component. Use the project's existing breakpoint tokens. 5. Container queries when a component renders in containers of different widths (card in sidebar AND main): container-type: inline-size on the wrapper, @container (min-width: …) on the component. Viewport media queries only for page-level structure. 6. Media proportions: aspect-ratio + object-fit: cover; never fixed height on responsive images. 7. Units: rem for space/type, %/fr/minmax() for tracks, ch for text measure, px only for borders and true pixel concerns.

For the full pattern gallery (hero, card grid, sidebar, responsive nav, holy-grail, sticky footer, container-query card), read references/layout-patterns.md and adapt rather than reinventing.

Step 4 — Verify at the checkpoints

Test (or reason through, if you can't render) at 320, 375, 768, 1024, 1440. Look for: horizontal scroll, squeezed columns (<~250px of real content), text measure outside 45–75ch, touch targets <44px, content trapped under sticky elements.

Required output format

Deliver code plus this summary:

## Layout changes
[Refactored files with full code — same styling system as the project]

## Decisions
| Question | Choice | Rule applied |
| Shell | Grid, template-areas | 2-D alignment needed |
| Card list | auto-fit minmax(280px, 1fr) | unknown item count → no media queries |
| Breakpoints | 768px, 1024px (existing tokens) | content broke at sidebar collapse |
| Container queries | card only | renders in 2 container widths |

## Smells removed
| Smell | Where | Replaced by |
| fixed width 960px | Header.tsx | max-width + margin-inline auto |
| ... |

## Verified
320 / 375 / 768 / 1024 / 1440 — [result per width, or "reasoned, not rendered" flagged]

Quality bar (check before delivering)

  • No horizontal scrollbar at 320px
  • Zero fixed pixel widths on containers (max-width caps allowed)
  • Grid for 2-D, Flexbox for 1-D — no percentage-width flex-column fakery
  • Body text measure 45–75ch at every breakpoint
  • Touch targets ≥ 44×44px on mobile
  • All gaps/padding use the project's spacing scale (no new magic numbers)
  • ≤3 breakpoints per component, all from the project's breakpoint set
  • Visual reordering (Grid placement, order) doesn't scramble DOM/tab order
  • aspect-ratio on media; no fixed-height image boxes

Integration

  • Consumes: spacing scale + breakpoint tokens from skills/frontend-design/design-foundation.
  • Produces: the page shell and layout patterns that skills/frontend-design/typography-system (measure, fluid type) and skills/frontend-design/visual-hierarchy-refactoring (whitespace, grouping) refine, and that skills/frontend-design/component-architecture encodes as reusable layout components.
  • Accessibility of the result is audited by skills/frontend-design/accessibility-excellence.

References

  • references/layout-patterns.md — copy-adaptable patterns: hero, card grid, sidebar+main, responsive nav, holy grail, sticky footer, container-query card, aspect-ratio media, plus the breakpoint table. Read when building any standard pattern.

FAQ

What does the layout-system skill do?

Fix or build responsive layout: page shells, grids, card layouts, sidebars, breakpoint strategy, container queries. Use when the user says 'this breaks on mobile', 'the layout is messy', 'things don't line up', 'our spacing is inconsistent between sections', 'make this responsive', 'center this properly', or asks for a dashboard/page/grid layout. Inspects existing CSS for layout smells (fixed widths, absolute positioning, media-query sprawl), then produces working layout code — refactored CSS/JSX with Grid/Flexbox decision rules applied, breakpoints derived from content, and a responsive verification checklist. Hands off pure spacing-token questions to design-foundation and text-readability questions to typography-system.

How do I install layout-system?

Run npx skills add https://github.com/sanky369/vibe-building-skills --skill layout-system in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/layout-system/ (personal) or .claude/skills/layout-system/ (project).

Which AI agents can use layout-system?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is layout-system safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains layout-system?

It is published by sanky369 in sanky369/vibe-building-skills. It has 94 recorded installs.

More from sanky369/vibe-building-skills

View all →

social-graphics

sanky369/vibe-building-skills

Produce platform-correct social media graphics: pick the right dimensions and layout per platform, write the headline/body/CTA copy, build the generation prompt, and generate the image via the repo's FAL.ai pipeline. Use whenever the user wants a social post visual, Instagram post/story/carousel, LinkedIn graphic, Twitter/X image, TikTok thumbnail, Pinterest pin, launch announcement graphic, or 'something to post about X' — even if they never name a platform. Also use to adapt one design across several platforms. Produces a Social Graphic Spec per asset (platform, dimensions, layout, copy, full generation prompt) plus generated images when FALAPIKEY is available.

Marketing & SEO603 installs

direct-response-copy

sanky369/vibe-building-skills

Open the skill to read its SKILL.md instructions.

Marketing & SEO398 installs

tweet-writer

sanky369/vibe-building-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing318 installs

typography-system

sanky369/vibe-building-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design258 installs

remotion-script-writer

sanky369/vibe-building-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing219 installs

product-video

sanky369/vibe-building-skills

Open the skill to read its SKILL.md instructions.

Media & Creative210 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs