doesntbreak
A Claude Agent Skill that makes Claude write web UI which holds up on small screens by default (mobile-first, no horizontal scroll, fluid layouts) working from 320px up, without you ever having to ask for "responsive."
The problem
Vibe-coded UI looks great on a 1440px desktop and falls apart on a 375px phone. The usual symptoms:
- A horizontal scrollbar that shouldn't be there.
- Elements overlapping or squishing into each other.
- Text overflowing its container or getting clipped.
- Tap targets too small to reliably hit with a thumb.
The cause is almost always desktop-first habits: fixed pixel widths, hand-written breakpoints that fight each other, and layouts that were only ever checked at one width.
What it does
The skill bakes responsive discipline into Claude's default output so you don't have to remember to ask for it.
- Mobile-first by default. Base styles target the smallest screen; complexity is layered upward with
min-width queries. Never the reverse.
- Non-negotiables, applied automatically:
- No fixed pixel widths on layout containers: cap with
min(100%, Npx).
- Let flex and grid reflow (
flex-wrap, auto-fit grids) instead of hand-written breakpoints.
min-height, not fixed height, so containers grow with content.
- Media capped with
max-width: 100%.
- Touch targets at least 44x44px.
- At least 16px font on inputs, so iOS Safari doesn't zoom on focus.
- Long unbroken strings broken with
overflow-wrap, not left to overflow.
dvh/svh/lvh for full-height sections, so a 100vh hero isn't clipped by the mobile address bar.
- Wide content (tables,
<pre>, code blocks) scrolls in its own overflow-x: auto container, never the page.
- Tests at the real failure points. 320px, 375px, the awkward 768px tablet middle, long content, and a hard check for no horizontal scroll at any width.
- Review mode. Point it at existing layout code and it scans for the usual offenders (fixed widths, missing
min-width: 0, desktop-first max-width queries, fixed heights, unconstrained images) and fixes them.
- Tailwind-aware. Maps each rule to the right utilities and flags the common footguns:
w-[1200px], missing min-w-0, w-screen, and min-h-screen for heroes.
File structure
doesntbreak/
├── .claude-plugin/
│ ├── plugin.json # Claude plugin manifest
│ └── marketplace.json # Claude marketplace
├── .codex-plugin/
│ └── plugin.json # Codex plugin manifest
├── .agents/plugins/
│ └── marketplace.json # Codex marketplace
├── hooks/
│ ├── hooks.json # Claude startup update check
│ └── codex-hooks.json # Codex startup update check
├── skills/
│ └── doesntbreak/
│ ├── SKILL.md # the skill instructions Claude loads
│ └── references/
│ └── patterns.md # detailed CSS mechanics + annotated example
├── commands/
│ ├── audit.md # /doesntbreak:audit, report-only responsive audit
│ ├── fix.md # /doesntbreak:fix, apply the fixes, leave them for review
│ └── screenshot-check.md # /doesntbreak:screenshot-check, measured browser overflow check
├── examples/
│ ├── broken.html # demo page seeded with all 9 rule violations
│ ├── fixed.html # same content, each rule corrected
│ └── banner.svg # deterministic offline fixture media
├── scripts/
│ ├── check-update.js # committed update-check runtime
│ └── responsive-check.js # committed system-Chrome runner
├── src/
│ ├── check-update.ts # strict TypeScript updater source
│ └── responsive-check.ts # strict TypeScript browser-check source
├── test/
│ ├── check-update.test.mjs
│ ├── responsive-check.test.mjs # unit + real-browser smoke tests
│ └── tooling.test.mjs # typecheck + generated-runtime parity
├── tooling/ # repository-only validation scripts
├── tsconfig.json # strict build into scripts/
├── package.json # build, validation, and test commands
├── README.md # this file
├── LICENSE # MIT
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── SECURITY.md
└── CITATION.cff
skills/doesntbreak/SKILL.md carries the rules and triggers. skills/doesntbreak/references/patterns.md holds the deeper mechanics (the flexbox min-width: 0 trap, clamp() typography, auto-fit grids, container queries, mobile viewport-height units (dvh/svh/lvh), safe-area insets, contained-scroll patterns for wide content (tables, <pre>, code), a Tailwind cheat sheet, and a fully annotated example), which Claude reads when it needs the details.