Skip to main content
UXOfficialCertifiedAI reviewed Jul 21, 2026

Mobile Sweep

Runtime sweep that catches mobile-layout bugs: content clipped off the edge of a phone screen, touch targets smaller than 44×44px, text inside a button or input that overflows its visible width, and modals that extend past the viewport..

v1.1.1New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install mobile-sweep
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/mobile-sweep/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

mobile-sweep

Open a running web app in headless Chromium at three phone/tablet breakpoints
(360×640, 390×844, 768×1024), walk every interactive element + every visible
dialog, and flag the four high-impact mobile-layout failure modes:

  1. Off-screen overflow — an element extends past document.documentElement.clientWidth.
  2. Tiny touch targets — interactive elements under 44×44 CSS px on touch viewports.
  3. Clipped text — scrollWidth > clientWidth on a button / input / link (visible label is being cut).
  4. Modal width / off-screen modals — dialogs wider than 100vw - 16px or that hang off either side.

Plus an optional static CSS scan that flags grid-template-columns patterns
packing 3+ fixed-pixel widths summing to >200px without a @media (max-width: ...)
override — the exact pattern that caused today's rewards-edit-row clipping bug.

The actual sweep is done by a bundled Playwright script (scripts/sweep.py).
The skill body just orchestrates running it, interprets the findings, and
proposes fixes the user can apply directly.

What the scanner exempts by default

These elements are intentionally tiny or off-screen and should not be
flagged. The scanner skips them automatically; pass --no-default-ignores
to see them anyway.

  • Visually-hidden a11y elements — .skip-to-content, .sr-only,
    .visually-hidden, .screen-reader-text, anything with aria-label
    starting with "skip", and structurally-detected SR-only elements (1×1
    absolutely-positioned with overflow: hidden / clip-path).
  • Inline text links in prose — anchors whose nearest block ancestor
    is <p>, <li>, <td>, <dd>, <blockquote>, or any element with a
    class containing prose. WCAG 2.5.8 explicitly exempts these from the
    24×24 target size rule. Exempted only from the small-touch-target
    check; off-screen and clipped-text still apply.

=== PRE-FLIGHT ===


Before running, verify:

  • The user can name a URL where the app is currently reachable — a
    Firebase Hosting URL, a localhost:NNNN dev server, or a file:// path
    to a static index.html. If the user only said "check mobile" with no
    context, look in the conversation: is there a recently deployed URL, or
    a firebase deploy output? Use that.
  • Python 3.8+ is available (python3 --version).
  • Playwright + a Chromium browser are installed. Quick probe:
    python3 -c "from playwright.sync_api import sync_playwright" 2>&1
    
    If that errors, run:
    pip install playwright && playwright install chromium
    
  • If the app requires sign-in to reach the screens being reviewed, the
    user must say so — Playwright will land on the sign-in modal otherwise.
    Options: (a) sign in once with a saved storage state, (b) point at a
    deep-linked screen, (c) use --open-selectors to dismiss the sign-in
    modal in-page.

Recovery:

  • URL missing → ask for it once. Do not invent one.
  • Playwright missing → run the install commands above. The skill is
    worthless without it.
  • Auth gate → tell the user; offer to test only the sign-in surface and
    the public landing.

VALIDATION: python3 scripts/sweep.py --help exits 0.
FALLBACK: if Playwright install fails (network, sandbox), stop and tell
the user. Do not fake findings.


=== PHASE 1: SWEEP THE APP ===


Run the bundled scanner:

python3 ~/.claude/skills/mobile-sweep/scripts/sweep.py <URL>

Useful flags:

FlagWhen to use
--breakpoints 360,390,768Override the default breakpoints. Width-only; the script picks a matching height (small Android 360×640, iPhone 390×844, iPad 768×1024, otherwise width × width*1.78).
--open-selectors "#open-rewards-btn,#open-settings-btn"Click each selector before sweeping. Use this to reach modals/menus that aren't visible on first load. The skill calls these in sequence at each breakpoint.
--wait-selectors ".board"Wait for these to appear before sweeping (handy when content is fetched after first paint).
--static-css <path>Path to scan for rigid-grid CSS issues. Defaults to .; pass an empty string "" to disable.
--out mobile-sweep-outOutput directory for the report + screenshots. Default mobile-sweep-out/.
--ignore-selectors ".chip-marketing,.fab-decoration"Add custom selectors to skip during checks. Useful for known decoration-only elements that aren't worth flagging.
--no-default-ignoresDisable the built-in WCAG exemptions (skip-to-content links, sr-only/visually-hidden elements, inline prose anchors). Use when you want a strict baseline.

The script writes:

  • <out>/mobile-sweep-report.md — the formatted report
  • <out>/finding-<width>-<state>-<i>.png — a tight screenshot crop of each finding

Exit code: nonzero if any errors are found, so this can gate CI.

VALIDATION: the report file exists and contains at least the header.
FALLBACK: if the script crashes (timeout loading the URL, browser launch
failure), capture the stderr and surface it to the user before guessing
what's wrong.


=== PHASE 2: INTERPRET AND FIX ===


Open the generated report. Each finding has:

  • The selector + label + breakpoint + state (which click triggered it)
  • A 1-line measurement (scrollWidth 320 > clientWidth 80, clipped by 240px)
  • A concrete fix suggestion
  • A screenshot crop of the offending area

For off-screen and clipped-text findings, the dominant pattern is a
rigid CSS grid or flex layout. Don't paper over with overflow: hidden.
Instead:

  • Switch grid-template-columns: <pile of fixed px> to grid-template-areas
    that stack rows under @media (max-width: 640px) so the wide field
    gets its own row.
  • For inputs, ensure min-width: 0 on the parent and width: 100% on the
    field so the input fills the available row width.

For small-touch-target findings, add:

@media (hover: none) {
  .my-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

44px is the iOS HIG minimum. 48px is Material's guidance — both are safe.

For modal-too-wide findings, change the modal width to:

width: min(<desktop-width>, calc(100vw - 16px));

For the rigid-grid static warnings, those are the latent version of
the runtime issues — the user might not have hit them yet because the
modal isn't open, but they will. Apply the same grid-template-areas
mobile override.

VALIDATION: a second run of the sweep on the fixed code shows the
specific findings resolved. (Don't claim a fix worked without re-running.)
FALLBACK: if a fix you applied moved a finding instead of removing it,
that's the same bug in a different place — keep iterating until the
report is clean.


=== PHASE 3 (OPTIONAL): WIRE INTO CI ===


If the user wants this to gate deploys, the script's nonzero exit makes
that easy:

# .github/workflows/ci.yml
- name: Mobile sweep
  run: python3 ~/.claude/skills/mobile-sweep/scripts/sweep.py "$DEPLOY_PREVIEW_URL"

Only suggest this when the user has indicated CI is set up.


=== SELF-REVIEW ===


Score the output (1–5):

  • Complete: Did the sweep run successfully across all three breakpoints?
    Did the report surface findings or confirm clean?
  • Robust: Did --open-selectors reach the modals the user actually
    cares about? Were findings de-duplicated across breakpoints (the same
    element clipped at 360 and 390 should not double-count)?
  • Clean: Is the report concise? Each finding actionable? No noise like
    decoration-only elements being flagged as touch targets?

If any score < 4:

  • Add --open-selectors to reach unseen modals, or --wait-selectors
    if content was being captured before it loaded.
  • If touch-target warnings include obvious non-interactive icons, suppress
    them by adding their parent button class to a future ignore list (for
    now, mention them as "likely false positives" in the report).

=== LEARNINGS CAPTURE ===


After completing, append one entry to
~/.claude/skills/mobile-sweep/LEARNINGS.md:

## <YYYY-MM-DD> — <project + scan scope>

- **What worked:** <concrete fix suggested by the report that landed
  immediately, or a `--open-selectors` value that reached the right modal>
- **What was awkward:** <false positives, scroll-clipped inputs that were
  intentional, modals that needed a multi-step click sequence to open>
- **Suggested patch:** <one concrete improvement — "default `--wait-selectors`
  for SPAs to `body[data-loaded]`", "add `--ignore-selectors` for known
  decorative icons", "auto-detect modal open buttons">
- **Verdict:** [Smooth / Minor friction / Major friction]

Anti-patterns this skill refuses

  • Running on a static screenshot — the whole point is to use a real layout
    engine. If Playwright is not installable, stop and say so.
  • Auto-applying fixes without showing the report first. The user wants
    to see what's broken.
  • Suggesting transform: scale() or zoom as fixes. Both break touch
    hit-areas and accessibility — fix the layout instead.
  • Flagging hover-only elements that legitimately don't need a touch target
    (decorative pseudo-elements, etc.). The scanner already filters by
    visibility + isInteractive; if a class of false positives slips
    through, surface them in LEARNINGS so /evolve can add an ignore.
  • Suggesting overflow: hidden on a parent as a fix for clipped text. It
    hides the bug, doesn't fix it.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.79 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.62 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.57 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.57 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..56 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..50 installs

More from Skills Hub

View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.198 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.167 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..133 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..126 installs

More UX skills

Browse category →
dark-modeImplement complete dark mode for any frontend project. Auto-detects theme system (Flutter ThemeData, Tailwind dark class, CSS variables, MUI, Chakra UI, styled-components), generates a dark color palette with proper surface elevation hierarchy and desaturated brand colors.45 installsdesign-claudeHTML-first hi-fi design skill: interactive prototypes, slide decks, animation demos, design variant exploration, visual direction advising, and expert critique. Triggers: make a prototype, design demo, interactive prototype, HTML presentation, animation demo.33 installsdesign-tokensExtract, consolidate, and modernize design tokens — oklch color scales, fluid spacing with clamp(), typography scales, motion timing, and shadow depths. Triggers: 'extract design tokens', 'create design system tokens', 'consolidate styles', 'modernize CSS variables'.21 installsdesign-systemExtract and formalize a design system from existing UI code. Scans for every hardcoded color, font size, spacing value, border radius, and shadow across the codebase, deduplicates near-identical values, generates framework-appropriate tokens (CSS custom properties, Tailwind config.20 installsuxDual-mode UX quality skill — runs a heuristic/accessibility/motion audit on the current codebase, or validates implementation against design mockups. Fixes all issues found and commits.19 installsdesign-syncOrchestrates the Claude Design ↔ Claude Code /design-sync handoff loop — imports your design system into the active project, validates generated UI components against design tokens, and round-trips edits back to Claude Design so prototypes always start from real components rather than approximations.17 installs

Frequently asked questions about mobile-sweep

What does the mobile-sweep skill do?

Runtime sweep that catches mobile-layout bugs: content clipped off the edge of a phone screen, touch targets smaller than 44×44px, text inside a button or input that overflows its visible width, and modals that extend past the viewport.. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the mobile-sweep skill?

Run `npx @skills-hub-ai/cli install mobile-sweep` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/mobile-sweep/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does mobile-sweep work with?

mobile-sweep runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the mobile-sweep skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use mobile-sweep after installing it?

In Claude Code, type `/mobile-sweep` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the mobile-sweep skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.