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.
npx skills add secondsky/claude-skills --skill responsive-web-design -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/responsive-web-design/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/responsive-web-design/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill responsive-web-design -a codex2Manually: put the files in place
.agents/skills/responsive-web-design/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill responsive-web-design -a cursor2Manually: put the files in place
.cursor/skills/responsive-web-design/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install secondsky/claude-skills responsive-web-design2Manually: put the files in place
.github/skills/responsive-web-design/SKILL.md1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill responsive-web-design -a gemini-cli2Platform CLI
gemini skills install https://github.com/secondsky/claude-skills --path plugins/responsive-web-design/skills/responsive-web-designManually: put the files in place
.devin/skills/responsive-web-design/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill responsive-web-design -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.