design-mobile-first
Skill9 starsChanged 42 days agoMITView on GitHub
Design a new touch-first UI: targets, safe areas, gestures, then enhance up. Use when building for phones, touch, swipe, PWA, or tablet. Responsive audit → audit-responsive.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- kensaurus/skillsedited, first seen Oct 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- kensaurus/skills★ 929% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository165 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/approved-plan-execution.mdcCursor rule
- .cursor/rules/skill-workflows.mdcCursor rule
- .cursor/rules/verification-before-completion.mdcCursor rule
- llms.txtllms.txt
- audit-accessibilitySkill
- audit-agent-speedSkill
- audit-analyticsSkill
- audit-auth-flowsSkill
- audit-backend-architectureSkill
- audit-bundle-sizeSkill
- audit-cicdSkill
- audit-codemod-safetySkill
- audit-code-qualitySkill
- audit-code-reviewSkill
- audit-db-schemaSkill
- audit-doctrineSkill
- audit-env-paritySkill
- audit-fe-apiSkill
- audit-gate-logicSkill
- audit-i18nSkill
- audit-infra-costSkill
- audit-langfuse-llmSkill
- audit-llm-securitySkill
- audit-monetization-iapSkill
- audit-payment-systemSkill
- audit-performanceSkill
- audit-realworldSkill
- audit-registry-listingSkill
- audit-resilienceSkill
- audit-responsiveSkill
- audit-securitySkill
- audit-skill-conflictsSkill
- audit-ui-statesSkill
- audit-uiux-design-systemSkill
- audit-ux-journeysSkill
- audit-uxSkill
- backend-db-performanceSkill
- backend-error-handlingSkill
- backend-observabilitySkill
- backend-patternsSkill
- backend-realtimeSkill
- burndown-fullSkill
- complete-everythingSkill
- data-pipelineSkill
- data-visualizationSkill
- debug-errorSkill
- debug-fe-be-integrationSkill
- debug-sentry-monitorSkill
- deploy-npmSkill
- deploy-verifySkill
- design-apiSkill
- design-canvasSkill
- design-emailSkill
- design-frontendSkill
- design-generative-artSkill
- design-motionSkill
- design-prdSkill
- design-systemSkill
- design-themeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 122
When the UI ships inside a native shell, the platform already owns the chrome: a system tab bar (3–5 destinations), sheets for secondary …
- Very specific: line 124
Do not rebuild it in JS or HTML.
- Distinctive: line 168
Run at a 390×844 viewport, then on a real phone:
≈ “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
Mobile-First Design Skill
Degree of freedom: MIXED. Pattern choice [HIGH freedom]; breakpoint,
viewport, and existing-hook inventory [LOW freedom — run exactly].
Build interfaces that work on mobile first, then enhance for larger screens.
Not this skill: a desktop that is a linearized phone (no max-width, stacked
at 1440, stretched buttons). That is audit-responsive.
How to reason
- Survey — breakpoints, viewport, existing mobile hooks
- Base — mobile styles first (44px, safe-area)
- Enhance —
sm:/md:/lg:add up; they do not replace the base - Device-check — real phone, not only a resized desktop window
Worked example
Survey: Tailwind
sm/md/lgexist; checkout CTA ish-8; nosafe-area-inset-bottom. Base:min-h-[44px],pb-[env(safe-area-inset-bottom)], stacked fields, 16px inputs. Enhance: two-column names atsm:; table replaces cards atmd:. Device-check: thumb reaches the CTA; iOS does not zoom on focus.
Self-critique before reporting
- Base is mobile — primary layout is not
lg:-only - 44px + safe-area — tap targets and notches were measured
- No drag-only action — every swipe or drag has a tap alternative (WCAG 2.5.7)
- Real device — not emulator-or-resize only
- Right owner — linearized 1440 desktop →
audit-responsive; an existing app that feels like a website →enhance-mobile-native-feel; hybrid web + native axes →enhance-capacitor-ui
Check existing first [LOW freedom — run exactly]
Before ANY mobile optimization, verify:
- Check existing breakpoints:
cat tailwind.config.* | grep -A10 "screens\|breakpoints"
rg "sm:|md:|lg:|xl:" --type tsx | head -20- Check for existing mobile patterns:
rg "useMediaQuery|useBreakpoint|isMobile" --type ts --type tsx
ls -la src/hooks/use*Mobile* src/hooks/use*Responsive* 2>/dev/null- Check viewport meta:
rg "viewport" src/app/layout.tsx index.htmlWhy: Maintain consistent responsive patterns across the app.
Mobile-First Principles [HIGH freedom]
1. Design for Mobile First
Base styles are mobile; media queries and sm:/md:/lg: prefixes only add (p-4 sm:p-6 md:p-8, text-sm sm:text-base lg:text-lg, grid-cols-1 sm:grid-cols-2 lg:grid-cols-3).
.card {
padding: 1rem;
font-size: 0.875rem;
}
@media (min-width: 640px) {
.card {
padding: 1.5rem;
font-size: 1rem;
}
}2. Touch Targets (44px goal, 24px floor)
Size every control to 44×44 CSS px (Apple's default control size; WCAG 2.5.5 AAA); 48 when
the page ships in an Android shell (Material's 48dp). WCAG 2.2 SC 2.5.8 (AA) is the floor:
24×24 CSS px, or a 24px-diameter circle around a smaller target that touches no other
target. List items too: py-3 px-4 min-h-[44px] active:bg-muted. Icon buttons extend the
hit area with negative margin.
<button className="min-h-[44px] min-w-[44px] px-4 py-3">
Tap me
</button>
<button
className="p-3 -m-3" // Negative margin extends touch area
aria-label="Menu"
>
<MenuIcon className="h-5 w-5" />
</button>3. Thumb-Friendly Zones
Primary actions in a fixed bottom nav; .safe-area-pb { padding-bottom: env(safe-area-inset-bottom); } for notched devices.
A fixed bar can hide the focused field: set html { scroll-padding-bottom: <bar height> }
(and scroll-padding-top for a sticky header) so keyboard focus is never fully covered
(WCAG 2.4.11, technique C43).
<nav className="fixed bottom-0 left-0 right-0 border-t bg-background safe-area-pb">
<div className="flex justify-around py-2">
<NavItem icon={HomeIcon} label="Home" />
<NavItem icon={SearchIcon} label="Search" />
<NavItem icon={PlusIcon} label="Create" />
<NavItem icon={BellIcon} label="Alerts" />
<NavItem icon={UserIcon} label="Profile" />
</div>
</nav>Responsive Patterns
Native shell first (Expo / Capacitor, 2026)
When the UI ships inside a native shell, the platform already owns the chrome: a
system tab bar (3–5 destinations), sheets for secondary flows, edge-to-edge insets.
Do not rebuild it in JS or HTML. The version-gated APIs live in
enhance-mobile-native-feel (references/stack-recipes.md); Capacitor bars, insets,
and keyboard live in mobile-capacitor-platform. The drawer below is the web / PWA pattern.
Mobile Navigation (web / PWA)
A slide-in drawer with backdrop, spring transition, and a close control. Full component in
references/web-nav-drawer.md. Keep it lg:hidden; on native shells the system tab bar replaces it.
Responsive Tables
Card layout in a md:hidden stack on mobile; a hidden md:table traditional table on desktop, both mapping the same data.
Full component: references/components.md §Responsive Tables.
Responsive Grid
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">Auto-fit variant (grid-cols-[repeat(auto-fit,minmax(280px,1fr))]): references/components.md §Responsive Grid.
Touch Gestures [HIGH freedom]
- Swipe to delete —
drag="x"withdragConstraints={{ left: -100, right: 0 }}; background interpolates to red viauseTransform; delete whenoffset.x < -100 - Pull to refresh —
drag="y",dragElastic={0.5}; indicator opacity/scale followyover 0–60px; refresh wheny > 60 - Single-pointer alternative — WCAG 2.2 SC 2.5.7 (AA): a swipe-to-delete row also has a delete button or menu item; pull-to-refresh also has a refresh control; a drag-to-dismiss sheet also has a visible close button
- Reduced motion — under
@media (prefers-reduced-motion: reduce)drop the travel and keep the state change (fade, color)
Full components: references/components.md §Swipe to Delete, §Pull to Refresh.
Mobile-Specific Components [HIGH freedom]
- Bottom sheet — backdrop +
y: '100%' → 0panel,rounded-t-xl max-h-[90dvh](vhignores the mobile browser toolbar), drag handle viauseDragControls; close onvelocity.y > 500oroffset.y > 200, plus a visible close button;pb-safecontent - Forms — stack fields,
sm:grid-cols-2up; inputsh-12withfontSize: '16px'to prevent iOS focus-zoom;w-full sm:w-auto h-12submit
Full components: references/components.md §Bottom Sheet, §Mobile-Optimized Forms.
PWA Features [HIGH freedom]
- Viewport —
width: 'device-width', initialScale: 1, viewportFit: 'cover'; nomaximumScale/userScalable: false(the 16px inputs already stop iOS focus-zoom, and disabling pinch-zoom fails WCAG 1.4.4);appleWebAppcapable + title - Install prompt — capture
beforeinstallprompt,preventDefault, show a card with Install / Not now; callprompt()and readuserChoice
Code: references/pwa.md.
Validation [LOW freedom — do not skip]
Run at a 390×844 viewport, then on a real phone:
| Check | Probe | Done |
| Targets | document.querySelectorAll('a,button,input,select,[role=button]') → getBoundingClientRect() | none under 24×24; primary controls ≥ 44×44 |
| Drag alternatives | list every swipe / drag handler | each has a tap path |
| Focus under fixed bars | Tab through a long form with the bottom nav visible | focused field never fully hidden |
| Reduced motion | DevTools → Rendering → emulate prefers-reduced-motion: reduce | no travel; state changes still visible |
| Safe area | iPhone with Dynamic Island + Android 16 gesture nav | nothing under the notch or home indicator |
| Inputs | focus each input on iOS Safari | font-size ≥ 16px, no focus-zoom |
Also: thumb-zone CTAs · 60fps gestures · offline-graceful.
Related
enhance-mobile-native-feel— an existing Expo/RN or Capacitor app that feels like a websiteaudit-responsive— unstack desktop; layout/IA at 375 / 768 / 1440audit-accessibility— the full WCAG 2.2 AA audit, including the checks abovemobile-capacitor-platform— Capacitor bars, insets, keyboardenhance-capacitor-ui— hybrid web + native form-factor axesdesign-frontend— new visual surfacesaudit-performance— mobile perf budgets
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.

