Skip to content
Back to skills

Layout Builder

ASecurity

Interactive Flexbox and Grid layout generator with real-time code output. Creates production-ready layouts based on your requirements with proper fallbacks and responsive considerations. Use when building layouts, grids, or complex positioning systems.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 9, 2026
developmentgo

Works with

  • cursor

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill layout-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Layout Builder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Layout Builder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-layout-builder/badge)](https://www.skillsdirectory.com/skills/majiayu000-layout-builder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: layout-builder
description: Interactive Flexbox and Grid layout generator with real-time code output. Creates production-ready layouts based on your requirements with proper fallbacks and responsive considerations. Use when building layouts, grids, or complex positioning systems.
allowed-tools: Read, Write, Edit
---

# Layout Builder Skill

This skill helps you create modern CSS layouts using Flexbox and CSS Grid through an interactive process. I'll guide you through layout requirements and generate production-ready, responsive code.

## What I Can Help With

### Flexbox Layouts
- Horizontal and vertical navigation bars
- Card grids with flexible wrapping
- Holy grail layouts (header, footer, sidebar, main content)
- Centered content (horizontal, vertical, or both)
- Equal-height columns
- Space distribution patterns
- Flexible forms and button groups

### CSS Grid Layouts
- Responsive grid systems
- Dashboard layouts with named grid areas
- Magazine-style layouts
- Asymmetric grids
- Sidebar + content layouts
- Card masonry layouts
- Complex multi-column designs

### Responsive Patterns
- Mobile-first responsive layouts
- Container query-based layouts
- Fluid grids with auto-fit/auto-fill
- Breakpoint-based layout changes
- Responsive navigation patterns

## How To Use This Skill

I'll ask you questions about your layout needs and generate the CSS code. Here's what I need to know:

1. **Layout Type**: Flexbox, Grid, or combination?
2. **Purpose**: What are you building? (navigation, card grid, page layout, etc.)
3. **Responsiveness**: Mobile-first? Desktop-first? Specific breakpoints?
4. **Constraints**: Fixed widths, minimum/maximum sizes, gaps/spacing?
5. **Content**: Number of items, variable content lengths?

## Example Interactions

### Example 1: Card Grid

**You**: "I need a responsive card grid that shows 1 column on mobile, 2 on tablet, and 3 on desktop"

**I will provide**:
```css
/* Responsive card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

/* Card styling */
.card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
```

### Example 2: Navbar

**You**: "Create a responsive navbar with logo on left, nav items in center, and button on right"

**I will provide**:
```css
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar__logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar__nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar__nav a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.navbar__nav a:hover {
  color: #0066cc;
}

.navbar__button {
  padding: 0.5rem 1.5rem;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .navbar__nav {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}
```

## Layout Patterns I Know

### Flexbox Patterns

#### Center Anything
```css
.center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
```

#### Sidebar Layout
```css
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  flex: 0 0 250px;
}

.main {
  flex: 1;
}
```

#### Card Row
```css
.card-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.card {
  flex: 1 1 300px;
}
```

### Grid Patterns

#### Holy Grail Layout
```css
.layout {
  display: grid;
  grid-template-areas:
    "header header header"
    "nav main aside"
    "footer footer footer";
  grid-template-columns: 200px 1fr 200px;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  gap: 1rem;
}

.header { grid-area: header; }
.nav { grid-area: nav; }
.main { grid-area: main; }
.aside { grid-area: aside; }
.footer { grid-area: footer; }
```

#### Dashboard Grid
```css
.dashboard {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.widget-large {
  grid-column: span 8;
}

.widget-small {
  grid-column: span 4;
}
```

## Best Practices I Follow

✓ **Mobile-first approach** - Start with mobile layout, enhance for larger screens
✓ **Semantic HTML** - Use appropriate HTML elements with layout CSS
✓ **Flexible units** - Use relative units (rem, %, fr) over fixed pixels
✓ **Gap instead of margins** - Use gap property for consistent spacing
✓ **Logical properties** - Support RTL languages with logical properties
✓ **Container queries** - Use when available for truly responsive components
✓ **Fallbacks** - Provide fallbacks for older browsers when needed
✓ **Accessibility** - Maintain logical DOM order, ensure keyboard navigation works

## When To Use Which Layout System

### Use Flexbox When:
- Creating one-dimensional layouts (rows or columns)
- Items need to wrap and reflow
- Content size should drive layout
- Building navigation, toolbars, or button groups
- Centering content
- Distributing space between items

### Use Grid When:
- Creating two-dimensional layouts (rows AND columns)
- Items need precise placement
- Creating responsive layouts without media queries
- Building page layouts with defined areas
- Creating complex asymmetric layouts
- Need alignment in both directions

### Use Both When:
- Grid for overall page structure
- Flexbox for components within grid cells
- Complex layouts requiring both approaches

## Just Ask!

Tell me what layout you need, and I'll guide you through creating it with modern, responsive CSS. I'll ask clarifying questions if needed and provide complete, production-ready code.

**Example requests:**
- "I need a 3-column responsive layout"
- "Create a centered modal dialog"
- "Build a sticky footer layout"
- "Make a magazine-style grid"
- "Design a responsive navigation menu"
- "Create a dashboard layout with widgets"

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.