responsiveness-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Responsiveness Check

响应式布局检测

Test how a website's layout responds to viewport width changes. Resizes through breakpoints in a single browser session, screenshots each width, compares adjacent sizes, and reports where layouts break.
What this tests: Layout responsiveness — overflow, stacking, navigation transitions, content reflow.
What this does NOT test: General accessibility (ARIA, semantic HTML, heading hierarchy, colour contrast). Those don't vary by viewport width — use the ux-audit skill instead.
测试网站布局随视口宽度变化的适配情况。在单个浏览器会话中按断点调整窗口大小,对每个宽度截图,对比相邻尺寸的差异,并报告布局失效的位置。
测试范围:布局响应式表现 —— 内容溢出、堆叠方式、导航切换、内容重排。
非测试范围:通用可访问性(ARIA、语义化HTML、标题层级、色彩对比度)。这些属性不随视口宽度变化,建议使用ux-audit技能进行检测。

Browser Tool Priority

浏览器工具优先级

Before starting, detect available browser tools:
  1. playwright-cli (preferred) — supports resize, named sessions, and sub-agent parallelism. Run
    /playwright-cli
    first to load the full command reference.
  2. Playwright MCP (
    mcp__plugin_playwright_playwright__*
    ) —
    browser_resize
    for viewport changes.
  3. Chrome MCP (
    mcp__claude-in-chrome__*
    ) —
    resize_window
    for viewport changes. Uses the user's logged-in Chrome session.
If none are available, inform the user and suggest installing playwright-cli or Playwright MCP.
开始检测前,先识别可用的浏览器工具:
  1. playwright-cli(首选)——支持窗口调整、命名会话和子Agent并行处理。先运行
    /playwright-cli
    加载完整命令参考。
  2. Playwright MCP (
    mcp__plugin_playwright_playwright__*
    ) —— 用
    browser_resize
    实现视口调整。
  3. Chrome MCP (
    mcp__claude-in-chrome__*
    ) —— 用
    resize_window
    实现视口调整,使用用户已登录的Chrome会话。
若没有可用工具,需告知用户并建议安装playwright-cli或Playwright MCP。

Operating Modes

运行模式

Mode 1: Standard Check

模式1:标准检测

When: "check responsive", "responsiveness check", "test breakpoints"
Test 8 key breakpoints that cover the device spectrum:
WidthDevice Context
320pxSmall phone (iPhone SE)
375pxStandard phone (iPhone 14)
768pxTablet portrait (iPad)
1024pxTablet landscape / small laptop
1280pxLaptop
1440pxDesktop
1920pxFull HD
2560pxUltra-wide / 4K
Process:
  1. Open the URL in a single browser session (height: 900px)
  2. Start at 320px. For each breakpoint width: a. Resize the viewport b. Wait briefly for CSS reflow (layout transition) c. Screenshot the above-fold area d. If the page has significant below-fold content, scroll and screenshot e. Run the 8 layout checks (see matrix below) f. Note any issues with severity
  3. Compare adjacent widths — identify where layout transitions occur
  4. Write the report
触发指令:"check responsive"、"responsiveness check"、"test breakpoints"
测试覆盖全设备范围的8个关键断点:
宽度设备场景
320px小屏手机(iPhone SE)
375px标准手机(iPhone 14)
768px平板竖屏(iPad)
1024px平板横屏 / 小屏笔记本
1280px笔记本电脑
1440px桌面电脑
1920px全高清屏幕
2560px超宽屏 / 4K屏幕
检测流程
  1. 在单个浏览器会话中打开目标URL(窗口高度固定为900px)
  2. 从320px开始,对每个断点执行以下操作: a. 调整视口宽度 b. 短暂等待CSS重排(布局切换完成) c. 对首屏内容截图 d. 若页面有大量首屏以下内容,滚动后补充截图 e. 执行8项布局检测(见下方检测矩阵) f. 记录问题及严重等级
  3. 对比相邻宽度的截图,识别布局发生变化的节点
  4. 生成检测报告

Mode 2: Sweep

模式2:全范围扫描

When: "responsive sweep", "sweep all breakpoints", "find where it breaks"
Test every 160px from 320 to 2560 (15 widths total). Same single-session approach as Standard — just more data points. This is the mode for finding the exact width where a layout breaks.
Widths: 320, 480, 640, 800, 960, 1120, 1280, 1440, 1600, 1760, 1920, 2080, 2240, 2400, 2560
Briefly confirm before starting sweep mode (15 screenshots is a meaningful session).
触发指令:"responsive sweep"、"sweep all breakpoints"、"find where it breaks"
从320px到2560px,每间隔160px检测一次(共15个宽度)。采用与标准检测相同的单会话模式,但覆盖更多数据点。此模式用于精准定位布局失效的具体宽度。
检测宽度:320、480、640、800、960、1120、1280、1440、1600、1760、1920、2080、2240、2400、2560
启动前确认:全范围扫描会生成15张截图,属于较长会话,需先向用户确认。

Mode 3: Targeted Range

模式3:指定范围检测

When: "check between 768 and 1024", "test tablet breakpoints", "focus on mobile widths"
Test a user-specified range at 80px increments. Use when a known trouble zone needs detailed investigation.
Example: "check between 768 and 1024" tests: 768, 848, 928, 1008 (plus 1024 as endpoint).
触发指令:"check between 768 and 1024"、"test tablet breakpoints"、"focus on mobile widths"
在用户指定的宽度范围内,每间隔80px检测一次。适用于已知存在问题的区域,进行深度排查。
示例:"check between 768 and 1024" 会检测以下宽度:768、848、928、1008(额外包含终点1024px)。

Multi-URL

多URL批量检测

When testing multiple URLs (e.g., "check the homepage, about page, and contact page"):
  • Launch parallel sub-agents, one per URL (not per breakpoint)
  • Each sub-agent runs a standard check on its URL in its own named session
  • Combine results into a single report
undefined
当需要检测多个URL时(例如:"check the homepage, about page, and contact page"):
  • 启动并行子Agent,每个URL对应一个子Agent(而非每个断点对应一个)
  • 每个子Agent在独立的命名会话中对目标URL执行标准检测
  • 将所有子Agent的检测结果合并为一份报告
undefined

Sub-agent pattern (playwright-cli)

Sub-agent pattern (playwright-cli)

playwright-cli -s=page1 open https://example.com/ & playwright-cli -s=page2 open https://example.com/about &
undefined
playwright-cli -s=page1 open https://example.com/ & playwright-cli -s=page2 open https://example.com/about &
undefined

Layout Check Matrix

布局检测矩阵

These 8 checks target issues that actually vary by viewport width:
#CheckWhat to Look For
1Horizontal overflowContent wider than viewport — horizontal scrollbar appears, elements cut off
2Text overflowText truncated mid-word, overlapping adjacent elements, font size unreadable (< 12px)
3Navigation transitionHamburger menu appears/disappears at correct width, no "broken" state between modes
4Content stackingMulti-column layouts stack to single column in logical reading order on narrow widths
5Image/media scalingImages overflow container, distorted aspect ratios, missing responsive sizing
6Touch targetsInteractive elements < 44px on mobile widths (< 768px) — buttons, links, form inputs
7Whitespace balanceToo cramped on mobile (no breathing room), too sparse on wide screens (content lost in space)
8CTA visibilityPrimary call-to-action visible above the fold at each width without scrolling
以下8项检测专门针对随视口宽度变化的问题
序号检测项排查要点
1横向溢出内容宽度超过视口,出现横向滚动条,元素被截断
2文本溢出文本被中途截断、与相邻元素重叠、字体过小(<12px)导致无法阅读
3导航切换汉堡菜单在正确宽度下显示/隐藏,两种模式间无“失效”状态
4内容堆叠多列布局在窄屏时按合理阅读顺序堆叠为单列
5图片/媒体缩放图片溢出容器、比例失真、缺失响应式适配
6触控目标移动端宽度(<768px)下,交互元素尺寸<44px —— 按钮、链接、表单输入框等
7留白平衡移动端过于拥挤(无呼吸空间)、宽屏过于松散(内容淹没在空白中)
8CTA可见性各宽度下,主要行动召唤按钮(CTA)无需滚动即可在首屏显示

Transition Detection

布局变化检测

The unique value of this skill is finding where layout transitions happen and whether they're clean.
When comparing screenshots at adjacent widths, flag any width where:
  • Column count changes (3-col → 2-col → 1-col grid)
  • Navigation mode switches (full nav → hamburger, or vice versa)
  • Sidebar appears/disappears (content width jumps)
  • Grid reflows (cards wrap to next row)
Report the exact width range where each transition occurs:
TransitionFromToWidth Range
Nav: hamburger → full768px1024pxSwitches at ~960px
Grid: 1-col → 2-col640px768pxReflows at ~700px
Sidebar appears1024px1280pxShows at ~1100px
This tells the developer exactly where to set (or fix) their CSS breakpoints.
本技能的核心价值是定位布局变化的触发节点,并验证变化是否流畅。
对比相邻宽度的截图时,需标记出现以下变化的宽度:
  • 列数变化(3列 → 2列 → 1列网格)
  • 导航模式切换(完整导航 → 汉堡菜单,或反之)
  • 侧边栏显示/隐藏(内容宽度突变)
  • 网格重排(卡片换行)
报告中需明确记录每个变化的精确宽度范围
变化类型起始宽度结束宽度触发范围
导航:汉堡菜单 → 完整导航768px1024px约960px时切换
网格:1列 → 2列640px768px约700px时重排
侧边栏显示1024px1280px约1100px时出现
这能帮助开发者精准设置(或修复)CSS断点。

Severity Levels

严重等级划分

Consistent with ux-audit:
SeverityMeaning
CriticalLayout is broken — content unreadable, navigation inaccessible, page unusable
HighSignificant layout issue — major overflow, key content hidden, broken transition
MediumNoticeable but usable — awkward spacing, minor overflow, suboptimal stacking order
LowPolish — whitespace tweaks, slight alignment issues, minor touch target shortfalls
与ux-audit技能保持一致:
严重等级定义
Critical(致命)布局完全失效 —— 内容无法阅读、导航不可用、页面无法正常使用
High(高)严重布局问题 —— 大面积溢出、关键内容隐藏、切换状态失效
Medium(中)明显但不影响使用的问题 —— 间距不合理、轻微溢出、堆叠顺序不佳
Low(低)细节优化问题 —— 留白调整、轻微对齐偏差、触控目标尺寸略小

Autonomy Rules

自主执行规则

  • Just do it: Resize viewport, take screenshots, analyse layout, compare widths
  • Brief confirmation: Before sweep mode (15 viewports), before testing 4+ URLs in parallel
  • Ask first: Before interacting with forms or clicking through authentication flows
  • 直接执行:调整视口、截图、分析布局、对比宽度
  • 提前确认:启动全范围扫描(15个视口)、并行检测4个及以上URL时,需先向用户确认
  • 先询问再执行:涉及表单交互或身份验证流程时,需先征得用户同意

Report Output

报告输出

Write report to
docs/responsiveness-check-YYYY-MM-DD.md
(or inline for single-page quick checks).
See references/report-template.md for the report structure.
将报告写入
docs/responsiveness-check-YYYY-MM-DD.md
(单页面快速检测可直接输出在当前会话)。
报告结构参考references/report-template.md

Reference Files

参考文件

WhenRead
Looking up breakpoint details and trouble zonesreferences/breakpoints.md
Writing the responsiveness reportreferences/report-template.md
使用场景参考文件
查询断点细节和问题区域references/breakpoints.md
编写响应式检测报告references/report-template.md