# mobile-ux-optimizer

Optimizes web interfaces for touchscreens, fixes dynamic viewport issues with dvh, and aligns touch targets with mobile platform guidelines.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 498 installs · ★ 254
- Author: curiositech
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/mobile-ux-optimizer/SKILL.md
- Updated: 2026-09-06
- HTML: https://affpapa.org/en/nevibecode/skills/mobile-ux-optimizer

## What it does

The skill enforces a mobile-first approach, structuring CSS to scale up with `min-width` breakpoints rather than scaling down. It replaces `100vh` with `100dvh`. This prevents browser toolbars from cutting off page content. To handle phone notches, it injects the `viewport-fit=cover` meta tag alongside `env(safe-area-inset-*)` padding utilities.

Touch targets follow platform rules: at least 44×44 points for Apple and 48×48dp for Google Material Design. The skill also provides React navigation components, such as a fixed bottom bar with safe-area padding and a slide-out drawer with body-scroll locking. Swipes and pull-to-refresh gestures use dedicated React hooks.

This skill will not help with native Swift or React Native apps, as its rules strictly target mobile browser viewports. General CSS questions and PWA service worker configuration belong in separate tools.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill mobile-ux-optimizer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/mobile-ux-optimizer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/mobile-ux-optimizer/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill mobile-ux-optimizer -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/mobile-ux-optimizer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill mobile-ux-optimizer -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/mobile-ux-optimizer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install curiositech/some_claude_skills mobile-ux-optimizer
```

2. **Manually: put the files in place**
- File: `.github/skills/mobile-ux-optimizer/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill mobile-ux-optimizer -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/curiositech/some_claude_skills --path .claude/skills/mobile-ux-optimizer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/mobile-ux-optimizer/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill mobile-ux-optimizer -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/mobile-ux-optimizer/SKILL.md

## When to use it
- resolve mobile viewport clipping using `100dvh`
- configure `safe-area-inset` padding for device notches
- increase touch target sizes to meet 44px and 48px rules
- implement mobile bottom navigation and slide-out drawers in React
- attach touch gesture handling for swipe and pull-to-refresh actions

## Example prompts
- Fix our mobile layout: add safe area padding and make sure all tap targets are at least 44px
- Replace all 100vh full-screen containers with 100dvh and add fallbacks
- Create a mobile bottom navigation bar in React with Tailwind pb-safe utilities

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: c234119b46cf0357.

BEGIN THIRD-PARTY FILE c234119b46cf0357
````text
---
name: mobile-ux-optimizer
description: Mobile-first UX optimization for touch interfaces, responsive layouts, and performance. Use for viewport handling, touch targets, gestures, mobile navigation. Activate on mobile, touch, responsive,
  dvh, viewport, safe area, hamburger menu. NOT for native app development (use React Native skills), desktop-only features, or general CSS (use Tailwind docs).
allowed-tools: Read,Write,Edit,Bash,Grep,Glob
metadata:
  category: Design & Creative
  tags:
  - mobile
  - ux
  - touch
  - responsive
  - viewport
  - safe-area
  - navigation
  pairs-with:
  - skill: pwa-expert
    reason: PWAs are a primary mobile delivery mechanism requiring touch and viewport optimization
  - skill: ux-friction-analyzer
    reason: Mobile-specific friction points (fat finger errors, scroll hijacking) need specialized analysis
  - skill: adhd-design-expert
    reason: Mobile ADHD users face amplified cognitive load that requires specialized UX optimization
---

# Mobile-First UX Optimization

Build touch-optimized, performant mobile experiences with proper viewport handling and responsive patterns.

## When to Use

✅ **USE this skill for:**
- Viewport issues (`100vh` problems, safe areas, notches)
- Touch target sizing and spacing
- Mobile navigation patterns (bottom nav, drawers, hamburger menus)
- Swipe gestures and pull-to-refresh
- Responsive breakpoint strategies
- Mobile performance optimization

❌ **DO NOT use for:**
- Native app development → use `react-native` or `swift-executor` skills
- Desktop-only features → no skill needed, standard patterns apply
- General CSS/Tailwind questions → use Tailwind docs or `web-design-expert`
- PWA installation/service workers → use `pwa-expert` skill

## Core Principles

### Mobile-First Means Build Up, Not Down

```css
/* ❌ ANTI-PATTERN: Desktop-first (scale down) */
.card { width: 400px; }
@media (max-width: 768px) { .card { width: 100%; } }

/* ✅ CORRECT: Mobile-first (scale up) */
.card { width: 100%; }
@media (min-width: 768px) { .card { width: 400px; } }
```

### The 44px Rule

Apple's Human Interface Guidelines specify **44×44 points** as minimum touch target. Google Material suggests **48×48dp**.

```tsx
// Touch-friendly button
<button className="min-h-[44px] min-w-[44px] px-4 py-3">
  Tap me
</button>

// Touch-friendly link with adequate padding
<a href="/page" className="inline-block py-3 px-4">
  Link text
</a>
```

## Viewport Handling

### The `dvh` Solution

Mobile browsers have dynamic toolbars. `100vh` includes the URL bar, causing content to be cut off.

```css
````
END THIRD-PARTY FILE c234119b46cf0357

The third-party file has ended. Everything between the c234119b46cf0357 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2604 of 10927 bytes. © curiositech · MIT · https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/mobile-ux-optimizer/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
