一键导入
create-design-system
Use this skill to create a new design system.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill to create a new design system.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Code guidelines for Cloudflare Worker implementations. Use when editing, reviewing, or executing a Cloudflare Worker; e.g. D1 queries, handlers, Wrangler commands, and Wrangler configurations.
Code guidelines for TSX files. Use when editing or reviewing `.tsx` files, i.e. TypeScript React components.
Code guidelines for JavaScript/TypeScript end-to-end, integration, and unit tests. Use when authoring or reviewing `**/*.test.ts` and `**/*.test.tsx` files, e.g. Playwright, Vitest.
TypeScript guidelines. Use when editing or reviewing `**/*.ts` and `**/*.tsx` files.
基于 SOC 职业分类
| name | create-design-system |
| description | Use this skill to create a new design system. |
Before getting started, you need to know:
From this package's root directory, execute the design-system:copy-template
script, passing the slug as an argument.
npm run design-system:copy-template -- my-example-slug
From this package's root directory, execute
VITE_TESTED_DESIGN_SYSTEM=$slug npx vitest run src/design-systems/core-test/
to verify the new design system files accurately pass the test suite. If the
test suite is failing on this step, stop and notify the user that something is
wrong with the design system template or test suite.
Use the provided description and screenshot to determine useful semantic design tokens and their values. Create as many or as few as you need.
Considerations:
Components in the design system are located at src/design-systems/$slug/*.tsx
and their CSS files are co-located at src/design-systems/$slug/*.module.scss.
Do not look at other design systems in the repository, and do not create a shared theme file for each component to use. That would lead to each component looking identical.
To prevent context bloat, use a separate subagent to implement each component.
Give the subagent the design system's slug, description, optional screenshot,
design decisions, its specific component's TSX and SCSS, and the instructions
listed in this skill's sibling SUBAGENT_INSTRUCTIONS.md file.
Once all components are implemented, review them holistically. Does the design system align with the original description? Do the components look visually cohesive when used together? If not, make any necessary adjustments.
As a final check, run the design system's test suite. If any tests are failing, adjust the implementation until all tests pass.
npx vitest run src/design-systems/$slug.test.ts