bestdeejay-design/agent-skills / skills/mobile-frontend
mobile-frontend
VerifiedComposite skill for quality mobile-first frontend — codified rules (spacing, type scale, anchors, safe-area, tap-targets), build, and multi-level verification with per-element menu/nav debugging.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.3 KB |
| readme.ru.md | markdown | 1.8 KB |
| references/debug-menu-nav.md | markdown | 4.8 KB |
| references/mobile-checklist.md | markdown | 3.5 KB |
| references/tokens.md | markdown | 3.3 KB |
| skill.json | config | 1.9 KB |
references/mobile-checklist.md
View on GitHub# Mobile Checklist (детальный, по уровням)
Каждый пункт — бинарный ✅/❌. Уровень пройден, только если все пункты зелёные.
Скрипты запускаются в браузере (Playwright/Chromium) на нужном вьюпорте.
## Уровень 0 — Foundations
- [ ] `viewport` мета: `width=device-width, initial-scale=1, viewport-fit=cover`
- [ ] `:root` содержит токены (spacing/type/breakpoints/--header-h/safe-area)
- [ ] Все цвета и отступы — через переменные (нет «голых» hex в правилах, кроме transparent/currentColor)
- [ ] Якорные секции имеют `id`, задан `scroll-margin-top`
## Уровень 1 — Build
- [ ] Mobile-first: базовые стили мобильные, расширения через `min-width`
- [ ] Контейнер: `max-width` + боковой `padding` (--content-px), нет фикс. ширин блоков
- [ ] Картинки: `width:100%; height:auto; loading="lazy"; decoding="async"` (+srcset при наличии)
- [ ] Интерактивы ≥ 44px по меньшей стороне
- [ ] `font-display: swap` на всех шрифтах; body ≥ 16px
## Уровень 2 — Visual QA (320 / 360 / 390 / 414 / 768)
Для каждого вьюпорта:
- [ ] **Нет горизонтального скролла:**
```js
const o = document.documentElement;
return o.scrollWidth <= o.clientWidth;
```
- [ ] **Tap-target ≥ 44px** (все `<a>/<button>`):
```js
[...document.querySelectorAll('a,button')].filter(el=>{
const r = el.getBoundingClientRect();
return r.width>0 && (r.width<44 || r.height<44);
}).map(el=>el.outerHTML); // должен вернуть []
```
- [ ] **Шрифты загрузились:**
```js
await document.fonts.ready; return document.fonts.status === 'loaded';
```
- [ ] **Safe-area:** нижний CTA/меню не перекрывается home-indicator
(`getComputedStyle(el).paddingBottom` включает `env(safe-area-inset-bottom)`)
- [ ] **Якоря под шапкой:**
```js
const h = document.querySelector('header'); const hb = h.getBoundingClientRect().bottom;
const t = document.querySelector('#target'); t.scrollIntoView();
return t.getBoundingClientRect().top >= hb - 1;
```
- [ ] Скриншот сохранён и визуально сверен (`/visual-qa`, `frontend-design-taste`)
## Уровень 3 — Nav & Menu (см. debug-menu-nav.md)
- [ ] Гамбургер переключает меню; `aria-expanded` синхронен
- [ ] Пункт меню ведёт на цель И закрывает меню
- [ ] Фокус-ловушка в открытом меню; `Esc` закрывает
- [ ] Якорные/глубокие ссылки скроллятся под шапку
- [ ] `Tab`-порядок логичен; `:focus-visible` видим
- [ ] `z-index`: меню выше контента/шапки, ниже модалок
## Уровень 4 — Perf (mobile Lighthouse через frontend-perfection)
- [ ] CLS < 0.1
- [ ] LCP < 2.5s
- [ ] INP < 200ms
- [ ] Нет блокирующего рендер CSS/JS
## Уровень 5 — Fix & re-verify
- [ ] Правки внесены по уровням (2→3→4)
- [ ] Затронутые уровни перепроверены → зелёные
- [ ] Sign-off по критериям из SKILL.md
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies 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 colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |