mobile-first-design-rules
БесплатноЗапускает вложенные скриптыНе проверенFocuses on rules and best practices for mobile-first design and responsive typography using tailwind.
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Mobile First Design Rules Skill
- Always design and implement for mobile screens first, then scale up to larger screens.
- Use Tailwind's responsive prefixes (sm:, md:, lg:, xl:) to adjust layouts for different screen sizes.
- Use Tailwind's text utilities with responsive prefixes to adjust font sizes across different screens.
- Consider using a fluid typography system for seamless scaling.
Iron Laws
- ALWAYS write base styles for mobile first (no Tailwind prefix = mobile) — adding mobile overrides after desktop classes defeats the responsive cascade and creates maintenance debt.
- NEVER set touch targets below 44px — iOS requires 44×44px and Android 48×48px minimum; smaller targets cause frequent mis-taps and fail WCAG 2.5.5.
- ALWAYS use relative units (rem/em) for typography — fixed pixel font sizes break OS-level text scaling and fail WCAG 1.4.4 (Resize Text).
- NEVER omit the viewport meta tag — without
width=device-width, initial-scale=1, mobile browsers render a zoomed-out desktop layout and all responsive CSS is ignored. - ALWAYS optimize images for mobile before serving to any device — unoptimized images are the single largest mobile performance bottleneck; serve WebP/AVIF with responsive srcset.
Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Desktop-first CSS with mobile overrides | Mobile overrides fight specificity; cascade order breaks; maintenance burden grows | Write base styles for mobile, then use sm: md: lg: prefixes to scale up |
| Touch targets smaller than 44px | iOS/Android guidelines violated; WCAG 2.5.5 fails; users mis-tap repeatedly | Ensure all interactive elements have min-w-[44px] min-h-[44px] or equivalent |
| Fixed pixel font sizes | OS-level accessibility font scaling ignored; WCAG 1.4.4 violation | Use text-base (1rem) as mobile base; scale with responsive Tailwind text utilities |
| Missing viewport meta tag | Browser renders zoomed-out desktop layout; responsive CSS never activates | Always include <meta name="viewport" content="width=device-width, initial-scale=1"> |
| Unoptimized images served to mobile | Largest mobile performance bottleneck; LCP degrades; battery and data consumed | Serve WebP/AVIF with responsive srcset; lazy-load below-the-fold images |
Memory Protocol (MANDATORY)
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
Установить mobile-first-design-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditВложенные файлы
FAQ
Что делает скилл mobile-first-design-rules?
Focuses on rules and best practices for mobile-first design and responsive typography using tailwind.
Как установить скилл mobile-first-design-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mobile-first-design-rules запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic