Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

design设计

Agent Skill

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

总安装

569

周安装

23

GitHub Stars

1

下载量

178
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alexanderstephenthompson/claude-hub --skill design

简介

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。

  • 适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。
  • 使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素。
  • 涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网、命令执行或文件读写。

SKILL.md

Design Skill

Version: 1.0 Source: Design Standards

Non-negotiable design and user interface standards. These are not preferences—they are requirements.

The Problem

AI agents produce UI that looks plausible but diverges from itself. Each session picks slightly different spacing, heading levels, element choices, and state handling — creating interfaces where similar components feel inconsistent. A card uses <h3> here but <h4> there; a button has hover states in one place but not another. These standards ensure every UI element follows the same design language regardless of which session built it.

Consumption

  • Builders: Read ## Builder Checklist before writing any HTML, CSS, or JSX. Design token usage and semantic HTML are constraints, not suggestions.
  • Refactorers: Use ## Enforced Rules to find design violations. Read narrative sections for correct element selection and token usage.
  • Both: Narrative sections are the authoritative standard. Checklist and rules table are compressed views of the same content.

Scope and Boundaries

This skill covers:

  • Design system philosophy and principles
  • Design token usage and enforcement
  • Semantic HTML patterns (element selection)
  • CSS formatting and quality rules
  • Component states (hover, focus, active, disabled)
  • Layout philosophy (Grid vs Flexbox selection)
  • Responsive design principles and breakpoints
  • Premium UI philosophy and anti-patterns

Defers to other skills:

  • web-accessibility: Deep WCAG compliance, screen reader patterns, ARIA usage, keyboard navigation
  • web-css: CSS architecture, file organization, naming conventions (BEM), dark mode implementation

Use this skill when: You need design principles, token enforcement, or semantic HTML guidance. Use web-accessibility when: You need WCAG compliance, screen reader support, or focus management. Use web-css when: You need CSS organization, variable architecture, or responsive implementation details.


Core Principles

  1. Users First — Prioritize user needs, workflows, and ease of use
  2. Meticulous Craft — Precision and polish in every UI element
  3. Speed & Performance — Fast load times, snappy interactions
  4. Simplicity & Clarity — Clean interface, unambiguous labels
  5. Focus & Efficiency — Help users achieve goals quickly
  6. Consistency — Uniform design language throughout
  7. Accessibility (WCAG AA) — Inclusive design for all users
  8. Opinionated Defaults — Thoughtful defaults reduce decision fatigue

Design System (Single Source of Truth)

Critical Rules

  1. ALWAYS use design tokens — NEVER use hardcoded values
  2. All values come from styles/global.css — Single source of truth for CSS variables
  3. No magic numbers — Every color, spacing, size uses a CSS variable

Examples

/* ✅ Correct - Uses design tokens */
.button {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-body);
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* ❌ Wrong - Hardcoded values */
.button {
  padding: 8px 16px;           /* Use var(--space-sm) var(--space-md) */
  font-size: 14px;             /* Use var(--font-size-body) */
  background: #3B82F6;         /* Use var(--color-primary) */
  border-radius: 4px;          /* Use var(--radius-sm) */
}

What the Design System Contains

  • Complete color palette (neutrals, semantic, dark mode)
  • Full typography scale (fonts, sizes, weights, line heights)
  • Spacing system (4px base)
  • Border radii
  • Shadows
  • Z-index layers
  • Animation durations and easings
  • Icon sizes
  • Breakpoint values

Semantic HTML

Required Practices

  1. Use semantic tags: <header>, <nav>, <main>, <article>, <section>, <footer>
  2. Buttons for actions (<button>), links for navigation (<a>)
  3. Forms use <form>, <label>, <input>, <select>, <textarea>
  4. Lists use <ul>, <ol>, <li> (not divs with bullets)
  5. Headings follow hierarchy: <h1><h2><h3> (no skipping)
  6. Images have descriptive alt text
  7. Tables use proper markup for tabular data

Examples

<!-- ✅ Good - Semantic HTML -->
<article class="product-card">
  <header>
    <h2>Product Name</h2>
  </header>
  <img src="..." alt="Product description">
  <p>Product description goes here.</p>
  <footer>
    <button type="button">Add to Cart</button>
  </footer>
</article>

<!-- ❌ Bad - Non-semantic divs -->
<div class="prd-crd">
  <div class="hdr">
    <div class="ttl">Product Name</div>
  </div>
  <div class="img"></div>
  <div class="btn">Add to Cart</div>
</div>

HTML Cleanliness

Headings Are for Structure

Headings (<h1>-<h6>) define document structure, not visual styling.

<!-- ❌ Wrong - Using heading for font size -->
<h3>Sale Price</h3>  <!-- Not a section heading, just wants bold text -->

<!-- ✅ Right - Use a class for styling -->
<p class="price-label">Sale Price</p>

No Class Bloat

Elements should have 1-3 classes. More than 4 is a smell — consolidate into a semantic class.

<!-- ❌ Bad - Class soup -->
<button class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:ring-2">
  Submit
</button>

<!-- ✅ Good - Semantic class (styling lives in CSS) -->
<button class="btn btn--primary">
  Submit
</button>

No Inline Styles

HTML describes structure. CSS handles presentation. Keep them separated.

// ❌ Bad - Inline styles
<div style={{ marginTop: '16px', padding: '8px' }}>

// ✅ Good - CSS class
<div className="card-section">

Only exception: Truly dynamic values computed at runtime. Even then, prefer CSS custom properties.


CSS Quality

Formatting Rules

  1. One property per line
  2. Use design tokens (CSS variables), not hardcoded values
  3. Logical property order: Positioning → Box Model → Typography → Visual → Animation
  4. Descriptive class names (BEM or semantic naming)
  5. Generous spacing between rule sets
  6. Comments for complex sections

Example

/* ✅ Good - Human-readable */
.product-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--color-neutral-50);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: all var(--duration-fast) var(--easing-standard);
}

Component States (Required)

All interactive components MUST have these five states:

StateRequirementExample
DefaultBase appearanceNormal button
HoverVisual feedback on mouse overBackground darkens
ActiveVisual feedback when pressedSlight scale down
FocusClear focus indicator (keyboard nav)outline: 2px solid var(--color-focus); outline-offset: 2px;
DisabledVisually distinct, non-interactiveGrayed out, low opacity

Layout Philosophy

CSS Grid vs Flexbox

Layout NeedToolExample
Page structureGrid (named areas)Header, sidebar, main, footer
Section layoutGrid (named areas)Two-column content, form layout
Component structureGrid (named areas)Card internals, modal layout
Navigation itemsFlexboxTop nav items, menu items
Gallery/flowing itemsFlexboxImage grid, card gallery, tag list

Default to Grid for structure. Use Flexbox when items need to flow, distribute, or wrap.

Grid with Named Areas (Primary Layout Method)

#app-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  gap: var(--space-md);
}

#header { grid-area: header; }
#sidebar { grid-area: sidebar; }
#main { grid-area: main; }
#footer { grid-area: footer; }

White Space

  • Use ample negative space to improve clarity
  • Consistent spacing using design tokens

Accessibility (WCAG AA)

Required Standards

  1. Color Contrast

- Normal text: 4.5:1 minimum - Large text (18px+): 3:1 minimum

  1. Keyboard Navigation

- All functionality available via keyboard - Logical tab order - Focus indicators visible

  1. Screen Reader Support

- Proper ARIA labels - Semantic HTML - Skip links for navigation

  1. Form Labels

- All inputs have associated labels - Error messages linked to inputs

Respect User Preferences

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

Responsive Design

Mobile-First Breakpoints

/* Mobile: 0-767px (base styles, no media query needed) */

/* Tablet: 768px and up */
@media (min-width: 768px) { }

/* Desktop: 1024px and up */
@media (min-width: 1024px) { }

/* Large Desktop: 1280px and up */
@media (min-width: 1280px) { }

Never use: @media (max-width:...) — Always use min-width (mobile-first)

Container max-widths

  • Mobile: 100% (with padding)
  • Tablet: 768px
  • Desktop: 1024px
  • Large: 1280px

Premium UI Philosophy

We follow S-Tier SaaS standards (Stripe, Airbnb, Linear):

  • Sophisticated typography with perfect spacing
  • Premium color palettes with subtle gradients
  • Purposeful animations (150-300ms)
  • Delightful micro-interactions
  • Meticulous attention to detail

Goal: Make every interface feel premium. Subtle sophistication over flashy effects.


Anti-Patterns (DO NOT DO THESE)

Anti-PatternWhy BadDo Instead
Floating labelsConfusingLabels above inputs
Inline validationAnnoyingValidate on blur/submit
Generic error messagesUnhelpfulSpecific, actionable errors
Tooltips for critical infoEasy to missShow directly
Disabled buttons without explanationFrustratingShow why disabled
Custom scrollbarsInconsistent UXSystem scrollbars
Hamburger menu on desktopHides navigationFull nav on desktop

Builder Checklist

Before writing UI code governed by this skill, verify your plan against these constraints. Builders read this section before writing code; refactorers use the Enforced Rules table and full narrative instead.

Design System

  • ALL values use design tokens
  • No magic numbers or hardcoded colors
  • Design system is source of truth

Semantic HTML

  • Semantic tags used appropriately
  • Buttons for actions, links for navigation
  • Heading hierarchy followed
  • Alt text on all images

CSS

  • Human-readable formatting
  • Design tokens used throughout
  • Logical property order

Component States

  • Default state implemented
  • Hover state implemented
  • Active state implemented
  • Focus state implemented
  • Disabled state implemented

Accessibility

  • Color contrast meets WCAG AA
  • Keyboard navigation works
  • Screen reader tested
  • Focus indicators visible
  • Form labels present

Responsive

  • Mobile-first approach
  • Standard breakpoints used
  • Works on all screen sizes

Anti-Patterns Avoided

  • No floating labels
  • No inline validation
  • No generic errors
  • No tooltips for critical info
  • No unexplained disabled buttons
  • No custom scrollbars
  • No hamburger on desktop

Enforced Rules

These rules are deterministically checked by check.js (clean-team). When updating these standards, update the corresponding check.js rules to match — and vice versa.

Rule IDSeverityWhat It Checks
no-inline-styleerrorstyle="..." attributes in HTML
no-jsx-inline-stylewarnstyle={{...}} in JSX
button-type-requirederror<button> without type attribute
doctype-requirederrorMissing <!DOCTYPE html>
max-classeswarnMore than 4 classes on an element

References

  • references/semantic-html.md — Complete semantic HTML guide
  • references/css-formatting.md — CSS best practices
  • references/accessibility-guide.md — WCAG AA compliance
  • references/responsive-breakpoints.md — Responsive design patterns

Assets

  • assets/component-states-checklist.md — State implementation guide
  • assets/anti-patterns.md — Detailed anti-pattern explanations
  • assets/layout-examples.md — CSS Grid and Flexbox examples

Scripts

  • scripts/validate_design_tokens.py — Check for hardcoded values
  • scripts/check_accessibility.py — Basic a11y validation

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.52%
按下载量换算60

Claude

33.2%
按下载量换算59

Cursor

21.55%
按下载量换算38

Gemini CLI

9.51%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills