responsive-mobile-first
Skill2 starsChanged 4 months agoMITView on GitHub
Design and implement responsive, mobile-first layouts using fluid typography, container queries, and correct Tailwind/CSS breakpoint strategy. Use whenever the user builds any UI layout, mentions "responsive", "mobile", "breakpoints", asks why a layout breaks on small screens, or is building anything user-facing without specifying device — always assume mobile-first unless told otherwise.
In this repository22 other files it gives its agents.
- accessibility-a11ySkill
- design-system-tailwindSkill
- motion-design-toolkitSkill
- nextjs-architectureSkill
- react-component-engineeringSkill
- react-three-fiber-3dSkill
- auth-authorizationSkill
- database-schema-designSkill
- form-validation-error-handlingSkill
- mern-stack-architectureSkill
- rest-api-integrationSkill
- state-managementSkill
- landing-page-conversionSkill
- payment-gateway-integrationSkill
- saas-dashboard-adminSkill
- startup-mvp-developmentSkill
- ux-research-flow-designSkill
- visual-design-languageSkill
- ai-assisted-frontend-workflowSkill
- deployment-vercel-productionSkill
- performance-seo-optimizationSkill
- project-architecture-clean-codeSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Default posture: build for the smallest viewport first, then progressively enhance upward.
- Very specific: line 13
Don't skip straight to lg: for something that also needs to look right at md: — test the in-between.
- Very specific: line 16
Fluid typography: use clamp() (text-[clamp(1.5rem,4vw,2.5rem)] or a Tailwind plugin) for hero/display text instead of jumping abruptly at …
- Very specific: line 17
Layout primitives: prefer flex/grid with flex-wrap, grid-cols-1 md:grid-cols-2 lg:grid-cols-3 over fixed pixel widths.
- Very specific: line 21
Images/media: always constrain with max-w-full h-auto or next/image with sizes set correctly per breakpoint to avoid oversized downloads on …
- Distinctive: line 26
No horizontal scroll at any breakpoint unless explicitly intentional (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Responsive & Mobile-First Design Skill
Default posture: build for the smallest viewport first, then progressively enhance upward. Never build desktop-first and retrofit mobile with overrides.
Breakpoint strategy (Tailwind defaults, extend only if justified)
sm 640px · md 768px · lg 1024px · xl 1280px · 2xl 1536px
- Base (no prefix) styles = mobile (< 640px). Add
md:/lg:to layer in more complex layouts as space grows. - Don't skip straight to
lg:for something that also needs to look right atmd:— test the in-between.
Core patterns
- Fluid typography: use
clamp()(text-[clamp(1.5rem,4vw,2.5rem)]or a Tailwind plugin) for hero/display text instead of jumping abruptly at breakpoints. - Layout primitives: prefer
flex/gridwithflex-wrap,grid-cols-1 md:grid-cols-2 lg:grid-cols-3over fixed pixel widths. - Container queries (
@container) for components that must adapt to their parent's width, not the viewport — e.g. a Card that appears both in a narrow sidebar and a wide main column. - Touch targets: minimum 44×44px tappable area on interactive elements for mobile; increase spacing between adjacent tap targets.
- Navigation: collapse to a drawer/sheet below
md, not a squeezed horizontal nav. - Images/media: always constrain with
max-w-full h-autoornext/imagewithsizesset correctly per breakpoint to avoid oversized downloads on mobile.
Testing checklist before calling a layout done
- 375px (small phone), 768px (tablet), 1024px (small laptop), 1440px+ (desktop)
- Long content (long names, long numbers) doesn't break the layout at any width
- No horizontal scroll at any breakpoint unless explicitly intentional (e.g. a carousel)
- Touch targets ≥44px on mobile; hover-only interactions have a tap/focus equivalent
Anti-patterns to flag
- Hardcoded
width: 800pxon a container instead ofmax-w-3xl w-full - Desktop nav hidden with
hidden md:blockbut no mobile alternative provided - Font sizes fixed at desktop scale, causing overflow/wrapping on mobile
- Media queries scattered ad hoc instead of using the design system's breakpoint tokens
Example prompt this skill should trigger on
"Build a pricing page with 3 tiers — make sure it looks good on mobile too."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

