antislop-layoutmobile
它能做什么
为 AI 编程助手提供响应式布局的规则,使页面能在不同屏幕尺寸间自动调整。适用于希望页面在手机和电脑上都显示和使用良好的开发者。
适用场景
- ✓开发者制作的布局需要同时适用于手机和桌面屏幕的时候。
- ✓开发者的页面在小屏幕上发生横向溢出或布局错乱的时候。
- ✓开发者希望手机上的按钮和链接易于点击的时候。
技能链接
https://github.com/miqdadbadjuber/anti-slop/blob/main/skills/antislop-layoutmobile/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的网站在手机上会超出屏幕边缘。请修复布局,让它正确地重新排列。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能把移动端布局视为独立的设计,对内容进行重新堆叠、缩放和排序。它会检查断点、网格、溢出、点击区域大小和导航。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
antislop-layoutmobile
Anti Slop: Rules for AI Coding Agents. Mobile Layout skill
Part of the antislop system. Read together with
antislop.md(the core). This skill deep-dives the responsive layout concern: how a layout must reflow across screen sizes, phone to desktop. Breakpoints, scale, grids, overflow, tap targets, and navigation. It references core rules by number and never duplicates or renumbers them. Load it when the task builds or edits a layout that has to hold up at any screen width.
How to use this skill
- Load together with
antislop.mdwhenever the task is mobile or responsive layout work. The core holds the mechanism (the purpose test, the three tiers, the Delivery Gate); this skill holds mobile-layout depth. - Every entry has the same shape: Tell (the pattern), Why (why it reads as slop), Fix (what to do instead), with the governing core rule cited as R-XX.
- The principle behind this skill: mobile layout is a different layout, not the desktop layout at a smaller size. It must reflow: re-stack, rescale, and re-order with intent. Every pattern below is a way a layout fails to reflow.
- The Delivery Gate in the core remains the gate. The "Layoutmobile Skill Checklist" at the end of this file is the mobile-specific supplement to run alongside it.
Breakpoints
Desktop-Only Layout
- Tell: one layout state for every screen; the mobile view is the desktop layout squeezed into a phone.
- Why: R-03 requires a mobile layout that is perfect, not an afterthought. A page that only shrinks has no mobile design at all: cards that worked side by side overlap, and text meant for a wide canvas crowds into a narrow one.
- Fix: define a real mobile state at the breakpoint where the content stops working. The mobile layout reflows: columns stack, sizes drop, and order changes where the content needs it. If the mobile view is just the desktop view at a smaller width, the layout is not done.
Breakpoint Driven by Device List
- Tell: breakpoints named after phone widths (375px, 414px, 768px) chosen because "that is the iPhone size", not because the content breaks there.
- Why: device widths change every year and every model. A breakpoint is a point where the layout stops holding; forcing it to match a device list makes the layout follow a spec sheet instead of the content (R-03).
- Fix: place breakpoints where the content actually breaks: when a column stops being readable, when a row of cards gets too narrow. Test by narrowing the viewport and watching where it snaps, then set the breakpoint there.
Mobile Styled Last
- Tell: mobile rules bolted on as a trailing override: a long desktop stylesheet with a small media query at the end fixing one or two things.
- Why: an override patch is not a mobile design. It fixes the symptom that got reported and leaves the next one, and the base styles stay tuned for a wide screen (R-03).
- Fix: treat mobile as a designed state, not an override. Give the narrow viewport its own deliberate sizes and stacking, and verify the whole layout there, not just the patched spots (R-35).
Two-State Layout
- Tell: a layout with exactly two states: a single stacked column below one breakpoint, and a wide multi-column grid above it, with nothing defined in between. A tablet or small laptop width then inherits whichever state is closest: the phone stack stretched absurdly wide, or the desktop grid crammed into a fraction of its intended canvas.
- Why: a page is a continuous range of widths, and R-03 demands it hold up at every one of them, not just two chosen breakpoints. Two states leave the whole middle band of the range (roughly 600 to 1024 px, where tablets and small laptops live) as an accident: content that neither stacks with intent nor sits in a grid that fits. The layout reads as designed only at its two sample points and broken everywhere between.
- Fix: define real states at the widths where the content stops working, and let them be as many as the content needs. A typical reflow is three states, not two: single column, then a two-column grid when cards get too wide as a single stack, then the full multi-column grid only when it genuinely fits. Verify by dragging the viewport through the whole range, not by checking two widths and calling it done (R-35).
Scale & Sizing
Desktop-Sized Everything
- Tell: padding, gaps, hero heights, and card sizes carried unchanged from desktop t
常见问题
移动端布局只是缩小的桌面布局吗?
不是。该技能说明,手机布局应有目的地重新排版,而不只是缩小。
它会检查点击区域吗?
会。它涵盖点击目标,确保手机上的按钮容易点中。
它需要核心 antislop 文件吗?
需要。它应与主 antislop 文件一起使用,主文件包含共享规则。
详情
作者的原始描述
Mobile layout skill for antislop. Use for layouts that reflow across screen sizes, phone to desktop: grids, overflow, tap targets. Load with the core.
repo: miqdadbadjuber/anti-slop
热度
- GitHub 星标
- 8.0k
- 排名
- #12651
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
antislop-code
8.0k帮你的智能体清理带有 AI 写作痕迹的代码注释,删除装饰性或显而易见的注释,保留有用的内容,且不改动代码本身。
antislop-copywriting
8.0k帮你的智能体用平实、自然的语言编写和修改营销文案、标题与行动号召,避免常见的 AI 写作套路和虚构事实。
antislop-human
8.0k帮你的智能体构建适合真实用户的界面,包括可读的对比度、键盘操作、可见的焦点和清晰的状态。
antislop-ui
8.0k帮你的智能体设计看起来经过精心打造、而非千篇一律的界面,包括考究的配色、真实的布局和有目的的动效。