frontend-responsive-design
Use when the user asks about responsive layouts, mobile-first CSS, breakpoints, media queries, container queries, fluid typography with clamp(), dynamic…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-responsive-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Responsive Design
Purpose
Build mobile-first responsive UIs with container queries, consistent breakpoints, fluid typography, and no horizontal overflow.
Agent Protocol
Trigger
Exact user phrases: "responsive design", "container queries", "breakpoints", "mobile-first", "fluid typography", "responsive layout", "media queries", "clamp", "adaptive design".
Input Context
Before activating, verify:
- The CSS approach (Tailwind, vanilla CSS, CSS modules, styled-components).
- Whether the layout is page-level or component-level.
Output Artifact
No file output. Produces responsive CSS, layout code, or breakpoint config as text.
Response Format
Pattern: {name}
Breakpoint: {value}
CSS: {code block}
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Mobile-first: base styles are mobile, media queries add complexity at larger screens.
- Breakpoints use consistent logical values (no arbitrary pixel values).
- Container queries used for reusable components instead of viewport media queries.
- Fluid typography via
clamp()— no fixed font sizes. - No horizontal scroll at any breakpoint.
- Touch targets at least 44x44px on mobile.
Max Response Length
4096 tokens.
Responsive Design Architecture / Decision Trees
Responsive Approach Decision Tree
Page-level layout or component-level?
|-- Page-level (header, main grid, footer) -->
| Viewport media queries are appropriate
| Use standard breakpoints (640/768/1024/1280)
| Mobile-first: base = mobile, expand via min-width
|
|-- Component-level (card, sidebar, widget) -->
| Container queries preferred (container-type: inline-size)
| Component responds to its own container, not the viewport
| Fallback: viewport media queries for older browsers
|
|-- Typography -->
Fluid: clamp() with viewport-relative preferred value
Scale: --text-sm to --text-2xl as fluid values
Breakpoint Strategy Decision Tree
How many unique layouts?
|-- 2 (mobile + desktop) -->
| Single breakpoint: 768px
| Simple, manageable, fewer edge cases
|
|-- 3 (mobile + tablet + desktop) -->
| Breakpoints: 640px + 1024px
| Balance between specificity and complexity
|
|-- 4+ (fine-grained responsive) -->
| Breakpoints: 640px + 768px + 1024px + 1280px
| Use CSS custom properties: --bp-sm, --bp-md, etc.
|
|-- Component-level -->
Container queries with breakpoints at 300px, 400px, 600px
These are container-relative, not viewport-relative
Layout Decision Tree
Number of columns needed?
|-- Fixed (2 columns on mobile, 3 on desktop) -->
| CSS Grid with media queries or container queries
| grid-template-columns: 1fr 1fr (mobile) → 1fr 1fr 1fr (desktop)
|
|-- Fluid (automatic columns based on available space) -->
| CSS Grid with auto-fill + minmax
| grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr))
|
|-- Sidebar + content -->
| |-- Mobile: stack vertically (sidebar on top)
| |-- Desktop: grid with sidebar-fixed + content-fluid
Workflow
Step 1: Mobile-First Base Styles
/* Mobile first — base styles target mobile */
.card {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 1rem;
}
/* Then expand for larger screens */
@media (min-width: 768px) {
.card {
flex-direction: row;
padding: 1.5rem;
}
}
Step 2: Consistent Breakpoint System
/* Define once, use everywhere */
:root {
--bp-sm: 640px;
--bp-md: 768px;
--bp-lg: 1024px;
--bp-xl: 1280px;
}
/* Usage with Tailwind-like approach */
@media (min-width: 640px) { /* sm */ }
@media (min-width: 768px) { /* md */ }
@media (min-width: 1024px) { /* lg */ }
@media (min-width: 1280px) { /* xl */ }
Step 3: Container Queries
/* Define container */
.card-container {
container-type: inline-size;
container-name: card;
}
/* Query based on container width, not viewport */
@container card (min-width: 400px) {
.card {
flex-direction: row;
}
}
@container card (min-width: 600px) {
.card {
display: grid;
grid-template-columns: 200px 1fr;
}
}
Step 4: Fluid Typography
/* clamp(min, preferred, max) */
h1 {
font-size: clamp(1.5rem, 4vw + 1rem, 3rem);
line-height: 1.1;
}
p {
font-size: clamp(0.875rem, 1vw + 0.75rem, 1.125rem);
line-height: 1.6;
}
/* Fluid type scale */
--text-sm: clamp(0.75rem, 0.5vw + 0.625rem, 0.875rem);
--text-base: clamp(0.875rem, 1vw + 0.75rem, 1.125rem);
--text-lg: clamp(1rem, 1.5vw + 0.75rem, 1.375rem);
--text-xl: clamp(1.25rem, 2vw + 0.75rem, 1.75rem);
--text-2xl: clamp(1.5rem, 3vw + 0.75rem, 2.25rem);
Step 5: Responsive Layout Grid
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px)
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/breakpoint-systems.md
- references/container-queries.md
- references/responsive-images.md
- references/responsive-patterns.md
- references/responsive-testing.md
- references/responsive-typography.md
FAQ
Что делает скилл frontend-responsive-design?
Use when the user asks about responsive layouts, mobile-first CSS, breakpoints, media queries, container queries, fluid typography with clamp(), dynamic viewport units or responsive grids. Produces a breakpoint system and responsive component CSS. Not for responsive images (use frontend-image-optimization) or native mobile layout (use mobile-patterns).
Как установить скилл frontend-responsive-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-responsive-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…