From godmode
Implements responsive and adaptive layouts with CSS Grid, Flexbox, container queries, fluid typography, responsive images, and touch targets. For mobile-first designs across breakpoints.
How this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:responsiveThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `/godmode:responsive`, "responsive design", "mobile-first"
/godmode:responsive, "responsive design", "mobile-first"grep -r "@media\|@container" --include="*.css" \
--include="*.scss" -l 2>/dev/null | head -10
grep -r "srcset\|sizes" --include="*.html" \
--include="*.tsx" --include="*.jsx" -l 2>/dev/null
Framework: <React/Vue/Angular/vanilla>
CSS approach: <Tailwind/CSS Modules/SCSS/CSS-in-JS>
Target devices: 320px-1536px
Strategy: mobile-first (default) | desktop-first
IF new project: always mobile-first (min-width). IF legacy desktop app: desktop-first (max-width).
Fluid: percentage/relative units (text-heavy, blogs)
Responsive: breakpoint-based (complex layouts)
Intrinsic: CSS Grid auto-fit/minmax (component-level)
Container queries: component responds to container
Mobile-first breakpoints: sm: 640px, md: 768px, lg: 1024px, xl: 1280px
/* Auto-fit responsive card grid */
.card-grid {
display: grid;
grid-template-columns:
repeat(auto-fit, minmax(min(300px, 100%), 1fr));
gap: var(--spacing-6);
}
IF 2D layout (rows+columns): use Grid. IF 1D alignment (row of buttons): use Flexbox.
.card-container { container-type: inline-size; }
@container (min-width: 400px) {
.card { flex-direction: row; }
}
IF component used in sidebar AND main content: use container queries instead of viewport media queries.
:root {
--fluid-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
--fluid-lg: clamp(1.125rem, 0.95rem + 0.875vw, 1.5rem);
--fluid-xl: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}
IF using fixed px font sizes: replace with clamp(). Eliminates need for typography breakpoints.
<img src="hero-800.jpg"
srcset="hero-400.jpg 400w, hero-800.jpg 800w,
hero-1200.jpg 1200w"
sizes="(max-width: 640px) 100vw, 50vw"
loading="lazy" alt="..." />
Always: max-width: 100%; height: auto; on images.
Use <picture> for art direction (different crops).
Modern formats: AVIF > WebP > JPEG fallback.
@media (pointer: coarse) {
.button { min-height: 44px; min-width: 44px; }
}
@media (pointer: fine) {
.button { padding: 0.5rem 1rem; }
}
WCAG minimum touch target: 44x44px.
Stack on mobile (cards), scroll horizontal on desktop.
@media (max-width: 767px) {
.table thead { display: none; }
.table td { display: block; }
.table td::before { content: attr(data-label); }
}
[ ] No horizontal overflow 320px-1536px
[ ] All images use srcset+sizes or SVG
[ ] Touch targets >= 44x44px
[ ] Typography uses clamp() (no fixed px)
[ ] CSS Grid/Flexbox (no float layouts)
[ ] CLS < 0.1 (explicit dimensions on media)
[ ] Consistent media query direction
Append .godmode/responsive.tsv:
timestamp page viewport issue_type before after status
KEEP if: no overflow at any viewport AND CLS < 0.1.
DISCARD if: overflow detected OR CLS regressed.
STOP when FIRST of:
- No horizontal overflow 320px-1536px
- All images responsive
- All touch targets >= 44px
- CLS < 0.1 across viewports
On failure: git reset --hard HEAD~1. Never pause.
| Failure | Action |
|---|---|
| Layout breaks at breakpoint | Check fixed widths, use max-width |
| Images overflow mobile | max-width:100%; height:auto |
| Touch targets too small | Add padding, min 44x44px |
| Horizontal scroll | Find overflowing element in DevTools |
npx claudepluginhub arbazkhan971/godmodeImplements responsive layouts with container queries, fluid typography, CSS Grid, Flexbox, and mobile-first breakpoints for adaptive web interfaces across devices.
Implements responsive web layouts using mobile-first strategies, min-width breakpoints, fluid CSS Grid, container queries, srcset/picture images, 44x44px touch targets, and mobile-adapted tables.
Builds responsive web layouts using Flexbox, CSS Grid, media queries, and mobile-first approach for multi-device compatibility and flexible UIs.