SIN-Code-Frontend-Design-Skill
Provides 8 MCP tools for frontend design: load design system, generate components, scaffold pages, review consistency, extract tokens, check WCAG 2.2 AA, test responsiveness, and export to Figma.
README
SIN-Code-Frontend-Design-Skill
SOTA design system + philosophy (Anthropic-compatible). 8 MCP tools, 6 bash scripts, 100% CoDocs, 202 passing tests. Falls back to templates if the v0-pool is offline.
The SIN counterpart to Anthropic's official frontend-design skill (277K
installs). Provides a design system, component generator, page scaffolder, and
WCAG 2.2 AA checker that agents load before writing frontend code.
Architecture
Agent (opencode / Cursor / Claude)
↓ loads skill
SIN-Code-Frontend-Design-Skill
├─ MCP tools (8)
├─ Bash scripts (6)
├─ Python modules (8)
└─ v0-pool integration (http://localhost:27401/v1)
↓ complex prompts
SINator-v0 (v0-1.5-lg)
↓ simple prompts
v0-1.5-md
↓ offline → templates
Built-in component specs
MCP Tools
| Tool | Purpose |
|---|---|
design_system_load |
Load the SOTA design system (tokens, themes, philosophy) |
design_component_create |
Generate button/input/card/modal specs |
design_page_scaffold |
Scaffold a full page from a layout + sections |
design_review |
Review code for design system consistency |
design_token_extract |
Extract tokens from CSS/Tailwind/JSON/Figma |
design_a11y_check |
WCAG 2.2 AA compliance check + contrast |
design_responsive_test |
Generate breakpoints, identify current tier |
design_figma_export |
Export tokens to Figma Tokens JSON |
Quick-Start
git clone https://github.com/OpenSIN-Code/SIN-Code-Frontend-Design-Skill.git
cd SIN-Code-Frontend-Design-Skill
chmod +x install.sh
./install.sh
Usage
As MCP server
# Launch the FastMCP server
python3 -m sin_frontend_design.mcp_server
From Python
from sin_frontend_design import (
DesignSystem,
ComponentGenerator,
PageScaffolder,
DesignReviewer,
TokenExtractor,
A11yChecker,
BreakpointGenerator,
)
# 1. Load the design system
ds = DesignSystem()
print(ds.philosophy())
# 2. Generate a component
g = ComponentGenerator()
button = g.button(framework="react", variant="primary", size="md", label="Save")
print(button.code)
# 3. Scaffold a page
s = PageScaffolder()
page = s.scaffold(layout="landing", framework="html", title="My SaaS")
print(page.code)
# 4. Review existing UI
reviewer = DesignReviewer()
report = reviewer.review("<button>Click</button>")
print(report.score, report.findings)
# 5. Extract tokens from existing CSS
extractor = TokenExtractor()
tokens = extractor.extract(open("tokens.css").read(), source_format="css")
# 6. Check WCAG 2.2 AA
checker = A11yChecker()
a11y = checker.check(open("page.html").read())
print(a11y.ok, a11y.score)
# 7. Get responsive breakpoints
bg = BreakpointGenerator()
print(bg.test(viewport_width=1280)) # 'lg'
From shell
# Load the design system
./scripts/design-load.sh
# Generate components
./scripts/design-component.sh button --framework=react --variant=primary
./scripts/design-component.sh input --framework=html --placeholder="Email"
./scripts/design-component.sh card --framework=react
./scripts/design-component.sh modal --use-v0
# Scaffold a page
./scripts/design-page.sh landing --framework=html --title="My SaaS"
./scripts/design-page.sh pricing --framework=react
# Review UI
./scripts/design-review.sh path/to/page.html
echo "<button>Click</button>" | ./scripts/design-review.sh -
# Extract tokens
./scripts/design-tokens.sh tokens.css
./scripts/design-tokens.sh tailwind.config.js --format=tailwind
# Check accessibility
./scripts/design-a11y.sh page.html
./scripts/design-a11y.sh page.html --fg=#000000 --bg=#ffffff
Design Philosophy
- Hierarchy is created by contrast, not by decoration.
- Type is the primary voice — choose one family and use scale.
- Color is functional: primary, secondary, success, warning, error, neutral.
- Spacing follows a 4px grid — never arbitrary values.
- Motion is felt, not seen: 200ms hovers, 300ms transitions.
- Components are predictable: same name, same shape, same tokens.
- States are explicit: default, hover, focus, active, disabled.
- Accessibility is non-negotiable: WCAG 2.2 AA is the floor.
- Dark mode is not inverted — it's a parallel semantic map.
- Famous brands feel calm because they use restraint.
Token reference
Typography (px)
12 · 14 · 16 · 18 · 20 · 24 · 30 · 36 · 48 · 60 · 72
Spacing (px, 4px grid)
4 · 8 · 12 · 16 · 24 · 32 · 48 · 64 · 96
Motion
- Hover: 200ms ease-out
- Transition: 300ms ease-in-out
- Page: 500ms cubic-bezier(0.16, 1, 0.3, 1)
Radius
- Default: 8px
- Card: 16px
Color ramps (50–900)
neutral— slateprimary— indigosecondary— violetsuccess— greenwarning— ambererror— red
Tests
# All tests
PYTHONPATH=src python3 -m pytest tests/ -v
# 202 passed
CoDocs
100% CoDocs coverage — every .py in src/sin_frontend_design/ has a matching
.doc.md companion, and every .sh script and test file does too.
v0-pool integration
The design_component_create tool calls the v0-pool at
http://localhost:27401/v1 when use_v0=true:
- Complex prompts (>200 chars) →
v0-1.5-lg - Simple prompts →
v0-1.5-md - Offline / failure → fall back to built-in templates
Files
SIN-Code-Frontend-Design-Skill/
├── README.md
├── SKILL.md
├── CHANGELOG.md
├── AGENTS.md
├── INSTALL.md
├── install.sh
├── pyproject.toml
├── requirements.txt
├── .gitignore
├── .github/workflows/ceo-audit.yml
├── src/sin_frontend_design/
│ ├── __init__.py (+ .doc.md)
│ ├── system.py (+ .doc.md) — typography, color, spacing, motion
│ ├── components.py (+ .doc.md) — button/input/card/modal specs
│ ├── pages.py (+ .doc.md) — page scaffolder (hero, features, ...)
│ ├── reviewer.py (+ .doc.md) — design system review
│ ├── tokens.py (+ .doc.md) — token extraction (CSS/Tailwind/Figma)
│ ├── a11y.py (+ .doc.md) — WCAG 2.2 AA checker
│ ├── responsive.py (+ .doc.md) — breakpoint generator
│ └── mcp_server.py (+ .doc.md) — FastMCP server with 8 tools
├── scripts/
│ ├── design-load.sh
│ ├── design-component.sh
│ ├── design-page.sh
│ ├── design-review.sh
│ ├── design-tokens.sh
│ └── design-a11y.sh
└── tests/
├── test_system.py
├── test_components.py
├── test_pages.py
├── test_reviewer.py
├── test_tokens.py
├── test_a11y.py
├── test_responsive.py
├── test_server.py
├── test_scripts.py
└── test_codocs.py
Related
- SINator-v0 — v0.dev pool
- SIN-Code-Bundle — unified CLI
- Anthropic frontend-design — original
License
OpenSIN AI · Open source · Built for agents.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。