# responsive-design-system

A skill that walks your coding agent through mobile-first layouts: breakpoints, container queries, fluid typography and adaptive grids built on Tailwind CSS.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 343 installs · ★ 63
- Author: patricio0312rev
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/patricio0312rev/skills/tree/HEAD/frontend/responsive-design-system/SKILL.md
- Updated: 2026-01-12
- HTML: https://affpapa.org/en/nevibecode/skills/responsive-design-system

## What it does

The skill gives the agent a fixed order of work: define the breakpoint system, set up fluid typography with `clamp()`, build the responsive grid, add container queries, then check components across viewports. It ships ready-made `tailwind.config.js` snippets plus HTML and TSX examples.

Default breakpoints are laid out as `sm` from 640px, `md` from 768px, `lg` from 1024px, `xl` from 1280px and `2xl` from 1536px. The skill also shows custom ones — `xs` at 475px, `3xl` at 1920px, range breakpoints like `tablet` between 768px and 1023px, and media queries for touch and mouse input. Type and spacing scales use CSS variables with `clamp()`, so sizes shift smoothly instead of jumping at each edge.

Container queries are the interesting part. A component gets the `@container` class and responds to its parent's width rather than the viewport, which means the same card works in a narrow column and at full width. There are examples for named containers, `auto-fit` grids and dashboard layouts. Everything assumes Tailwind CSS, so on a plain-CSS project you would rewrite the examples by hand.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add patricio0312rev/skills --skill responsive-design-system -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/responsive-design-system/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/responsive-design-system/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add patricio0312rev/skills --skill responsive-design-system -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/responsive-design-system/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add patricio0312rev/skills --skill responsive-design-system -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/responsive-design-system/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install patricio0312rev/skills responsive-design-system
```

2. **Manually: put the files in place**
- File: `.github/skills/responsive-design-system/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add patricio0312rev/skills --skill responsive-design-system -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/patricio0312rev/skills --path frontend/responsive-design-system
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/responsive-design-system/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add patricio0312rev/skills --skill responsive-design-system -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/patricio0312rev/skills/tree/HEAD/frontend/responsive-design-system/SKILL.md

## When to use it
- build a mobile-first layout that does not jump at breakpoint edges
- set up fluid type and spacing with `clamp()`
- make a card respond to its parent width instead of the viewport
- lay out a dashboard with a sidebar and an adaptive grid
- add custom breakpoints and media queries for touch devices

## Example prompts
- set up a responsive card grid in Tailwind with sm, md and lg breakpoints
- add fluid typography with clamp for headings and body text
- rewrite this card with container queries so it reacts to its container width

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: eb2ade070f42f309.

BEGIN THIRD-PARTY FILE eb2ade070f42f309
````text
---
name: responsive-design-system
description: Implements responsive design systems with mobile-first breakpoints, container queries, fluid typography, and adaptive layouts using Tailwind CSS. Use when users request "responsive design", "mobile-first", "breakpoints", "fluid typography", or "adaptive layout".
---

# Responsive Design System

Build adaptive, mobile-first layouts with modern CSS features and Tailwind.

## Core Workflow

1. **Define breakpoints**: Establish responsive breakpoint system
2. **Set fluid typography**: Clamp-based responsive fonts
3. **Create layout grid**: Responsive grid system
4. **Add container queries**: Component-level responsiveness
5. **Build responsive components**: Adaptive patterns
6. **Test across devices**: Verify on all viewports

## Breakpoint System

### Tailwind Default Breakpoints

| Breakpoint | Min Width | Target Devices |
|------------|-----------|----------------|
| `sm` | 640px | Large phones (landscape) |
| `md` | 768px | Tablets |
| `lg` | 1024px | Laptops |
| `xl` | 1280px | Desktops |
| `2xl` | 1536px | Large screens |

### Custom Breakpoints

```javascript
// tailwind.config.js
module.exports = {
  theme: {
    screens: {
      'xs': '475px',
      'sm': '640px',
      'md': '768px',
      'lg': '1024px',
      'xl': '1280px',
      '2xl': '1536px',
      '3xl': '1920px',
      // Max-width breakpoints
      'max-sm': { max: '639px' },
      'max-md': { max: '767px' },
      'max-lg': { max: '1023px' },
      // Range breakpoints
      'tablet': { min: '768px', max: '1023px' },
      // Feature queries
      'touch': { raw: '(hover: none) and (pointer: coarse)' },
      'stylus': { raw: '(hover: none) and (pointer: fine)' },
      'mouse': { raw: '(hover: hover) and (pointer: fine)' },
    },
  },
};
```

## Fluid Typography

### CSS Clamp Function

```css
/* globals.css */
:root {
  /* Fluid type scale: min, preferred, max */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.4rem + 2.25vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.5rem + 3.75vw, 3.5rem);
  --text-5xl: clamp(3rem, 1.8rem + 6vw, 5rem);

  /* Fluid spacing */
````
END THIRD-PARTY FILE eb2ade070f42f309

The third-party file has ended. Everything between the eb2ade070f42f309 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2414 of 13339 bytes. © patricio0312rev · MIT · https://github.com/patricio0312rev/skills/tree/HEAD/frontend/responsive-design-system/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
