responsive-design-advisor
Design responsive layouts with breakpoints, mobile-first approach, and flexible grids. Use when creating responsive designs, implementing breakpoints, or optimizing for multiple screen sizes.
What this skill does
# Responsive Design Advisor
Design responsive layouts that work across all device sizes.
## Quick Start
Use mobile-first approach, flexible units (rem, %), CSS Grid/Flexbox, and test on real devices.
## Instructions
### Mobile-First Approach
**Start with mobile, enhance for larger screens:**
```css
/* Base styles (mobile) */
.container {
padding: 1rem;
}
/* Tablet */
@media (min-width: 768px) {
.container {
padding: 2rem;
}
}
/* Desktop */
@media (min-width: 1024px) {
.container {
padding: 3rem;
max-width: 1200px;
margin: 0 auto;
}
}
```
### Common Breakpoints
**Standard breakpoints:**
```css
/* Mobile: 0-639px (default) */
/* Tablet: 640px+ */
@media (min-width: 640px) { }
/* Laptop: 1024px+ */
@media (min-width: 1024px) { }
/* Desktop: 1280px+ */
@media (min-width: 1280px) { }
/* Large: 1536px+ */
@media (min-width: 1536px) { }
```
**Tailwind breakpoints:**
```jsx
<div className="
w-full // Mobile
md:w-1/2 // Tablet
lg:w-1/3 // Desktop
">
Content
</div>
```
### Flexible Layouts
**CSS Grid:**
```css
.grid {
display: grid;
gap: 1rem;
/* Mobile: 1 column */
grid-template-columns: 1fr;
}
@media (min-width: 768px) {
.grid {
/* Tablet: 2 columns */
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.grid {
/* Desktop: 3 columns */
grid-template-columns: repeat(3, 1fr);
}
}
```
**Auto-fit grid:**
```css
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
```
**Flexbox:**
```css
.flex-container {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.flex-item {
flex: 1 1 100%; /* Mobile: full width */
}
@media (min-width: 768px) {
.flex-item {
flex: 1 1 calc(50% - 0.5rem); /* Tablet: 2 columns */
}
}
@media (min-width: 1024px) {
.flex-item {
flex: 1 1 calc(33.333% - 0.667rem); /* Desktop: 3 columns */
}
}
```
### Responsive Typography
**Fluid typography:**
```css
h1 {
font-size: clamp(2rem, 5vw, 4rem);
}
p {
font-size: clamp(1rem, 2vw, 1.125rem);
}
```
**Responsive scale:**
```css
/* Mobile */
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
p { font-size: 1rem; }
/* Desktop */
@media (min-width: 1024px) {
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
p { font-size: 1.125rem; }
}
```
### Responsive Images
**Responsive image:**
```css
img {
max-width: 100%;
height: auto;
}
```
**Art direction:**
```jsx
<picture>
<source
media="(min-width: 1024px)"
srcSet="desktop.jpg"
/>
<source
media="(min-width: 768px)"
srcSet="tablet.jpg"
/>
<img src="mobile.jpg" alt="Description" />
</picture>
```
**Responsive background:**
```css
.hero {
background-image: url('mobile.jpg');
}
@media (min-width: 768px) {
.hero {
background-image: url('tablet.jpg');
}
}
@media (min-width: 1024px) {
.hero {
background-image: url('desktop.jpg');
}
}
```
### Container Queries
**Component-based responsive:**
```css
.card-container {
container-type: inline-size;
}
.card {
padding: 1rem;
}
@container (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 1fr 2fr;
}
}
```
### Navigation Patterns
**Mobile menu:**
```jsx
function Navigation() {
const [isOpen, setIsOpen] = useState(false);
return (
<nav>
{/* Mobile: Hamburger */}
<button
className="md:hidden"
onClick={() => setIsOpen(!isOpen)}
>
Menu
</button>
{/* Mobile: Drawer */}
<div className={`
fixed inset-0 bg-white transform transition-transform
${isOpen ? 'translate-x-0' : '-translate-x-full'}
md:relative md:translate-x-0
`}>
<ul className="flex flex-col md:flex-row">
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</div>
</nav>
);
}
```
### Touch Targets
**Minimum size:**
```css
button, a {
min-height: 44px; /* iOS recommendation */
min-width: 44px;
padding: 0.75rem 1rem;
}
```
**Touch-friendly spacing:**
```css
.button-group button {
margin: 0.5rem; /* Space between touch targets */
}
```
### Viewport Units
**Full height:**
```css
.hero {
height: 100vh; /* Viewport height */
height: 100dvh; /* Dynamic viewport (mobile) */
}
```
**Responsive spacing:**
```css
.section {
padding: 5vw; /* Scales with viewport */
}
```
### Common Patterns
**Sidebar layout:**
```css
.layout {
display: grid;
gap: 2rem;
/* Mobile: Stack */
grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
.layout {
/* Desktop: Sidebar + main */
grid-template-columns: 250px 1fr;
}
}
```
**Card grid:**
```css
.cards {
display: grid;
gap: 1rem;
/* Mobile: 1 column */
grid-template-columns: 1fr;
}
@media (min-width: 640px) {
.cards {
/* Tablet: 2 columns */
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.cards {
/* Desktop: 3 columns */
grid-template-columns: repeat(3, 1fr);
}
}
@media (min-width: 1280px) {
.cards {
/* Large: 4 columns */
grid-template-columns: repeat(4, 1fr);
}
}
```
**Hero section:**
```css
.hero {
padding: 2rem 1rem;
text-align: center;
}
@media (min-width: 768px) {
.hero {
padding: 4rem 2rem;
}
}
@media (min-width: 1024px) {
.hero {
padding: 6rem 3rem;
text-align: left;
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
}
}
```
### Testing
**Browser DevTools:**
- Chrome: Device toolbar (Cmd+Shift+M)
- Firefox: Responsive Design Mode
- Safari: Enter Responsive Design Mode
**Test on real devices:**
- iPhone (various sizes)
- Android phones
- Tablets
- Different browsers
**Responsive testing tools:**
- BrowserStack
- LambdaTest
- Responsively App
## Responsive Checklist
**Layout:**
- [ ] Mobile-first approach
- [ ] Flexible grid system
- [ ] No horizontal scrolling
- [ ] Content readable at all sizes
**Typography:**
- [ ] Readable font sizes (16px+ body)
- [ ] Appropriate line height
- [ ] Fluid typography for headings
- [ ] Proper text wrapping
**Images:**
- [ ] Responsive images
- [ ] Appropriate sizes for devices
- [ ] Fast loading
- [ ] Art direction where needed
**Navigation:**
- [ ] Mobile menu pattern
- [ ] Touch-friendly targets (44px+)
- [ ] Easy to use on mobile
- [ ] Accessible
**Performance:**
- [ ] Fast on mobile networks
- [ ] Optimized images
- [ ] Minimal layout shifts
- [ ] Touch interactions smooth
## Best Practices
**Use relative units:**
```css
/* Good */
padding: 1rem;
font-size: 1.125rem;
width: 80%;
/* Avoid */
padding: 16px;
font-size: 18px;
width: 800px;
```
**Test early and often:**
- Test on mobile first
- Use real devices
- Test different orientations
- Test with slow connections
**Progressive enhancement:**
- Core functionality works on all devices
- Enhanced features for larger screens
- Graceful degradation
```
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.