
Mobile First Design
- 752 installs
- 305 repo stars
- Updated March 4, 2026
- aj-geddes/useful-ai-prompts
mobile-first-design is a frontend agent skill that encodes responsive breakpoints, touch-target sizing, and mobile Core Web Vitals budgets for developers shipping web apps that must work on phones before desktop.
About
mobile-first-design is a useful-ai-prompts skill that starts layouts at 320–480px mobile widths, enhances at 768–1024px tablet, and optimizes desktop at 1200px plus with progressive enhancement. It bundles three reference guides—responsive-design-implementation, mobile-performance, and progressive-enhancement—and prescribes 44×44px minimum touch targets, hamburger navigation on small screens, and safe-area awareness for notched devices. Performance targets include mobile First Contentful Paint under 3 seconds, Largest Contentful Paint under 4 seconds, CLS under 100, JavaScript bundles under 100KB gzipped, and CSS under 50KB gzipped with critical CSS inlined. Image guidance covers responsive srcset, WebP with fallbacks, lazy loading, and CDN delivery. Testing guidance covers iPhone SE at 320px baseline, Samsung S21 at 360px, iPad at 768px, Chrome DevTools emulation, orientation changes, and slow-network verification on physical hardware. Developers reach for mobile-first-design when agents need concrete responsive rules instead of generic make-it-responsive advice.
- Mobile Performance Optimization checklist covering image handling, metric goals, bundle size targets, and network strate
- Progressive Enhancement layered approach with three explicit tiers: Core Content (HTML), Enhanced (CSS), and Interactive
- Concrete device testing matrix including physical devices (iPhone SE, iPhone 13 Pro, Samsung S21, iPad) and emulation me
- Quantified performance targets such as <3s FCP, <4s LCP, <100 CLS, <100KB JS, and <50KB CSS
- Hard-gate checklist that must be satisfied before declaring a responsive UI complete
Mobile First Design by the numbers
- 752 all-time installs (skills.sh)
- Ranked #491 of 1,880 Design & UI/UX skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill mobile-first-designAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 752 |
|---|---|
| repo stars | ★ 305 |
| Security audit | 3 / 3 scanners passed |
| Last updated | March 4, 2026 |
| Repository | aj-geddes/useful-ai-prompts ↗ |
How do you implement mobile-first responsive web design?
Generate mobile-first performance rules, progressive enhancement checklists, and responsive testing guidance that keep web products fast and usable on any d
Who is it for?
Frontend developers building responsive SaaS or marketing sites who need explicit mobile performance thresholds and touch-friendly layout rules.
Skip if: Native iOS or Android app UI where platform SDK guidelines replace CSS breakpoint workflows.
When should I use this skill?
The user asks for mobile-first layout, responsive breakpoints, mobile Core Web Vitals targets, or touch-friendly UI patterns.
What you get
Breakpoint specifications, progressive enhancement checklists, mobile performance budgets, and device testing matrices.
- responsive breakpoint specs
- mobile performance checklists
By the numbers
- Includes 3 reference guides for responsive design and performance
- Specifies 44×44px minimum touch target size
- Sets mobile JS budget under 100KB gzipped and CSS under 50KB gzipped
Files
Mobile-First Design
Table of Contents
Overview
Mobile-first design prioritizes small screens as the starting point, ensuring core functionality works on all devices while leveraging larger screens for enhanced experience.
When to Use
- Web application design
- Responsive website creation
- Feature prioritization
- Performance optimization
- Progressive enhancement
- Cross-device experience design
Quick Start
Minimal working example:
Mobile-First Approach:
Step 1: Design for Mobile (320px - 480px)
- Constrained space forces priorities
- Focus on essential content and actions
- Single column layout
- Touch-friendly interactive elements
Step 2: Enhance for Tablet (768px - 1024px)
- Add secondary content
- Multi-column layouts possible
- Optimize spacing and readability
- Take advantage of hover states
Step 3: Optimize for Desktop (1200px+)
- Full-featured experience
- Advanced layouts
- Rich interactions
- Multiple columns and sidebars
---
## Responsive Breakpoints:
Mobile: 320px - 480px
- iPhone SE, older phones
// ... (see reference guides for full implementation)Reference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Responsive Design Implementation | Responsive Design Implementation |
| Mobile Performance | Mobile Performance |
| Progressive Enhancement | Progressive Enhancement |
Best Practices
✅ DO
- Design for smallest screen first
- Test on real mobile devices
- Use responsive images
- Optimize for mobile performance
- Make touch targets 44x44px minimum
- Stack content vertically on mobile
- Use hamburger menu on mobile
- Hide non-essential content on mobile
- Test with slow networks
- Progressive enhancement approach
❌ DON'T
- Assume all mobile users have fast networks
- Use desktop-only patterns on mobile
- Ignore touch interaction needs
- Make buttons too small
- Forget about landscape orientation
- Over-complicate mobile layout
- Ignore mobile performance
- Assume no keyboard (iPad users)
- Skip mobile user testing
- Forget about notches and safe areas
Mobile Performance
Mobile Performance
Mobile Performance Optimization:
Image Optimization:
- Responsive images (srcset, picture element)
- WebP format with fallback
- Lazy loading for below-fold
- Compress ruthlessly
- Serve appropriately sized images
Metric Goals:
- Mobile: <3 second First Contentful Paint
- Mobile: <4 second Largest Contentful Paint
- Mobile: < 100 Cumulative Layout Shift
Bundle Size:
- Mobile: <100KB JavaScript (gzipped)
- Mobile: <50KB CSS (gzipped)
- Critical CSS inline
Network:
- Minimize requests (combine files)
- Enable gzip compression
- Use CDN for assets
- Cache aggressively
---
Testing Devices:
Physical Devices:
- iPhone SE (320px baseline)
- iPhone 13 Pro (390px)
- Samsung S21 (360px)
- iPad (768px)
Emulation:
- Chrome DevTools device mode
- Responsive design mode
- Test orientation changes
Real Device Testing:
- Test on actual devices
- Check touch interactions
- Verify performance
- Test with slow networkProgressive Enhancement
Progressive Enhancement
Progressive Enhancement Strategy:
Layer 1: Core Content (HTML)
- Semantic HTML
- Works without CSS or JavaScript
- Text content readable
- Forms functional
Layer 2: Enhanced (CSS)
- Visual design
- Layout and spacing
- Colors and typography
- Responsive design
Layer 3: Interactive (JavaScript)
- Progressive loading
- Form enhancements
- Smooth interactions
- Offline functionality
- Push notifications
Fallback Approach:
- Input: range slider → Text input fallback
- Video: HTML5 video → Link to download
- Map: Interactive map → Static image link
- Single-page app → Server-side rendering
---
Testing Strategy:
1. Disable JavaScript
- Core content still accessible
- Forms still submit
- Links work
2. Slow 3G Network
- Page loads
- Critical content visible
- Non-critical lazy loads
3. No Styles (CSS disabled)
- Content readable
- Text size appropriate
- Contrast sufficientResponsive Design Implementation
Responsive Design Implementation
# Implement responsive CSS and layouts
class ResponsiveDesign:
def create_responsive_grid(self, mobile_cols=1):
"""CSS Grid responsive structure"""
return {
'mobile': {
'columns': 1,
'gap': '16px',
'breakpoint': 'max-width: 480px'
},
'tablet': {
'columns': 2,
'gap': '24px',
'breakpoint': '481px - 768px'
},
'desktop': {
'columns': 3,
'gap': '32px',
'breakpoint': 'min-width: 769px'
}
}
def responsive_typography(self):
"""Fluid font sizes"""
return {
'h1': {
'mobile': '24px',
'tablet': '32px',
'desktop': '48px',
'line_height': {
'mobile': '1.2',
'desktop': '1.3'
}
},
'body': {
'mobile': '14px',
'tablet': '16px',
'desktop': '16px',
'line_height': '1.6'
}
}
def responsive_spacing(self):
"""Adaptive padding and margins"""
return {
'container_padding': {
'mobile': '16px',
'tablet': '24px',
'desktop': '32px'
},
'section_margin': {
'mobile': '24px',
'desktop': '48px'
},
'touch_target_size': '44px minimum (Apple)'
}
def touch_friendly_design(self):
"""Mobile interaction optimization"""
return {
'button_size': '44px x 44px minimum',
'touch_target_spacing': '8px minimum between',
'form_input_height': '44px + 16px padding',
'scrolling_area': 'Full width swipe friendly',
'modal_height': 'Max 85vh, scrollable',
'keyboard_awareness': 'Account for software keyboard'
}#!/bin/bash
# validate-config.sh - Validate infrastructure configuration
# Usage: ./validate-config.sh <config_file>
set -euo pipefail
CONFIG_FILE="${{1:?Usage: $0 <config_file>}}"
echo "Validating: $CONFIG_FILE"
# TODO: Add configuration validation logic
# - Check required fields
# - Validate syntax (YAML/JSON/HCL)
# - Verify referenced resources exist
# - Check for security best practices
echo "Validation complete."
# Infrastructure Configuration Starter
# TODO: Customize for your infrastructure setup
#
# Usage: Copy this file and modify for your environment
# --- Environment Configuration ---
environment: production
region: us-east-1
# --- Resource Definitions ---
# TODO: Add resource definitions specific to this skill's domain
# --- Security Settings ---
# TODO: Add security configuration
# --- Monitoring ---
# TODO: Add monitoring/alerting configuration
Related skills
How it compares
Use mobile-first-design for CSS breakpoint and performance budgets; use dedicated a11y audit skills when WCAG compliance testing is the primary goal.
FAQ
What mobile performance metrics does mobile-first-design target?
mobile-first-design targets mobile First Contentful Paint under 3 seconds, Largest Contentful Paint under 4 seconds, and Cumulative Layout Shift under 100. Bundle guidance caps JavaScript at 100KB gzipped and CSS at 50KB gzipped, with critical CSS inlined and responsive WebP imag
How many reference guides ship with mobile-first-design?
mobile-first-design bundles three reference guides under references/: responsive-design-implementation for breakpoint layouts, mobile-performance for image and network budgets, and progressive-enhancement for layered feature delivery. Each guide expands the quick-start YAML with
Is Mobile First Design safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.