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

designing-layouts设计布局

Agent Skill

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

总安装

939

周安装

38

GitHub Stars

350

下载量

295
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ancoleman/ai-design-components --skill designing-layouts

简介

该技能提供现代 CSS 布局方案,包括网格系统、弹性盒与容器查询技术。

  • 适用于响应式仪表盘、卡片网格与分栏界面设计,支持移动端优先策略。
  • 整合间距系统与断点管理,构建灵活且无障碍的跨平台界面。
  • 安装前需确认项目使用 CSS-in-JS 或预处理器,建议结合构建工具验证样式输出。
  • designing-layouts 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Layout Systems & Responsive Design

Purpose

This skill provides comprehensive guidance for creating responsive layout systems using modern CSS techniques. It covers grid systems, flexbox patterns, container queries, spacing systems, and mobile-first design strategies to build flexible, accessible interfaces that adapt seamlessly across devices.

When to Use

Invoke this skill when:

  • Building responsive admin dashboards with sidebars and headers
  • Creating grid-based layouts for content cards or galleries
  • Implementing masonry or Pinterest-style layouts
  • Designing split-pane interfaces with resizable panels
  • Establishing responsive breakpoint systems
  • Structuring application shells with navigation and content areas
  • Building mobile-first responsive designs
  • Creating flexible spacing and container systems

Layout Patterns

Grid Systems

For structured, two-dimensional layouts, use CSS Grid with design tokens.

12-Column Grid:

.grid-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding-x);
}

.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }

Auto-Fit Responsive Grid:

.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--grid-gap);
}

For complex grid layouts and advanced patterns, see references/layout-patterns.md.

Flexbox Patterns

For one-dimensional layouts and alignment control.

Holy Grail Layout:

.holy-grail {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.holy-grail__body {
  flex: 1;
  display: flex;
}

.holy-grail__nav {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.holy-grail__main {
  flex: 1;
  min-width: 0; /* Prevent overflow */
}

.holy-grail__aside {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

For additional flexbox patterns including sticky footer and centering, see references/css-techniques.md.

Container Queries

For component-responsive design that adapts based on container size, not viewport.

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

@container card (min-width: 400px) {
  .card {
    grid-template-columns: auto 1fr;
    gap: var(--spacing-lg);
  }
}

@container card (min-width: 600px) {
  .card {
    grid-template-columns: 200px 1fr auto;
  }
}

Container queries are production-ready in all modern browsers (2025). For detailed usage and fallback strategies, see references/responsive-strategies.md.

Responsive Breakpoints

Use mobile-first approach with semantic breakpoints.

/* Mobile-first breakpoints using design tokens */
@media (min-width: 640px) {  /* sm: Tablet portrait */
  .container { max-width: 640px; }
}

@media (min-width: 768px) {  /* md: Tablet landscape */
  .container { max-width: 768px; }
}

@media (min-width: 1024px) { /* lg: Desktop */
  .container { max-width: 1024px; }
}

@media (min-width: 1280px) { /* xl: Wide desktop */
  .container { max-width: 1280px; }
}

@media (min-width: 1536px) { /* 2xl: Ultra-wide */
  .container { max-width: 1536px; }
}

For fluid typography and advanced responsive techniques, see references/responsive-strategies.md.

Spacing Systems

Implement consistent spacing using design tokens.

/* Base unit: 4px or 8px */
:root {
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
}

/* Apply systematically */
.section { padding: var(--section-spacing) 0; }
.container { padding: 0 var(--container-padding-x); }
.card { padding: var(--spacing-lg); }
.stack > * + * { margin-top: var(--spacing-md); }

CSS Framework Integration

Tailwind CSS

For utility-first approach with custom configuration:

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      spacing: {
        'xs': 'var(--spacing-xs)',
        'sm': 'var(--spacing-sm)',
        'md': 'var(--spacing-md)',
        'lg': 'var(--spacing-lg)',
        'xl': 'var(--spacing-xl)',
      },
      screens: {
        'sm': '640px',
        'md': '768px',
        'lg': '1024px',
        'xl': '1280px',
        '2xl': '1536px',
      }
    }
  }
}

For Tailwind patterns and optimization, see references/library-guide.md.

How to Use

1. Define Layout Requirements

Determine layout type and responsive behavior needed.

2. Choose Layout Method

  • CSS Grid: Two-dimensional layouts, complex grids
  • Flexbox: One-dimensional layouts, alignment
  • Container Queries: Component-responsive designs

3. Implement with Design Tokens

Use design tokens from skills/design-tokens/ for consistent spacing, breakpoints, and sizing.

4. Generate Configurations

For responsive breakpoints:

node scripts/generate_breakpoints.js --approach mobile-first

For fluid typography scale:

node scripts/calculate_fluid_typography.js --min-vw 320 --max-vw 1920

5. Validate Accessibility

Check semantic HTML and landmark regions:

node scripts/validate_layout_accessibility.js path/to/component.tsx

6. Test Responsiveness

Test across device sizes using responsive preview tools and actual devices.

Scripts

  • scripts/generate_breakpoints.js - Generate responsive breakpoint system
  • scripts/calculate_fluid_typography.js - Calculate fluid typography scales
  • scripts/validate_layout_accessibility.js - Validate semantic HTML and ARIA landmarks

References

  • references/layout-patterns.md - Common layout patterns (sidebar, masonry, split-pane)
  • references/responsive-strategies.md - Mobile-first design and responsive techniques
  • references/css-techniques.md - Modern CSS features (Grid, Flexbox, Container Queries)
  • references/accessibility-layouts.md - Semantic HTML and ARIA landmarks
  • references/library-guide.md - Framework integration (Tailwind, styled-components)
  • references/performance-optimization.md - CSS performance and layout thrashing

Examples

  • examples/admin-layout.tsx - Complete admin dashboard with sidebar
  • examples/responsive-grid.tsx - Auto-responsive grid system
  • examples/masonry-layout.tsx - Pinterest-style masonry grid
  • examples/split-pane.tsx - Resizable split-pane interface

Assets

  • assets/breakpoint-config.json - Standard breakpoint configurations
  • assets/layout-templates.json - Common layout templates
  • assets/spacing-scale.json - Spacing system configurations

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenCode

27.72%
按下载量换算82

Gemini CLI

21.97%
按下载量换算65

Antigravity

17.57%
按下载量换算52

Claude Code

12.14%
按下载量换算36

kilo

7.4%
按下载量换算22

roo

3.43%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills