lov-mobile-adapt
БесплатноЗапускает вложенные скриптыНе проверен扫描并修复 Web 项目的移动端问题:溢出、安全区、100vh、触控尺寸、响应式布局与多级页面导航。Use when the user mentions "移动端适配", "手机适配", "mobile adapt", "fix mobile overflow".
от lovstudio★ 72 звезды на GitHubОб этом скилле
移动适配师 · Mobile Fit
Scan and fix mobile adaptation issues in an existing web project: viewport configuration, overflow prevention, safe area handling, responsive breakpoints, 100vh pitfalls, touch targets, and multi-level page navigation.
Triggers
Activate when
- “移动端适配”“手机适配”“多级页面”“移动端布局”
- "mobile adapt", "responsive optimization", "fix mobile overflow", "add safe area", or a request to adapt a site for phones or tablets.
- Converting a desktop-first site to work well on mobile
- User reports overflow, cut-off content, or notch overlap on phones
- Adding mobile navigation (back button, page stack) to a sidebar-based layout
- Fixing 100vh issues on iOS/Android browsers
- General "make it mobile friendly" requests
Do not activate when
- The target is a native iOS/Android app (Swift, Kotlin, React Native, Flutter) rather than a web project.
- The user wants a new interface or a visual redesign: use
lov-frontend-design. - A new app is being generated: use
lov-app-generator. - The complaint is runtime jank, battery, or memory growth on phones: use
lov-app-optimizer.
Skill Group Composition
Read references/skill-composition.md before routing to or extending an
adjacent Skill.
Workflow (MANDATORY)
You MUST follow these steps in order.
Resolve SKILL_DIR from the installed skill context before running the helper.
For manual execution, set it to the directory containing this SKILL.md.
Step 1: Scan the Project
Run the scanner to identify issues:
python3 "$SKILL_DIR/scripts/scan_mobile_issues.py" <project-path>
For JSON output (easier to process programmatically):
python3 "$SKILL_DIR/scripts/scan_mobile_issues.py" <project-path> --format json
Review the output. The scanner checks:
- viewport meta tag presence and
viewport-fit=cover - CSS overflow risks (fixed widths, min-width)
- 100vh usage (should be 100dvh)
- safe-area-inset usage on fixed/sticky elements
- Touch target sizes (< 44px)
- Responsive breakpoint coverage
- Tailwind-specific issues (h-screen → h-dvh)
- Text overflow without ellipsis handling
Step 2: Ask the User
IMPORTANT: Use AskUserQuestion to collect scope BEFORE making changes.
Present the scan results summary, then ask:
Question: "扫描发现 X 个问题。要修哪些类别?"
Options:
1. 全部修复 (Recommended) — fix all categories found
2. 只修布局和溢出 — overflow + responsive only
3. 只修导航 — convert to mobile stack navigation
4. 让我选具体类别 — pick specific categories
If the project has sidebar/tab navigation on desktop, also ask:
Question: "桌面端的侧边栏/tab 导航要改成移动端多级页面吗?"
Options:
1. 是,改成 push/pop 页面栈 (Recommended)
2. 改成底部 tab bar
3. 不改导航结构
Step 3: Fix Issues
Apply fixes in this priority order:
- Viewport meta — add or fix
<meta name="viewport">withviewport-fit=cover - Global overflow guard — add
overflow-x: hiddento html/body - 100vh → 100dvh — replace all 100vh usages, add fallback
- Safe area padding — add
env(safe-area-inset-*)to fixed/sticky elements - Image/media overflow — add
max-width: 100%; height: auto - Text overflow — add ellipsis/line-clamp where
white-space: nowrapexists - Touch targets — increase size of interactive elements below 44px
- Responsive breakpoints — add mobile-first media queries or Tailwind responsive
- Navigation restructure — convert to mobile page stack if requested
For each fix, refer to references/mobile-patterns.md for the correct pattern.
Step 4: Navigation Restructure (if applicable)
When converting sidebar/panel navigation to mobile stack:
- Identify the navigation structure (sidebar, tabs, nested panels)
- Create a responsive layout wrapper that switches between desktop and mobile
- On mobile: render as a full-screen page stack with back button
- Use CSS slide transitions for page push/pop
- Preserve desktop layout unchanged at
md:breakpoint and above
See references/mobile-patterns.md → "Multi-Level Page Navigation" for
implementation patterns per framework.
Step 5: Verify
After all fixes:
- Re-run the scanner — confirm issues resolved
- Check the site in a mobile viewport (375px width)
- Verify:
- No horizontal scroll
- Content not cut off by notch or home indicator
- All interactive elements are tappable (44px+)
- Navigation back button works
- Full-height layouts don't overflow behind browser chrome
CLI Reference
| Argument | Default | Description |
|---|---|---|
project |
(required) | Path to web project root |
--format |
text |
Output format: text or json |
Key Patterns (quick reference)
| Problem | Fix |
|---|---|
| Missing viewport meta | <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> |
| 100vh overflow | height: 100dvh (with 100vh fallback) |
| Notch overlap | padding: env(safe-area-inset-top) on fixed elements |
| Horizontal overflow | `overflo |
Установить lov-mobile-adapt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lov-mobile-adapt?
扫描并修复 Web 项目的移动端问题:溢出、安全区、100vh、触控尺寸、响应式布局与多级页面导航。Use when the user mentions "移动端适配", "手机适配", "mobile adapt", "fix mobile overflow".
Как установить скилл lov-mobile-adapt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lov-mobile-adapt запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic