design-system-code

仓库创建 2026年7月27日最近提交 11 小时前SkillHot 收录 18 小时前
这个 Skill 做什么

把设计 token 真正钉进代码里,防止开发绕过颜色、间距、排版等规则。适合新项目从首个 commit 建立约束,也适合把老项目逐步迁移到 token,或当硬编码样式不断回归时用它来锁死做法。特别之处是把“token 文件”变成代码层的守卫(guards),能写、扩展、调试这些守卫并处理迁移冲突。

▸ 展开 SKILL.md 英文原文

Build and enforce a design system inside a codebase — token tiers that nothing can skip, and guards that stop the code from drifting off them. Works for both new and existing projects, which need different guards. Use when starting a project and setting up tokens and enforcement from the first commit, when installing design-system enforcement on an existing repo, when tokens exist but nobody uses them, when hardcoded colours/spacing/typography keep reappearing, when deciding between a ratchet and a hard rule, when a design-system guard needs writing, extending or debugging, when migrating a large codebase onto tokens without a red build from day one, or when a "we have tokens" system is not actually being consumed. The code-side counterpart of figma-generate-library and figma-code-sync.

0
Stars
0
Forks
2
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/zatteogit/design-system-skills/main/skills/design-system-code/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/zatteogit/design-system-skills/main/skills/design-system-code/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Design systems in code

A design system in code is **a consumption contract, not a token file**. Writing
the tokens is a day of work. Making it impossible to bypass them is the system.

This skill is the code-side half of the chain: `figma-generate-library` builds
the system in Figma, `figma-code-sync` keeps the two aligned, and this one makes
the code side worth aligning to.

## 0. The premise: a tier is only real if nothing skips it

The same rule as the Figma side, and it is the whole discipline. Naming a token
`semantic` does not make it a tier. **The test is consumption, not naming**: if
components bind primitives directly, the primitives *are* the public API,
whatever the folder is c
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有