Agent Skillsbitjaru/styleseed › ss-tokens

ss-tokens

GitHub

管理 StyleSeed 设计令牌,支持从主色生成语义调色板、查看、添加和修改颜色/排版等令牌,确保 JSON 与 CSS 同步。

engine/.claude/skills/ss-tokens/SKILL.md bitjaru/styleseed

Trigger Scenarios

用户需要提供品牌配色方案或色彩组合建议 用户需要生成或更新前端设计令牌文件

Install

npx skills add bitjaru/styleseed --skill ss-tokens -g -y
More Options

Non-standard path

npx skills add https://github.com/bitjaru/styleseed/tree/main/engine/.claude/skills/ss-tokens -g -y

Use without installing

npx skills use bitjaru/styleseed@ss-tokens

指定 Agent (Claude Code)

npx skills add bitjaru/styleseed --skill ss-tokens -a claude-code -g -y

安装 repo 全部 skill

npx skills add bitjaru/styleseed --all -g -y

预览 repo 内 skill

npx skills add bitjaru/styleseed --list

SKILL.md

Frontmatter
{
    "name": "ss-tokens",
    "description": "Generate an accessible semantic palette from a key color, or view, add, and modify StyleSeed design tokens. Use when a user supplies a brand color, asks which colors combine well, needs light\/dark theme roles, or needs token files for implementation.",
    "allowed-tools": "Read, Write, Edit, Grep, Glob, Bash",
    "argument-hint": "[action: generate|list|add|update] [token-type: color|spacing|shadow|radius|typography]"
}

Design Token Manager

When NOT to use

  • For applying tokens in components → use /ss-component or /ss-pattern
  • For finding token violations in existing code → use /ss-lint
  • For non-CSS token systems (Figma, native iOS/Android) — Tailwind v4 / CSS variables only

Action: $0 | Token type: $1 Arguments: $ARGUMENTS

Token File Locations

Type JSON Source CSS Implementation
Colors tokens/colors.json css/theme.css :root + @theme inline
Typography tokens/typography.json css/fonts.css + css/base.css
Spacing tokens/spacing.json Tailwind utilities (no custom CSS needed)
Radius tokens/radii.json css/theme.css @theme inline
Shadows tokens/shadows.json css/theme.css :root

Instructions

generate color — Derive the system from one key color

Do not pick a second color by eye or copy a preset. Run the shared StyleSeed generator:

node <styleseed-root>/engine/color/generate-palette.mjs \
  --key-color "#276B5E" \
  --mode light \
  --character calm \
  --harmony auto \
  --temperature neutral \
  --out .styleseed/palette.json

Supported controls are light|dark mode, calm|balanced|vivid|deep character, auto|tonal|adjacent|contrast harmony, and neutral|warm|cool surface temperature. The generator preserves the key hue, maps chroma into sRGB without channel clipping, builds 11-step OKLCH primary/accent ramps, scores the accent against the key and reserved status hues, maps primitives to semantic roles, and adjusts fill lightness until text/action/focus pairs pass.

Use --format css for CSS variables or JSON for an auditable result. Never mark the palette valid unless valid is true and every item in contrast passes. In STYLESEED.md, persist Key color, Palette character, Palette mode, Palette harmony, and Surface temperature, then run $ss-resolve; the resolver emits the same .styleseed/palette.json and palette.css.

list — Show current tokens

Read and display the requested token file in a formatted table.

add — Add new token

  1. Add the token to the JSON source file (tokens/*.json)
  2. Add the CSS custom property to css/theme.css under :root
  3. If it needs a Tailwind utility, add to the @theme inline block
  4. If it has a dark mode variant, add to the .dark block

update — Modify existing token

  1. Update the value in the JSON source file
  2. Update the CSS custom property in theme.css
  3. Check all components for direct usage that might need updating

Rules

  • Always keep JSON and CSS in sync
  • Use semantic names, not descriptive names (--success not --green-500)
  • Colors should support both light and dark modes
  • New tokens must be added to BOTH the JSON source AND the CSS implementation
  • Treat preset recipes as maintained defaults, not the limit of available colors.
  • Character and role allocation are stronger design controls than complementary/triadic geometry alone.

Version History

  • c414969 Current 2026-08-13 14:11

    新增基于 StyleSeed 引擎的生成式语义调色板功能,支持通过关键颜色自动生成符合无障碍标准的完整调色板。

  • 575d99a 2026-07-05 18:21

Same Skill Collection

engine/.claude/skills/ss-a11y/SKILL.md
engine/.claude/skills/ss-audit/SKILL.md
engine/.claude/skills/ss-build/SKILL.md
engine/.claude/skills/ss-component/SKILL.md
engine/.claude/skills/ss-copy/SKILL.md
engine/.claude/skills/ss-dial/SKILL.md
engine/.claude/skills/ss-feedback/SKILL.md
engine/.claude/skills/ss-flow/SKILL.md
engine/.claude/skills/ss-learn/SKILL.md
engine/.claude/skills/ss-lint/SKILL.md
engine/.claude/skills/ss-motion/SKILL.md
engine/.claude/skills/ss-page/SKILL.md
engine/.claude/skills/ss-pattern/SKILL.md
engine/.claude/skills/ss-reference/SKILL.md
engine/.claude/skills/ss-resolve/SKILL.md
engine/.claude/skills/ss-restyle/SKILL.md
engine/.claude/skills/ss-review/SKILL.md
engine/.claude/skills/ss-score/SKILL.md
engine/.claude/skills/ss-setup/SKILL.md
engine/.claude/skills/ss-studio/SKILL.md
engine/.claude/skills/ss-verify/SKILL.md
skills/ss-a11y/SKILL.md
skills/ss-audit/SKILL.md
skills/ss-build/SKILL.md
skills/ss-component/SKILL.md
skills/ss-copy/SKILL.md
skills/ss-dial/SKILL.md
skills/ss-feedback/SKILL.md
skills/ss-flow/SKILL.md
skills/ss-learn/SKILL.md
skills/ss-lint/SKILL.md
skills/ss-motion/SKILL.md
skills/ss-page/SKILL.md
skills/ss-pattern/SKILL.md
skills/ss-reference/SKILL.md
skills/ss-resolve/SKILL.md
skills/ss-restyle/SKILL.md
skills/ss-review/SKILL.md
skills/ss-score/SKILL.md
skills/ss-setup/SKILL.md
skills/ss-studio/SKILL.md
skills/ss-tokens/SKILL.md
skills/ss-verify/SKILL.md
skills/styleseed-design-review/SKILL.md
engine/.claude/skills/ss-update/SKILL.md
skills/ss-update/SKILL.md

Metadata

Files
0
Version
c414969
Hash
8abcad6d
Indexed
2026-07-05 18:21

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-14 07:23
浙ICP备14020137号-1 $お客様$