Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

responsive-design响应式设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

606

周安装

25

GitHub Stars

11

下载量

198
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:responsive-design(响应式设计)
来源仓库:https://github.com/akillness/skills-template
仓库路径:skills/responsive-design
安装命令:
npx skills add https://github.com/akillness/skills-template --skill responsive-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/akillness/skills-template --skill responsive-design

简介

用于界面在不同屏幕尺寸下的适配设计与验证。

  • 帮助选择正确的响应式策略并明确视口与容器决策。
  • 包含布局检查清单和交接规范,避免过度依赖断点。
  • 安装命令:npx skills add https://github.com/akillness/skills-template --skill responsive-design
  • 设计时应结合品牌规范和用户任务,并通过预览确认文本溢出等问题

SKILL.md

Responsive Design

Use this skill when the main question is "how should this interface adapt across screen sizes or container sizes, and how do we verify it without turning the codebase into breakpoint soup?"

This skill is not a generic CSS tutorial. It should:

  1. classify the responsive problem,
  2. choose the right adaptation surface,
  3. keep viewport and container decisions explicit,
  4. call out verification requirements early,
  5. route neighboring concerns to the right frontend skill.

Read references/layout-decision-checklist.md before designing or refactoring a responsive layout. Read references/handoff-boundaries.md when deciding whether responsive-design, ui-component-patterns, web-accessibility, design-system, or web-design-guidelines should own the next step.

When to use this skill

  • Fix layouts that overflow, wrap badly, collapse awkwardly, or force horizontal scrolling on smaller screens
  • Plan mobile-first page, dashboard, card-grid, form, nav, table, or media layouts
  • Decide whether a change belongs in viewport breakpoints, container queries, intrinsic layout rules, or responsive media behavior
  • Review whether a layout is overfitted to one screen size or relying on too many one-off overrides
  • Turn vague requests like “this page breaks on mobile” into a concrete responsive strategy and verification plan
  • Define responsive test cases for zoom/reflow, content density, and breakpoints
  • Add container-query thinking to reusable UI without turning every problem into a component-API rewrite

When not to use this skill

  • The main task is reusable primitive / variant / slot API design → use ui-component-patterns
  • The main task is keyboard/focus behavior, semantics, labels, contrast, reduced motion, or manual a11y remediation → use web-accessibility
  • The main task is system-wide tokens, breakpoint policy across many products, naming rules, or contribution governance → use design-system
  • The main task is broad UI critique, design polish, or interface-guideline review → use web-design-guidelines
  • The task is mostly React/Next.js performance, hydration, or rerender behavior → use react-best-practices
  • The layout adaptation rules are already clear and the job is just implementation; in that case implement directly instead of reopening the architecture decision

Instructions

Step 1: Classify the responsive failure before writing CSS

Do not start with “add another breakpoint.”

First decide which kind of problem you have:

  • Viewport adaptation — page/grid/nav/layout changes because the available screen width changes
  • Container adaptation — a component needs to behave differently depending on the width of its parent, not the whole viewport
  • Content-density stress — real text, tables, cards, filters, or localized strings do not fit the assumed layout
  • Media adaptation — images/video/embeds crop, distort, or download the wrong asset size
  • Verification failure — the layout might look fine at one browser width but fail under zoom, reflow, or narrower containers

Quick framing template:

Responsive problem:
- Surface: dashboard table + filter toolbar
- Failure mode: horizontal scrolling on mobile and at 400% zoom
- Likely owner: responsive-design
- Related handoff: web-accessibility for reflow verification, ui-component-patterns only if the toolbar primitive API is wrong

Step 2: Choose the adaptation surface deliberately

Use the smallest surface that actually owns the behavior.

Use viewport rules when

  • the whole page or major layout region changes with screen size
  • navigation, sidebars, page columns, or full-page density shifts are involved
  • the layout decision should be consistent across many containers on the page

Use container rules when

  • a reusable card, panel, or embedded module appears in multiple widths
  • the component should adapt based on the width of its parent, not the browser window
  • the same component can appear in a sidebar, feed, modal, or dashboard slot

Use intrinsic/flexible layout first when possible

Prefer layouts that naturally adapt before adding more conditions:

  • fluid widths
  • minmax() / auto-fit grid
  • wrapping flex rows
  • sensible max-width
  • text wrapping / line length constraints
  • content-driven sizing

If intrinsic layout solves the problem, do not create a tower of breakpoints.

Step 3: Start from a mobile-first baseline

Mobile-first is still the safest default for feature delivery.

Healthy baseline rules:

  • define the smallest-screen/default layout first
  • add complexity only when the space is actually available
  • treat larger layouts as progressive enhancement
  • write breakpoints around layout pressure, not device brand names

Bad pattern:

@media (max-width: 1024px) { ... }
@media (max-width: 992px) { ... }
@media (max-width: 991px) { ... }
@media (max-width: 768px) { ... }
@media (max-width: 767px) { ... }

Better pattern:

.dashboard {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .dashboard {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}

Use fewer breakpoints with clearer reasons.

Step 4: Use container queries when the component’s parent drives the layout

Container queries are not for every problem, but they are the clean answer when viewport rules create brittle component reuse.

Use them when:

  • a card or panel is reused in multiple column widths
  • a component should switch density/layout based on the slot it lives in
  • the same module appears in a feed, sidebar, modal, or dashboard area

Pattern:

.card-shell {
  container-type: inline-size;
}

.card {
  display: grid;
  gap: 0.75rem;
}

@container (width > 42rem) {
  .card {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
  }
}

Do not use container queries to hide a confused component API. If the real issue is primitive structure, route to ui-component-patterns.

Step 5: Plan for common responsive pressure points

Navigation

Prioritize wrapping, overflow handling, menu trigger behavior, and content hierarchy. Avoid nav bars that only work at one label length.

Forms and toolbars

Prioritize field stacking, button grouping, label/help/error space, and real text length under smaller widths.

Tables and data-heavy views

Prioritize what must remain tabular versus what can stack, collapse, scroll, summarize, or switch presentation. Reflow exceptions can exist, but make them intentional.

Cards, grids, and feeds

Prioritize intrinsic column behavior, readable line lengths, and whether cards should adapt to their container.

Media and embeds

Prioritize aspect ratio, crop strategy, object-fit, srcset / sizes, and whether the layout depends on art direction.

Typography and density

Prioritize readable line lengths, spacing scale, wrapping, and hierarchy; fluid type can help, but do not let it replace layout thinking.

Step 6: Treat accessibility and reflow as verification requirements, not afterthoughts

Responsive design is not just about “looks okay when resized.”

Always check:

  • does content avoid unnecessary two-dimensional scrolling?
  • do long labels, localization, and user zoom break the layout?
  • do controls remain reachable and readable?
  • does the layout still make sense at narrow widths and high zoom?

If the main work becomes semantic remediation, touch-target fixes, keyboard/focus behavior, or manual accessibility verification, route to web-accessibility.

Step 7: Keep neighboring concerns as route-outs, not ownership theft

This skill should acknowledge nearby work without absorbing it.

Examples:

  • if a responsive problem comes from an overstuffed reusable primitive, route API redesign to ui-component-patterns
  • if the team needs one breakpoint/token policy across many apps, route governance to design-system
  • if the request is “audit this whole interface,” route broad critique to web-design-guidelines
  • if reflow issues become accessibility remediation, route verification/fixes to web-accessibility

Mixed requests are normal. Split them explicitly instead of forcing one skill to own everything.

Step 8: Produce the responsive strategy packet

End with a concise artifact another engineer or agent can execute.

Preferred format:

# Responsive Strategy Packet

## Surface
- Page / component / container:
- Failure mode:
- Primary owner:

## Layout strategy
- Mobile-first baseline:
- Viewport breakpoints:
- Container-query usage:
- Intrinsic layout rules:
- Media behavior:

## Boundaries
- Keeps:
- Routes to neighboring skills:

## Verification
- Narrow-width checks:
- Zoom/reflow checks:
- Overflow/wrapping checks:
- Responsive media checks:

Examples

Example 1: Dashboard overflow on mobile

Input: “This analytics dashboard looks fine on desktop but the filter bar and table break on mobile.”

Good output direction:

  • classify the problem as page-level layout + data-view adaptation
  • keep a mobile-first single-column baseline
  • decide whether the table needs intentional horizontal scroll, summarization, or a stacked representation
  • include zoom/reflow verification and route semantic remediation to web-accessibility if needed

Example 2: Reusable card in many widths

Input: “The same product card appears in a sidebar, a 2-column grid, and a full-width feed. Should we keep adding viewport breakpoints?”

Good output direction:

  • classify the problem as container-driven adaptation
  • recommend container queries or intrinsic layout rules at the card-shell boundary
  • keep primitive API questions routed to ui-component-patterns
  • avoid adding page-level breakpoints when the parent slot is the real driver

Example 3: System-wide breakpoint debate

Input: “Our teams all use different breakpoints and spacing rules. Is this a responsive-design issue?”

Good output direction:

  • explain that cross-app breakpoint and token policy is broader design-system work
  • preserve responsive-design for local/page/component adaptation strategy
  • suggest a clean handoff instead of over-triggering this skill

Best practices

  1. Prefer intrinsic layout and content-driven sizing before reaching for many breakpoint overrides.
  2. Use mobile-first defaults and add complexity only where space genuinely changes the job to be done.
  3. Use container queries when the component’s parent width matters more than the viewport width.
  4. Write verification steps for overflow, wrapping, zoom/reflow, and responsive media instead of relying on visual guesswork.
  5. Treat tables, nav, forms, and filter bars as high-risk responsive surfaces that need explicit decisions.
  6. Route component API redesign to ui-component-patterns, not to more CSS.
  7. Route accessibility-heavy remediation to web-accessibility, especially when reflow and usability failures dominate.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.94%
按下载量换算71

Claude

30.92%
按下载量换算61

Cursor

18.9%
按下载量换算37

Gemini CLI

8.94%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills