Agent
Cursor
把 DESIGN.md 放在仓库根目录,并在 Cursor 规则里要求写界面之前先读它。
文件放在哪
DESIGN.md规范正文,tokens 以 YAML 为准。
.cursor/rules/design.mdc规则文件,点名根目录的 DESIGN.md。
写入 .cursor/rules/design.mdc
--- description: Read DESIGN.md before writing UI alwaysApply: true --- # Design system Before creating or restyling any interface, read `DESIGN.md` at the repository root. Treat its color, type, spacing, and component sections as normative. Do not invent a second accent or a default three-card layout.
一行安装
在仓库根目录执行。npm 上的 driftless 是别人的计时库,不要装那个。
npx driftless-styles add premium --skill
MCP
{
"mcpServers": {
"driftless": {
"command": "npx",
"args": ["-y", "driftless-mcp"]
}
}
}