Token导航 LogoToken导航

Agent Skill · 前端设计

design-foundation(设计基础)

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

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

总安装 1,067周安装 44GitHub Stars 21下载 348核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/sanky369/vibe-building-skills --skill design-foundation

这个 Skill 是做什么的

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

构建基于令牌的现代化设计系统,涵盖色彩、间距、动效等基础要素。适合从零开始搭建企业级组件库,或规范化已有项目的视觉资产。采用原子化分层结构,确保扩展性与维护性达到生产级别标准。必须建立治理机制,防止团队成员随意添加非标样式破坏一致性。

design-foundation 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/design-foundation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

design-foundation 怎么安装?

在终端执行 npx skills add https://github.com/sanky369/vibe-building-skills --skill design-foundation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

design-foundation 支持哪些 AI 工具?

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

design-foundation 需要什么权限?

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

design-foundation 是免费的吗?

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

design-foundation 用的人多吗?

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

design-foundation 安全吗?

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

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

值得选的地方

  • 同时适配 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只读未明确通过
design-foundation

设计基础 · 本页

1,06721只读MIT通过

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

SKILL.md 原文

Design Foundation

Overview

A design foundation is the bedrock upon which all great products are built. It's not just a collection of colors and fonts—it's a system of decisions that enables your team to build consistently, quickly, and with intention.

This skill helps you create or formalize your design foundation, whether you're starting from scratch or documenting what already exists. It covers design tokens, component structure, design principles documentation, and the governance model for your system.

Core Methodology: Token-Based Design Systems

Modern design systems are built on the concept of design tokens—named entities that store design decisions. Rather than hardcoding colors or spacing values throughout your codebase, tokens centralize these decisions, making them easy to maintain, theme, and scale.

The Token Hierarchy

Design tokens are organized in layers, from most abstract to most concrete:

Layer 1: Global Tokens (The Foundation) These are your base design decisions—the raw materials of your system.

Global Tokens:
├── Colors
│   ├── Primary: #3B82F6
│   ├── Secondary: #8B5CF6
│   ├── Success: #10B981
│   ├── Warning: #F59E0B
│   ├── Error: #EF4444
│   ├── Neutral-50: #F9FAFB
│   ├── Neutral-100: #F3F4F6
│   └── ... (up to Neutral-950)
├── Typography
│   ├── Font-Family-Base: Inter, system-ui, sans-serif
│   ├── Font-Size-Base: 16px
│   ├── Line-Height-Base: 1.5
│   └── Font-Weight: (300, 400, 500, 600, 700, 800)
├── Spacing
│   ├── Space-0: 0
│   ├── Space-1: 0.25rem (4px)
│   ├── Space-2: 0.5rem (8px)
│   ├── Space-3: 0.75rem (12px)
│   └── ... (up to Space-12+)
├── Shadows
│   ├── Shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05)
│   ├── Shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1)
│   └── ...
└── Border Radius
    ├── Radius-sm: 0.25rem (4px)
    ├── Radius-md: 0.375rem (6px)
    ├── Radius-lg: 0.5rem (8px)
    └── ...

Layer 2: Semantic Tokens (The Meaning) These tokens assign meaning to global tokens based on context and usage.

Semantic Tokens:
├── Colors
│   ├── Background-Primary: {Global.Neutral-50}
│   ├── Background-Secondary: {Global.Neutral-100}
│   ├── Text-Primary: {Global.Neutral-950}
│   ├── Text-Secondary: {Global.Neutral-600}
│   ├── Border-Primary: {Global.Neutral-200}
│   ├── Interactive-Primary: {Global.Primary}
│   ├── Interactive-Hover: {Global.Primary-600}
│   ├── Interactive-Active: {Global.Primary-700}
│   ├── State-Success: {Global.Success}
│   ├── State-Warning: {Global.Warning}
│   └── State-Error: {Global.Error}
├── Typography
│   ├── Heading-1: (Font-Size: 32px, Line-Height: 1.2, Font-Weight: 700)
│   ├── Heading-2: (Font-Size: 24px, Line-Height: 1.3, Font-Weight: 600)
│   ├── Body-Large: (Font-Size: 18px, Line-Height: 1.5, Font-Weight: 400)
│   ├── Body-Regular: (Font-Size: 16px, Line-Height: 1.5, Font-Weight: 400)
│   ├── Body-Small: (Font-Size: 14px, Line-Height: 1.5, Font-Weight: 400)
│   └── Caption: (Font-Size: 12px, Line-Height: 1.4, Font-Weight: 500)
├── Spacing
│   ├── Padding-Component: {Global.Space-4}
│   ├── Padding-Section: {Global.Space-8}
│   ├── Margin-Component: {Global.Space-3}
│   └── Gap-Component: {Global.Space-4}
└── Shadows
    ├── Elevation-1: {Global.Shadow-sm}
    ├── Elevation-2: {Global.Shadow-md}
    └── Elevation-3: {Global.Shadow-lg}

Layer 3: Component Tokens (The Application) These tokens are specific to individual components and use semantic tokens as their values.

Component Tokens:
├── Button
│   ├── Button-Primary-Background: {Semantic.Interactive-Primary}
│   ├── Button-Primary-Background-Hover: {Semantic.Interactive-Hover}
│   ├── Button-Primary-Text: {Semantic.Text-Inverse}
│   ├── Button-Padding: {Semantic.Padding-Component}
│   └── Button-Border-Radius: {Global.Radius-md}
├── Card
│   ├── Card-Background: {Semantic.Background-Primary}
│   ├── Card-Border: {Semantic.Border-Primary}
│   ├── Card-Padding: {Semantic.Padding-Component}
│   ├── Card-Border-Radius: {Global.Radius-lg}
│   └── Card-Shadow: {Semantic.Elevation-1}
└── Input
    ├── Input-Background: {Semantic.Background-Primary}
    ├── Input-Border: {Semantic.Border-Primary}
    ├── Input-Border-Hover: {Semantic.Border-Secondary}
    ├── Input-Text: {Semantic.Text-Primary}
    ├── Input-Padding: {Semantic.Padding-Component}
    └── Input-Border-Radius: {Global.Radius-md}

Implementing Tokens with Tailwind CSS

Tailwind CSS is designed around the concept of tokens. Your tailwind.config.js file is essentially your token system:

module.exports = {
  theme: {
    // Global Tokens
    colors: {
      primary: {
        50: '#EFF6FF',
        100: '#DBEAFE',
        500: '#3B82F6',
        600: '#2563EB',
        700: '#1D4ED8',
        950: '#0C2340',
      },
      secondary: {
        50: '#F3E8FF',
        500: '#8B5CF6',
        600: '#7C3AED',
        950: '#2E1065',
      },
      success: '#10B981',
      warning: '#F59E0B',
      error: '#EF4444',
      neutral: {
        50: '#F9FAFB',
        100: '#F3F4F6',
        600: '#4B5563',
        950: '#030712',
      },
    },
    // Semantic Tokens (via CSS variables or custom utilities)
    extend: {
      backgroundColor: {
        'bg-primary': 'var(--color-bg-primary)',
        'bg-secondary': 'var(--color-bg-secondary)',
      },
      textColor: {
        'text-primary': 'var(--color-text-primary)',
        'text-secondary': 'var(--color-text-secondary)',
      },
      spacing: {
        'component': 'var(--space-component)',
        'section': 'var(--space-section)',
      },
    },
  },
};

Design System Audit: What to Document

When formalizing your design foundation, audit and document these elements:

1. Design Principles

These are the "why" behind your design decisions. They guide all future work.

Example Design Principles:

  • Clarity First — Every element should communicate its purpose clearly. Remove ambiguity.
  • Consistency Builds Trust — Patterns should be predictable. Users should recognize patterns across the product.
  • Accessibility is Foundational — Design for all users, including those with disabilities. Accessibility is not a feature; it's a requirement.
  • Simplicity Through Reduction — Remove everything that doesn't serve the user's goal. Simplicity is the result of careful reduction.
  • Intentionality Matters — Every decision should have a reason. Avoid arbitrary choices.
  • Performance is Part of Design — A beautiful interface that's slow is not good design. Speed matters.

2. Color System

Document your color palette, including:

  • Primary, secondary, and accent colors
  • Neutral/grayscale colors (for text, backgrounds, borders)
  • Semantic colors (success, warning, error, info)
  • Color usage guidelines (when to use which color)
  • Contrast ratios for accessibility (WCAG AA or AAA)
  • Dark mode variants (if applicable)

Audit Questions:

  • How many colors are actually used in your product?
  • Are colors used consistently?
  • Do all color combinations meet WCAG AA contrast requirements?
  • Do you have a dark mode? If so, are tokens defined for it?

3. Typography System

Document your typography, including:

  • Font families (primary, secondary, monospace)
  • Font sizes (and the logic behind them—e.g., modular scale)
  • Font weights and their usage
  • Line heights and letter spacing
  • Type scales for different contexts (headings, body, captions)

Audit Questions:

  • How many different font sizes are used?
  • Is there a logical progression (e.g., 12px, 14px, 16px, 18px, 20px, 24px, 32px)?
  • Are font weights used consistently?
  • Is line height appropriate for readability?

4. Spacing System

Document your spacing, including:

  • Base unit (e.g., 4px, 8px)
  • Spacing scale (e.g., 4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px)
  • Padding conventions (inside components)
  • Margin conventions (between components)
  • Gap conventions (between grid items, flex items)

Audit Questions:

  • How many different spacing values are used?
  • Is there a consistent scale?
  • Are padding, margin, and gap used consistently?

5. Component Library

Document your components, including:

  • Component name and purpose
  • Component variants (primary, secondary, small, large, etc.)
  • Component states (default, hover, active, disabled, loading, error)
  • Component props and their defaults
  • Accessibility considerations
  • Usage examples

Audit Questions:

  • What components exist in your product?
  • Are they documented?
  • Are they reusable or one-off?
  • Are they accessible?

6. Responsive Breakpoints

Document your responsive design strategy:

  • Breakpoints (mobile, tablet, desktop, wide)
  • How components behave at each breakpoint
  • Mobile-first vs. desktop-first approach
  • Responsive typography strategy

7. Shadows, Borders, and Other Details

Document:

  • Shadow system (elevation levels)
  • Border radius scale
  • Border styles and widths
  • Transition and animation durations
  • Z-index scale

How to Use This Skill with Claude Code

Audit Your Current Design

"I'm using the design-foundation skill. Can you audit my current design system?
- Analyze my Tailwind config
- Identify inconsistencies in colors, spacing, typography
- Suggest improvements
- Create a design token system based on what I have"

Claude Code will:

  1. Analyze your current design
  2. Identify inconsistencies and opportunities
  3. Create a comprehensive design token system
  4. Suggest a migration path if you're formalizing an existing design

Create a Design System from Scratch

"I'm starting from scratch. Can you help me create a design foundation?
- Define design principles for my product
- Create a color system (I want a modern, professional look)
- Create a typography system
- Create a spacing system
- Create a component library structure"

Claude Code will:

  1. Create design principles tailored to your product
  2. Generate a complete color system with accessibility considerations
  3. Define typography scales and usage
  4. Create spacing systems
  5. Scaffold a component library structure

Formalize Existing Design

"We have a design system that's not well-documented. Can you:
- Extract design tokens from our current Tailwind config
- Document our component library
- Create design principles based on our current design
- Suggest improvements and inconsistencies"

Claude Code will:

  1. Extract and organize your existing tokens
  2. Document your components
  3. Create design principles that reflect your current design
  4. Identify and suggest fixes for inconsistencies

Generate Design System Documentation

"Can you create comprehensive documentation for our design system?
- Design principles
- Color system with usage guidelines
- Typography system with examples
- Spacing system with examples
- Component library with all variants and states
- Accessibility guidelines
- Responsive design guidelines"

Claude Code will generate:

  1. Markdown documentation for your design system
  2. Code examples for each section
  3. Visual examples (if using Claude's image generation)
  4. Accessibility guidelines integrated throughout

Design Critique: Evaluating Your Foundation

Claude Code can critique your design foundation:

"Can you evaluate my design foundation?
- Is my color system coherent?
- Are my typography scales appropriate?
- Is my spacing system logical?
- Are there inconsistencies I'm missing?
- What's one thing I could improve immediately?"

Integration with Other Skills

The design-foundation skill is foundational to all other skills:

  • layout-system — Uses tokens for spacing and responsive behavior
  • typography-system — Refines and extends the typography foundation
  • color-system — Refines and extends the color foundation
  • component-architecture — Uses tokens for component styling
  • accessibility-excellence — Ensures tokens support accessibility
  • interaction-design — Uses tokens for transitions and animations

Key Principles

1. Tokens Enable Consistency When design decisions are centralized in tokens, consistency becomes automatic.

2. Semantic Tokens Enable Flexibility By separating global tokens from semantic tokens, you can support dark mode, theming, and accessibility features without duplicating code.

3. Documentation Enables Adoption A design system that's not documented won't be used. Invest in clear, comprehensive documentation.

4. Governance Enables Scale As your team grows, clear guidelines for adding new tokens and components prevent chaos.

5. Accessibility is Foundational Design tokens should encode accessibility from the start (e.g., color contrast ratios, readable font sizes).

Common Patterns

Pattern 1: Light and Dark Mode

Define tokens for both light and dark modes:

// Global tokens (same for both modes)
colors: {
  primary: '#3B82F6',
  neutral: { 50: '#F9FAFB', 950: '#030712' },
}

// Semantic tokens (mode-specific)
// Light mode
backgroundColor: { 'bg-primary': '{neutral.50}' }
textColor: { 'text-primary': '{neutral.950}' }

// Dark mode
@media (prefers-color-scheme: dark) {
  backgroundColor: { 'bg-primary': '{neutral.950}' }
  textColor: { 'text-primary': '{neutral.50}' }
}

Pattern 2: Component Variants

Define tokens for component variants:

// Button variants
button: {
  primary: {
    background: '{interactive.primary}',
    text: '{text.inverse}',
  },
  secondary: {
    background: '{background.secondary}',
    text: '{text.primary}',
  },
  ghost: {
    background: 'transparent',
    text: '{interactive.primary}',
  },
}

Pattern 3: Responsive Tokens

Define tokens that change at different breakpoints:

// Typography that scales with viewport
fontSize: {
  'heading-1': ['32px', { lineHeight: '1.2' }], // desktop
  '@sm': { fontSize: '24px' }, // tablet
  '@xs': { fontSize: '20px' }, // mobile
}

Checklist: Is Your Design Foundation Ready?

  • Design principles are documented and shared with the team
  • Color system is defined with accessibility considerations
  • Typography system is defined with clear scales
  • Spacing system is defined with clear logic
  • All tokens are centralized (Tailwind config, CSS variables, or design tool)
  • Component library is documented
  • Responsive breakpoints are defined
  • Dark mode (if applicable) is defined
  • Accessibility guidelines are documented
  • Design system governance is defined (how to add new tokens, approve changes, etc.)
  • Team has access to and understands the design system
  • Design system is integrated into your development workflow

A strong design foundation is not built overnight, but the investment pays dividends in consistency, speed, and team alignment.

平台分布

Claude Code

27.23%
按下载量换算95

Codex

24.86%
按下载量换算87

Gemini CLI

16.69%
按下载量换算58

OpenCode

13.95%
按下载量换算49

Antigravity

8.61%
按下载量换算30

Cursor

3.47%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

继续浏览同类 Skills