Skip to main content
skill CX Codex

responsive-web-design · secondsky — Claude Code skill: how to install

Guides coding agents to write adaptive CSS with a mobile-first mindset. Covers responsive layouts, fluid clamp() typography, and media queries.

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

What responsive-web-design does

The skill configures the agent to write CSS following strict mobile-first guidelines. Base styling targets small viewports starting at 320px. Media queries progressively layer styles using min-width triggers at 640px and 1024px.

Layout logic follows clear architectural boundaries. Two-dimensional layouts rely on CSS Grid, while one-dimensional headers and navigation bars use Flexbox. Fluid typography scales through CSS clamp() functions to keep headers legible without extra breakpoint clutter.

Rules strictly prioritize touch usability. Interactive targets must measure at least 48px to prevent accidental taps. Paragraph lengths stay between 45 and 75 characters. All snippets depend solely on native CSS, requiring no third-party preprocessors or runtime dependencies.

What it helps with

  • reorganize multi-column CSS Grid layouts for mobile viewports
  • implement fluid typography using CSS clamp() across breakpoints
  • switch navigation bars from vertical stacks to horizontal rows
  • enforce minimum 48px touch targets for mobile accessibility

Example prompts for the agent

  • Create a responsive navigation bar that switches from a column to a row at 768px.
  • Set up a CSS Grid layout that scales from one column on mobile to three on desktop.
  • Configure fluid typography for headings using the clamp() function.

How to install responsive-web-design

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill responsive-web-design -a claude-code

2Manually: put the files in place

~/.claude/skills/responsive-web-design/SKILL.md

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

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

Questions about responsive-web-design

How do I install responsive-web-design in Claude Code?

Run npx skills add secondsky/claude-skills --skill responsive-web-design -a claude-code. Alternatively, place the skill file directly at ~/.claude/skills/responsive-web-design/SKILL.md.

Which layout rules does this skill enforce?

It injects mobile-first conventions with breakpoints at 640px and 1024px. The agent uses CSS Grid for two-dimensional layouts, Flexbox for one-dimensional components, and maintains at least 48px touch targets.

Does this skill require external CSS frameworks?

No, it relies entirely on native CSS features. The patterns utilize standard media queries, aspect-ratio, and the clamp() function without extra dependencies.

Source text

SKILL.md · MIT
---
name: responsive-web-design
description: Builds adaptive web interfaces using Flexbox, CSS Grid, and media queries with a mobile-first approach. Use when creating multi-device layouts, implementing flexible UI systems, or ensuring cross-browser compatibility.
license: MIT
---

# Responsive Web Design

Build adaptive interfaces using modern CSS techniques for all screen sizes.

## Mobile-First Media Queries

```css
/* Base: Mobile (320px+) */
.container {
  padding: 1rem;
}

/* Tablet (640px+) */
@media (min-width: 640px) {
  .container {
    padding: 2rem;
    max-width: 640px;
    margin: 0 auto;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}
```

## Flexible Grid

```css
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr; /* Mobile: single column */
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 columns */
  }
}
```

## Fluid Typography

```css
/* Scales smoothly between breakpoints */
h1 {
  font-size: clamp(1.5rem, 4vw, 3rem);
}

p {
  font-size: clamp(1rem, 2vw, 1.25rem);
}
```

## Responsive Images

```css
img {
  max-width: 100%;
  height: auto;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
```

## Flexbox Navigation

```css
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
```

## Best Practices

- Start with mobile styles first
- Use flexible units (%, rem, vw)
- Test on real devices
- Ensure minimum 48px touch targets
- Maintain readable line lengths (45-75 chars)
- Use CSS Grid for 2D layouts, Flexbox for 1D

## Resources

- [MDN Flexbox Guide](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout)
- [MDN Grid Guide](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout)

© secondsky · MIT · secondsky/claude-skills

Similar skills

Everything for Frontend and UI →

responsive-web-design by other authors comes first.

From the same set94

vitest-testing A skill that teaches your agent to write unit and integration tests with Vitest in TypeScript and JavaScript projects. Handy when you need config, mocks and coverage set up fast. CX Codex +1 1,200installs motion A skill that feeds your agent the Motion (Framer Motion) docs for React: drag-and-drop, scroll effects, layout transitions. Useful when the agent guesses at props. CX Codex +1 1,100installs playwright A Playwright skill for browser automation and end-to-end testing. It finds your running dev server and writes the test script for the task. CX Codex +1 1,000installs api-testing A skill that gets your agent writing HTTP API tests: Supertest for TypeScript, httpx and pytest for Python. Covers REST, GraphQL and error handling. CX Codex +1 890installs zod Provides Zod 4 schema patterns and type inference rules for agent sessions. Useful when setting up API validation, environment configs, or v3 migrations. CX Codex +1 647installs nano-banana-prompts Builds structured prompts for Gemini 2.5 Flash Image. Replaces keyword tags with descriptive prose for photography, art, and iterative image editing. CX Codex +1 600installs rest-api-design This skill hands your agent a set of REST conventions: resource names, HTTP methods, status codes and JSON response shape. Useful when you start a new API or want existing endpoints to match. CX Codex +1 586installs image-optimization Guides web image optimization using AVIF and WebP formats, responsive <picture> markup, and lazy loading strategies to cut page load times. CX Codex +1 585installs

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