Communitygithub.com

设计系统生成与审查

用于生成或审计设计系统、检查视觉一致性,以及审查涉及样式的 PR。

设计系统生成与审查 是什么?

这个技能旨在帮助开发者高效地创建、审计和维护设计系统。它支持三种核心模式:在“生成设计系统”模式下,能够自动扫描代码库中的 CSS / Tailwind / styled-components 模式,提取颜色、排版、间距等关键 JSON 令牌,并产出 DESIGN.md、设计令牌 JSON 文件和交互式 HTML 预览页面。“视觉审计”模式则从 10 个维度(如色彩一致性、排版层级、间距节奏、组件一致性、响应式行为、暗黑模式、动画、无障碍访问、信息密度、精细度)为 UI 打分,并提供具体的改进建议与文件行号。“AI 模式识别”模式能侦测常见的 AI 生成设计特征(如过度渐变、紫色到蓝色默认色、无意义的毛玻璃卡片等)。该技能推荐在以下场景使用:启动新项目并需要设计系统、审计现有代码库视觉一致性、大型改版前了解当前状况、UI 感觉“不对劲”但说不出原因、以及审查涉及样式的 Pull Request。支持通过命令行接口触发,例如 /design-system generate、/design-system audit、/design-system slop-check,并可传入 --style、--palette、--url、--pages 等参数进行自定义。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/design-system

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

设计系统 — 生成与审查视觉系统

使用时机

  • 启动需要设计系统的新项目
  • 审计现有代码库的视觉一致性
  • 进行改版前——了解当前状态
  • 当 UI 看起来“不对劲”但无法确定原因时
  • 审查涉及样式的 Pull Request

工作原理

模式 1:生成设计系统

扫描代码库并生成统一的设计系统:

1. 扫描 CSS / Tailwind / styled-components 中的现有模式
2. 提取:颜色、排版、间距、圆角、阴影、断点
3. 研究 3 个竞品网站以获取灵感(通过浏览器 MCP)
4. 提出设计令牌集(JSON + CSS 自定义属性)
5. 生成 DESIGN.md,包含每个决策的 rationale
6. 创建交互式 HTML 预览页面(自包含,无依赖)

输出:DESIGN.md + design-tokens.json + design-preview.html

模式 2:视觉审计

在 10 个维度上对 UI 评分(每个维度 0-10 分):

1. 色彩一致性——是否使用了调色板还是随机的十六进制值?
2. 排版层级——清晰的 h1 > h2 > h3 > body > caption?
3. 间距节奏——一致的缩放(4px/8px/16px)还是混乱?
4. 组件一致性——相似的元素看起来是否相似?
5. 响应式行为——在断点处流畅还是断裂?
6. 暗黑模式——完整实现还是半成品?
7. 动画——有目的性还是过度装饰?
8. 无障碍访问——对比度、焦点状态、触摸目标大小
9. 信息密度——杂乱还是干净?
10. 精细度——悬浮状态、过渡、加载状态、空状态

每个维度都会获得分数、具体示例以及包含确切文件:行的修复建议。

模式 3:AI 模式识别

识别常见的 AI 生成设计特征:

- 元素上过度使用渐变
- 紫色到蓝色默认色
- 无意义的“毛玻璃”卡片
- 不该有圆角的元素被加了圆角
- 滚动时过多的动画
- 居中文本 + 默认渐变的通用 Hero 区域
- 缺乏个性的无衬线字体堆栈

示例

为 SaaS 应用生成:

/design-system generate --style minimal --palette earth-tones

审计现有 UI:

/design-system audit --url http://localhost:3000 --pages / /pricing /docs

检查 AI 模式:

/design-system slop-check

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相关技能