Agent skill
design-dna-skill
Skill describing how to interpret, enforce, and evolve design-dna.json across projects. Used by design-system-architect, builders, and gate agents.
Install this agent skill to your Project
npx add-skill https://github.com/adilkalam/orca/tree/main/skills/design-dna-skill
SKILL.md
Design-DNA Skill – Tokens & Patterns
This skill provides shared understanding of design-dna for all lanes.
It is used by:
design-system-architect- Implementation agents (e.g.
nextjs-builder,expo-builder) when applying tokens - Gate agents (
nextjs-standards-enforcer, design QA) when checking usage
Core Concepts
design-dna.jsonencodes:- Color palette + semantic roles,
- Typography scale and roles,
- Spacing grid,
- Named patterns (cards, layouts, shells, etc.).
- It is the law for UI work: where tokens exist, ad-hoc values are forbidden.
Usage Pattern
-
When reading design-dna:
- Identify available roles for:
- Colors (primary, secondary, accent, surface, etc.),
- Typography (display, heading, body, caption),
- Spacing (base grid, section spacing, gaps),
- Patterns (hero, card grid, dashboard shell, etc.).
- Note any documented minimums or constraints (e.g., minimum font size).
- Identify available roles for:
-
When applying tokens in implementation:
- Map design-dna roles to the project's styling tools:
- CSS variables,
- Utility classes,
- Component variants.
- Avoid creating new arbitrary values when tokens already cover the need.
- Map design-dna roles to the project's styling tools:
-
When enforcing tokens in gates:
- Treat:
- Inline styles and raw hex values as hard violations when tokens exist,
- Spacing and typography outside the defined scales as violations,
- Overuse/misuse of accent colors as design-dna violations if documented.
- Treat:
CSS Comment Format (OS 7.0)
For projects without JSON design-dna, tokens and rules can be embedded in CSS comments.
Token Syntax
/* @design-token: <name> = <value> */
Examples:
/* @design-token: primary = #007AFF */
/* @design-token: secondary = #5856D6 */
/* @design-token: spacing-base = 8px */
/* @design-token: font-body = 16px/24px Inter */
Rule Syntax
/* @design-rule: <constraint> = <value> */
Examples:
/* @design-rule: min-touch-target = 44px */
/* @design-rule: max-content-width = 1200px */
/* @design-rule: min-font-size = 14px */
Priority Order
When checking for design rules, agents search in this order:
- JSON (highest priority):
.claude/design-dna/*.json,design-dna.json,design-tokens.json - Markdown:
design-system.md,.claude/design-dna/README.md,docs/design-system.md - CSS comments (lowest priority): Any
*.cssfile with@design-token:or@design-rule:
JSON takes precedence because it provides structured, machine-parseable tokens. CSS comments are a fallback for legacy projects or quick prototypes.
This skill ensures all agents reason about design-dna in a consistent way and know when to consult project design documentation for deeper schema and examples.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
lenis-integration
Lenis smooth scroll setup with Next.js App Router, ScrollTrigger integration, React lifecycle management, and known issues.
batch-research
批量数据采集技能,负责分批并发调度 researcher agent 抓取所有数据源。
chinese-writing
专注科技周刊的中文写作与审稿技能指南,指导大模型生成与审核清晰、克制、无 AI 味的高质量周刊内容。
publish-weekly
使用 Payload REST API 将周刊发布到 CMS,正文不包含头部元数据,通过 users API Key 认证。
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Didn't find tool you were looking for?