一键导入
design-tokens
Use only when autopilot-design dispatches design-token definition or revision. Not for top-level user requests or primary capability routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use only when autopilot-design dispatches design-token definition or revision. Not for top-level user requests or primary capability routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | design-tokens |
| description | Use only when autopilot-design dispatches design-token definition or revision. Not for top-level user requests or primary capability routing. |
| argument-hint | <design path or app path> |
| metadata | {"group":"sub","fam":"sub","invocation_class":"parent-invoked","modes":[],"blurb":"Define design tokens such as color, typography, and spacing.","use_when":"Use only when autopilot-design dispatches design-token definition or revision.","not_for":"Not for top-level user requests or primary capability routing."} |
Follow an explicit artifact or audience language when provided. Otherwise, write rationale, specimen labels, and user-facing reports in the conversation language according to <agent-home>/roles/response-policy.md. Preserve canonical token names, values, CSS identifiers, paths, and native tool IDs.
Find design_state.yaml under <artifact-root>/designs/<name>/ or <artifact-root>/spec/design/.
phases.refs: done; do not invent tokens without a brief.00_init/asset_inventory.md and locate existing tokens.css, tailwind.config.ts, app/globals.css, or equivalent project-owned token files.The canonical token source is the file the application actually imports: one of <project_root>/app/globals.css with @theme, styles/tokens.css, tailwind.config.ts, or the stack-equivalent source. The design workflow owns edits to that file; code workflows consume it.
Keep only rationale and visual evidence under 02_tokens/: tokens.md and the specimen. Do not create a second competing token-value source. Set design_state.tokens_path to the actual application file.
Seed from the codebase before designing. Extract colors, fonts, spacing, radii, and repeated inline hex or pixel values from the real token file and components. Promote the current implementation into an explicit contract, then refine it; do not start from a blank palette when a working system exists.
_internal/versions/v{N}/ before replacement.Extract color direction, typography direction, tone, mood, audience, accessibility, and compatibility requirements from 01_refs/brief.md.
Write 02_tokens/tokens.md with Color Palette (Brand, Neutral, Semantic), Typography (family and scale), Spacing, Radius, Shadow, and Motion. Record each value and one concise rationale. See references/tokens-exemplar.md for the complete exemplar.
Before components consume the tokens, create the self-contained 02_tokens/specimen.html with inline <style> and no build dependency:
xs through 2xl type scale with line heightsRender the specimen, inspect the resulting image, critique contrast, harmony, collisions, and uneven scale jumps, adjust tokens, and rerender until clean. Use the active adapter's equivalent of preview → screenshot → view_image under the visual self-verification loop. When the native design MCP owns the run, preserve mcp__design__eval_js for getComputedStyle evidence.
This specimen-consume gate is mandatory: components may consume the tokens only after rendered verification succeeds.
Write or extend CSS variables in tokens.css, @theme in app/globals.css, or tailwind.config.ts according to the actual stack and selected single source. Use references/templates.md. Apply project-file changes only after the applicable confirmation.
Before a major overwrite or extension when a prior token system exists:
02_tokens/tokens.md and canonical token file into _internal/versions/v{N}/, where N is one more than the current maximum.design_summary.md with changed tokens, old → new values, rationale, and date. This is the only design-cycle change-history source; do not add a separate CHANGELOG.Classify one or two small token adjustments as minor: skip the snapshot and append to the design_summary.md minor log. Treat a palette or scale redesign or a new axis as major. After at least five accumulated minor changes, recommend /audit without running it automatically.
Preserve these fields in design_state.yaml:
phases:
tokens: done
tokens_path: <actual application token file>
tokens_version: v{N}
tokens_updated: <date>
specimen: 02_tokens/specimen.html
tokens_verified_visually: true
tokens_version and tokens_updated are the reverse-drift anchors consumed by autopilot-code.
02_tokens/tokens.md02_tokens/specimen.htmltokens.css, app/globals.css, or tailwind.config.ts_internal/versions/v{N}/ for a major changedesign_summary.md<design_path>/02_tokens/ -- ✅ tokens decided (N colors, K type scale, M spacing)
For an extension:
<design_path>/02_tokens/ -- ✅ tokens extended (+K new tokens, existing preserved)
The acting agent may retain durable token preferences when they are genuinely useful. Do not make memory writes a completion requirement; the canonical application file and explicit project requirements remain authoritative.
Use when source code must be implemented, debugged, refactored, or code-audited through a plan, execution, test, and report loop. Not for requirements-only changes, new empirical experiments, or document-only editing.
Use when persistent analysis of code, a paper, or a document must be created or refreshed because it is absent, stale, or explicitly requested. Not for read-only project orientation, context recovery, or status reporting.
Use when durable cross-project user preferences must be inferred from coding, writing, or analysis evidence and stored as a profile. Not for one-project context recovery, casual preference acknowledgment, or ordinary task execution.
Use when a visual product surface needs references, design tokens, components or mockups, review, and development handoff. Not for implementing an already-approved design in code or for document prose work.
Use when a new paper, presentation, report, proposal, or other user-facing document must be produced from evidence. Not for correcting only an existing document or for source-code implementation.
Use only when autopilot-draft dispatches document strategy and evidence-plan creation. Not for top-level user requests or primary capability routing.