Skip to main content
skill CX Codex

responsive-layout-builder — Claude Code skill: how to install

Equips Claude Code and other AI assistants with mobile-first layout patterns, Tailwind breakpoints, CSS Grid, and container queries.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OneWave-AI/claude-skills --skill responsive-layout-builder -a claude-code
Open on GitHub

What responsive-layout-builder does

This skill guides coding agents through responsive layout decisions using mobile-first standards. It includes practical examples for common structures: Holy Grail layouts, collapsible sidebars, auto-fitting card grids with minmax, sticky navigation headers, and column-based masonry layouts.

The instructions establish explicit criteria for selecting between Flexbox and CSS Grid. Flexbox is designated for one-dimensional distribution like navigation bars or card alignment, while Grid handles page structures, two-dimensional card layouts, and overlapping elements. Fluid typography templates using CSS clamp() and a viewport testing checklist from 320px to 1280px+ are also included.

The container query examples require Tailwind CSS v3.2 or newer, so older project setups will fail to compile those utility classes without updating dependencies.

What it helps with

  • build auto-fitting responsive card grids with CSS Grid and minmax
  • implement collapsible sidebar layouts with scrollable main panels
  • apply modern container queries to adapt components independently of screen size
  • configure fluid responsive typography across breakpoints using clamp()

Example prompts for the agent

  • Create an auto-fill responsive card grid using Tailwind CSS with minmax sizing.
  • Build a Holy Grail page layout with a sticky header and a sidebar that hides below 768px.
  • Refactor this card component to use Tailwind container queries instead of media queries.

How to install responsive-layout-builder

1Skills CLI (Vercel)

npx skills add OneWave-AI/claude-skills --skill responsive-layout-builder -a claude-code

2Manually: put the files in place

~/.claude/skills/responsive-layout-builder/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/responsive-layout-builder/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about responsive-layout-builder

How to install responsive-layout-builder in Claude Code?

Run npx skills add OneWave-AI/claude-skills --skill responsive-layout-builder -a claude-code in your terminal. You can also save the skill file directly to ~/.claude/skills/responsive-layout-builder/SKILL.md.

What does responsive-layout-builder do?

It provides coding assistants with patterns and decision matrices for responsive web layouts. The skill enforces mobile-first development across Flexbox, CSS Grid, media breakpoints, and container queries.

When does the skill instruct agents to use CSS Grid over Flexbox?

Grid is prescribed for overall page framing, card collections, complex two-dimensional alignments, and overlapping elements. Flexbox is reserved for navigation bars, item centering, and internal card alignment.

Source text

SKILL.md · MIT
---
name: responsive-layout-builder
description: Build responsive layouts with CSS Grid, Flexbox, and container queries. Use when creating responsive designs, fixing layout issues, or building mobile-first layouts.
---

# Responsive Layout Builder

## Instructions

When building responsive layouts:

1. **Identify the layout pattern** (grid, sidebar, cards, etc.)
2. **Start mobile-first**
3. **Use appropriate CSS technique** (Grid vs Flexbox)
4. **Add breakpoints** for larger screens
5. **Test across viewports**

## Breakpoints

```css
/* Tailwind defaults */
sm: 640px   /* Small devices */
md: 768px   /* Tablets */
lg: 1024px  /* Laptops */
xl: 1280px  /* Desktops */
2xl: 1536px /* Large screens */

/* Custom CSS */
@media (min-width: 640px) { }
@media (min-width: 768px) { }
@media (min-width: 1024px) { }
```

## Common Layout Patterns

### 1. Holy Grail Layout

```tsx
// Tailwind CSS
<div className="min-h-screen flex flex-col">
  <header className="h-16 bg-white border-b">Header</header>

  <div className="flex-1 flex">
    <aside className="hidden md:block w-64 bg-gray-50 border-r">
      Sidebar
    </aside>
    <main className="flex-1 p-6">
      Main Content
    </main>
  </div>

  <footer className="h-16 bg-white border-t">Footer</footer>
</div>
```

```css
/* Plain CSS */
.layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 768px) {
  .layout {
    grid-template-columns: 250px 1fr;
  }

  .header, .footer {
    grid-column: 1 / -1;
  }
}
```

### 2. Responsive Card Grid

```tsx
// Tailwind - Auto-fit cards
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
  {items.map(item => (
    <Card key={item.id} {...item} />
  ))}
</div>

// Auto-fill with minimum width
<div className="grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-6">
  {items.map(item => (
    <Card key={item.id} {...item} />
  ))}
</div>
```

```css
/* Plain CSS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
```

### 3. Sidebar Layout

```tsx
// Fixed sidebar, scrollable content
<div className="flex h-screen">
  <aside className="w-64 flex-shrink-0 overflow-y-auto border-r bg-gray-50">
    <nav className="p-4">Sidebar Nav</nav>
  </aside>

  <main className="flex-1 overflow-y-auto">
    <div className="p-6">Main Content</div>
  </main>
</div>

// Collapsible sidebar
<div className="flex h-screen">
  <aside className={cn(
    "flex-shrink-0 overflow-y-auto border-r bg-gray-50 transition-all",
    isOpen ? "w-64" : "w-16"
  )}>
    <nav className="p-4">...</nav>
  </aside>
  <main className="flex-1 overflow-y-auto p-6">...</main>
</div>
```

### 4. Hero Section

```tsx
<section className="relative min-h-[60vh] flex items-center justify-center px-4">
  {/* Background */}
  <div className="absolute inset-0 bg-gradient-to-br from-blue-600 to-purple-700" />

  {/* Content */}
  <div className="relative z-10 max-w-4xl mx-auto text-center text-white">
    <h1 className="text-4xl md:text-5xl lg:text-6xl font-bold">
      Headline Here
    </h1>
    <p className="mt-6 text-lg md:text-xl opacity-90 max-w-2xl mx-auto">
      Subheadline text goes here with more details.
    </p>
    <div className="mt-8 flex flex-col sm:flex-row gap-4 justify-center">
      <button className="px-8 py-3 bg-white text-blue-600 rounded-lg font-semibold">
        Primary CTA
      </button>
      <button className="px-8 py-3 border-2 border-white rounded-lg font-semibold">
        Secondary CTA
      </button>
    </div>
  </div>
</section>
```

### 5. Masonry Grid

```tsx
// CSS Columns approach
<div className="columns-1 sm:columns-2 lg:columns-3 gap-6 space-y-6">
  {items.map(item => (
    <div key={item.id} className="break-inside-avoid">
      <Card {...item} />
    </div>
  ))}
</div>
```

### 6. Sticky Header

```tsx
<header className="sticky top-0 z-50 bg-white/80 backdrop-blur-md border-b">
  <nav className="max-w-7xl mx-auto px-4 h-16 flex items-center justify-between">
    <Logo />
    <NavLinks className="hidden md:flex" />
    <MobileMenuButton className="md:hidden" />
  </nav>
</header>
```

## Container Queries (Modern)

```css
/* Define container */
.card-container {
  container-type: inline-size;
}

/* Query the container */
@container (min-width: 400px) {
  .card {
    display: flex;
    flex-direction: row;
  }
}
```

```tsx
// Tailwind v3.2+
<div className="@container">
  <div className="flex flex-col @md:flex-row">
    <img className="w-full @md:w-48" />
    <div className="p-4">Content</div>
  </div>
</div>
```

## Flexbox vs Grid Decision

| Use Flexbox | Use Grid |
|-------------|----------|
| Navigation bars | Page layouts |
| Card content alignment | Card grids |
| Centering content | Complex 2D layouts |
| Space distribution | Overlapping elements |
| Unknown item count | Defined structure |

## Responsive Typography

```tsx
// Fluid typography with clamp
<h1 className="text-[clamp(2rem,5vw,4rem)]">
  Responsive Heading
</h1>

// Tailwind responsive
<h1 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl">
  Responsive Heading
</h1>
```

## Testing Checklist

- [ ] 320px (small phones)
- [ ] 375px (iPhone)
- [ ] 768px (tablet portrait)
- [ ] 1024px (tablet landscape / laptop)
- [ ] 1280px+ (desktop)
- [ ] Test with actual content (not lorem ipsum)
- [ ] Test with long/short content variations

© OneWave-AI · MIT · OneWave-AI/claude-skills

Similar skills

Everything for Frontend and UI →

From the same set95

social-selling-content-generator Creates a 30-day LinkedIn calendar and engagement guide tailored to B2B sellers. Positions you as an authority and draws leads without pitching in the feed. CX Codex +1 380installs api-documentation-writer Generates developer documentation, OpenAPI specs, and code samples for REST, GraphQL, and gRPC APIs. It structures endpoints, error formats, and rate limits. CX Codex +1 368installs landing-page-optimizer A skill that walks a landing page through six steps: audit, layout, CTAs, speed, SEO and a queued A/B test list. Useful when conversions dip and you don't know where to start. CX Codex +1 361installs sales-methodology-implementer Turns a chosen sales methodology into discovery questions, deal scoring and a rep training plan. Useful when everyone qualifies deals differently. CX Codex +1 362installs objection-pattern-detector This skill scans notes from lost sales deals to uncover repeating buyer objections. It turns successful deal records into ready objection-handling playbooks. CX Codex +1 352installs financial-goal-planner Plan savings for a home down payment, retirement, or college with a timeline, monthly targets, and milestones. CX Codex +1 351installs conversation-archaeologist Mines past conversations into a living profile of you: writing style, business context, goals, habits. Other skills read it for context. CX Codex +1 352installs sales-coaching-plan-generator Builds individual development plans around a rep's weak spots: skill assessments, call reviews, ride-along checklists, certification tracking. CX Codex +1 345installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor