Token导航 LogoToken导航

Agent Skill · 前端设计

responsive-styling(响应式样式)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

responsive-styling 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 5,342。

总安装 692周安装 28GitHub Stars 8下载 217核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/kanopi/cms-cultivator --skill responsive-styling

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

可通过 npx skills add 命令从指定 GitHub 仓库安装该技能。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。responsive-styling 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/responsive-styling

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/kanopi/cms-cultivator --skill responsive-styli…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

responsive-styling 怎么安装?

在终端执行 npx skills add https://github.com/kanopi/cms-cultivator --skill responsive-styling。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

responsive-styling 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

responsive-styling 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

responsive-styling 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

responsive-styling 用的人多吗?

公开数据是累计安装 692 次,近一周安装 28 次,下载 217 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

responsive-styling 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
responsive-styling

响应式样式 · 本页

6928只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Responsive Styling Skill

Purpose

Generate mobile-first, responsive CSS/SCSS that works across all devices and follows accessibility best practices.

Philosophy

Responsive design is accessibility. Mobile-first is user-first.

Core Beliefs

  1. Mobile First is Performance First: Start with constraints, enhance progressively
  2. Accessibility is Non-Negotiable: WCAG AA compliance is the baseline, not a bonus
  3. Exact Specifications Build Confidence: Calculate exact contrast ratios, don't estimate
  4. Touch-Friendly by Default: 44px minimum targets prevent user frustration

Why Mobile-First Responsive Styling Matters

  • User Experience: Most users access sites on mobile devices
  • Performance: Smaller initial payload, enhance for larger screens
  • Accessibility: Ensures usability for all users and devices
  • Professional Quality: Shows attention to detail and best practices

When This Skill Activates

This skill automatically activates when:

  • User asks to "make it responsive"
  • User mentions breakpoints, mobile, tablet, or desktop
  • Creating styles for a component
  • User asks about media queries
  • Responsive design is needed for implementation
  • WordPress block patterns need editor styling

Decision Framework

Before generating responsive styles, determine:

What's the Component Type?

  1. Layout container → Focus on width, padding, grid/flex
  2. Content block → Focus on typography, spacing, images
  3. Interactive element (button, form) → Focus on touch targets, states, transitions
  4. Navigation → Focus on mobile menu, breakpoint behavior
  5. Media (images, video) → Focus on aspect ratios, object-fit

What Are the Breakpoints?

Standard mobile-first breakpoints:

  • Base styles (320px+) - Mobile default
  • Tablet (768px+) - @media (min-width: 768px)
  • Desktop (1024px+) - @media (min-width: 1024px)
  • Large desktop (1440px+) - Optional for max-width constraints

When to add breakpoints:

  • ✅ Layout changes significantly (columns stack/unstack)
  • ✅ Typography scales (mobile 16px → desktop 18px)
  • ✅ Touch targets adjust (mobile 44px → desktop 40px)
  • ❌ Minor pixel adjustments (avoid breakpoint bloat)

What Accessibility Requirements?

WCAG 2.1 Level AA compliance:

  • ✅ Color contrast: 4.5:1 for normal text, 3:1 for large text (calculate exactly)
  • ✅ Touch targets: ≥ 44x44px on mobile, ≥ 40x40px on desktop
  • ✅ Focus indicators: 2px outline minimum, distinct from hover
  • ✅ Motion sensitivity: @media (prefers-reduced-motion: reduce)

What States Are Needed?

Interactive states (buttons, links):

  • :hover - Mouse pointer over element
  • :focus - Keyboard navigation focus
  • :focus-visible - Keyboard focus (not mouse click)
  • :active - During click/tap
  • :disabled - Inactive state

Priority: Focus states more important than hover (accessibility)

What Typography Scale?

Mobile-first sizing:

  • Body text: Start 16px (never below, readability)
  • Headings: Use clamp() for fluid scaling

- Example: font-size: clamp(1.5rem, 5vw, 2.5rem);

  • Line height: 1.5 for body, 1.2-1.3 for headings
  • Font weights: Use actual weights, not relative (400, 600, 700)

What Spacing System?

Consistent spacing scale (choose one):

  • 8px grid: 8px, 16px, 24px, 32px, 40px, 48px, 64px
  • rem-based: 0.5rem, 1rem, 1.5rem, 2rem, 3rem, 4rem

Apply consistently:

  • Margins, padding, gaps use same scale
  • Avoid arbitrary values (17px, 23px)

Decision Tree

User requests responsive styles
    ↓
Determine component type
    ↓
Define mobile-first base styles (320px+)
    ↓
Calculate contrast ratios (WCAG AA)
    ↓
Add tablet breakpoint (768px+) if layout changes
    ↓
Add desktop breakpoint (1024px+) if needed
    ↓
Add all interactive states (focus > hover)
    ↓
Add reduced motion support
    ↓
Output mobile-first SCSS with exact values

Core Principles

1. Mobile-First Approach

Always write base styles for mobile, then enhance for larger screens:

// ✅ CORRECT: Mobile-first
.component {
  font-size: 1rem;        // Base mobile style
  padding: 1rem;

  @media (min-width: 768px) {
    font-size: 1.125rem;  // Enhance for tablet
    padding: 2rem;
  }

  @media (min-width: 1024px) {
    font-size: 1.25rem;   // Enhance for desktop
    padding: 3rem;
  }
}

// ❌ WRONG: Desktop-first
.component {
  font-size: 1.25rem;

  @media (max-width: 1024px) {
    font-size: 1.125rem;
  }

  @media (max-width: 768px) {
    font-size: 1rem;
  }
}

2. Standard Breakpoints

Use consistent breakpoints:

// Mobile: 320px - 767px (base styles, no media query)
// Tablet: 768px - 1023px
$breakpoint-tablet: 768px;

// Desktop: 1024px+
$breakpoint-desktop: 1024px;

// Optional additional breakpoints
$breakpoint-mobile-large: 480px;
$breakpoint-tablet-large: 960px;
$breakpoint-desktop-large: 1280px;

3. Responsive Typography

Scale typography appropriately:

.heading-1 {
  // Mobile base
  font-size: 2rem;        // 32px
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;

  // Tablet
  @media (min-width: 768px) {
    font-size: 2.5rem;    // 40px
    margin-bottom: 1.5rem;
  }

  // Desktop
  @media (min-width: 1024px) {
    font-size: 3rem;      // 48px
    margin-bottom: 2rem;
  }
}

.body-text {
  // Mobile base
  font-size: 1rem;        // 16px
  line-height: 1.6;

  // Tablet
  @media (min-width: 768px) {
    font-size: 1.125rem;  // 18px
    line-height: 1.7;
  }

  // Desktop
  @media (min-width: 1024px) {
    font-size: 1.25rem;   // 20px
    line-height: 1.8;
  }
}

4. Responsive Spacing

Use fluid spacing that scales:

// Method 1: Stepped spacing
.section {
  // Mobile
  padding: 2rem 1rem;
  margin-bottom: 2rem;

  // Tablet
  @media (min-width: 768px) {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
  }

  // Desktop
  @media (min-width: 1024px) {
    padding: 4rem 3rem;
    margin-bottom: 4rem;
  }
}

// Method 2: Fluid spacing with clamp
.section-fluid {
  // Scales smoothly between mobile and desktop
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

5. Responsive Layouts

Stacked to Columns
.card-grid {
  display: grid;
  gap: 1.5rem;

  // Mobile: single column
  grid-template-columns: 1fr;

  // Tablet: 2 columns
  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  // Desktop: 3 columns
  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}
Flexbox Responsive
.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;

  // Mobile: stack vertically
  flex-direction: column;

  // Tablet and up: horizontal
  @media (min-width: 768px) {
    flex-direction: row;
    gap: 2rem;
  }

  .flex-item {
    // Mobile: full width
    flex: 1 1 100%;

    // Tablet: 2 items per row
    @media (min-width: 768px) {
      flex: 1 1 calc(50% - 1rem);
    }

    // Desktop: 3 items per row
    @media (min-width: 1024px) {
      flex: 1 1 calc(33.333% - 1.333rem);
    }
  }
}

WordPress-Specific Patterns

Full-Width Sections

// Handle WordPress core padding
.wp-block-cover {
  // Full viewport width accounting for theme padding
  width: calc(100vw - var(--wp--style--root--padding-left) - var(--wp--style--root--padding-right));
  max-width: none;

  // Center it
  margin-left: calc(-1 * var(--wp--style--root--padding-left));
  margin-right: calc(-1 * var(--wp--style--root--padding-right));
}

Responsive Block Patterns

// Pattern wrapper
.wp-block-group.pattern-name {
  // Mobile
  padding: 2rem 1rem;

  // Inner content container
  .wp-block-group__inner-container {
    max-width: 100%;
    margin: 0 auto;

    // Tablet
    @media (min-width: 768px) {
      max-width: 750px;
    }

    // Desktop
    @media (min-width: 1024px) {
      max-width: 1200px;
    }
  }
}

Drupal-Specific Patterns

Paragraph Responsive Styles

.paragraph--type--name {
  // Mobile base
  padding: 2rem 1rem;

  // Inner container
  .paragraph__content {
    max-width: 100%;
    margin: 0 auto;

    @media (min-width: 768px) {
      padding: 3rem 2rem;
      max-width: 750px;
    }

    @media (min-width: 1024px) {
      padding: 4rem 3rem;
      max-width: 1200px;
    }
  }
}

Field Responsive Display

.field--name-field-items {
  display: grid;
  gap: 1rem;

  // Mobile: stack
  grid-template-columns: 1fr;

  // Tablet: 2 up
  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  // Desktop: 3 up
  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

WordPress Block Editor Styles

IMPORTANT: WordPress block patterns require TWO separate stylesheets:

1. Front-End Stylesheet

Standard styles that apply to published pages. No special wrapper needed.

2. Editor Stylesheet

Styles for the WordPress block editor (admin). Must wrap all selectors with .editor-styles-wrapper.

Example:

Front-end (_hero-cta.scss):

.hero-cta-pattern {
  padding: 2rem 1rem;
  background: #0073aa;
  color: #ffffff;

  @media (min-width: 768px) {
    padding: 3rem 2rem;
  }
}

Editor (_hero-cta-editor.scss):

// Wrap everything with .editor-styles-wrapper
.editor-styles-wrapper {
  .hero-cta-pattern {
    padding: 2rem 1rem;
    background: #0073aa;
    color: #ffffff;

    @media (min-width: 768px) {
      padding: 3rem 2rem;
    }
  }
}

Why this is necessary:

  • WordPress block editor uses .editor-styles-wrapper as a scoping mechanism
  • Without this wrapper, styles won't apply in the admin editor
  • Pattern appears unstyled when inserted, confusing users

Responsive Images

Basic Responsive Image

img {
  max-width: 100%;
  height: auto;
  display: block;
}

Responsive Background Images

.hero-background {
  background-size: cover;
  background-position: center;
  min-height: 300px;

  @media (min-width: 768px) {
    min-height: 400px;
  }

  @media (min-width: 1024px) {
    min-height: 600px;
  }
}

Art Direction

.responsive-image {
  // Mobile: portrait crop
  aspect-ratio: 4/5;
  object-fit: cover;

  // Tablet: square
  @media (min-width: 768px) {
    aspect-ratio: 1/1;
  }

  // Desktop: landscape
  @media (min-width: 1024px) {
    aspect-ratio: 16/9;
  }
}

Touch-Friendly Design

Minimum Touch Targets

button,
a,
input,
select {
  // Minimum 44x44px for touch
  min-height: 44px;
  min-width: 44px;

  // Larger on very small screens
  @media (max-width: 375px) {
    min-height: 48px;
    min-width: 48px;
  }
}

Spacing for Touch

.touch-menu {
  li {
    // More spacing on mobile
    margin-bottom: 0.5rem;

    a {
      // Larger tap area
      padding: 0.75rem 1rem;
      display: block;
    }
  }

  // Less spacing needed on desktop with mouse
  @media (min-width: 1024px) {
    li {
      margin-bottom: 0.25rem;

      a {
        padding: 0.5rem 1rem;
      }
    }
  }
}

Accessibility in Responsive Design

Focus Indicators

a, button, input, select {
  &:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  // More prominent on mobile
  @media (max-width: 767px) {
    &:focus {
      outline-width: 3px;
    }
  }
}

Text Readability

.content {
  // Mobile: shorter line length
  max-width: 100%;

  // Desktop: optimal reading width
  @media (min-width: 768px) {
    max-width: 65ch; // ~65 characters per line
  }
}

Reduced Motion

// Respect user's motion preferences
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Common Responsive Patterns

Hide/Show Elements

// Show only on mobile
.mobile-only {
  display: block;

  @media (min-width: 768px) {
    display: none;
  }
}

// Hide on mobile
.desktop-only {
  display: none;

  @media (min-width: 768px) {
    display: block;
  }
}

// Tablet and up
.tablet-up {
  display: none;

  @media (min-width: 768px) {
    display: block;
  }
}

Responsive Navigation

.main-nav {
  // Mobile: hamburger menu
  @media (max-width: 767px) {
    .menu-toggle {
      display: block;
    }

    .menu-items {
      display: none;

      &.is-open {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
      }
    }
  }

  // Desktop: horizontal menu
  @media (min-width: 768px) {
    .menu-toggle {
      display: none;
    }

    .menu-items {
      display: flex;
      gap: 2rem;
    }
  }
}

Responsive Typography System

// Define fluid typography
:root {
  // Scales from 16px to 20px
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);

  // Scales from 32px to 48px
  --font-size-h1: clamp(2rem, 1.5rem + 2vw, 3rem);

  // Scales from 24px to 32px
  --font-size-h2: clamp(1.5rem, 1.25rem + 1vw, 2rem);

  // Scales from 20px to 24px
  --font-size-h3: clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem);
}

body {
  font-size: var(--font-size-base);
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

Testing Checklist

When generating responsive styles, ensure:

  • Mobile base styles defined first
  • Breakpoints use min-width (mobile-first)
  • Touch targets are 44px minimum
  • Text is readable at all sizes
  • Images scale properly
  • Layouts don't break at any width
  • Horizontal scrolling is prevented
  • Focus indicators are visible
  • Reduced motion is respected
  • Content is accessible at 320px width
  • Layout works up to 2560px width

Output Format

When generating responsive styles, provide:

/* Component Name */

/* Mobile base styles (320px - 767px) */
.component {
  /* All base styles here */
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) {
  .component {
    /* Tablet enhancements */
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .component {
    /* Desktop enhancements */
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  /* Reduced motion styles */
}

Common Mistakes to Avoid

❌ Desktop-first (using max-width) ❌ Magic numbers (random breakpoints) ❌ Forgetting touch targets ❌ Fixed pixel widths that don't scale ❌ Tiny text on mobile (<16px) ❌ Horizontal scrolling ❌ Ignoring landscape mobile ❌ Breaking at intermediate sizes

✅ Mobile-first (using min-width) ✅ Consistent breakpoints ✅ 44px minimum touch targets ✅ Flexible widths with max-width ✅ 16px minimum text ✅ Contained content ✅ Test at 320px, 768px, 1024px ✅ Test at all widths

平台分布

Antigravity

34.97%
按下载量换算76

Cursor

22.77%
按下载量换算49

weavefox

17.96%
按下载量换算39

Codex

10.47%
按下载量换算23

Claude Code

4.2%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills