design-system-keeper

Detect and rewrite hardcoded UI design literals into semantic token references.

Updated May 6, 2026
One-click install
npx skills add https://github.com/shipiit/shipit-ui-design --skill design-system-keeper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-system-keeper
Source: https://github.com/shipiit/shipit-ui-design/tree/main/skills/design-system-keeper
Command: npx skills add https://github.com/shipiit/shipit-ui-design --skill design-system-keeper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hardcoded design values like raw hex colors, pixel sizes, and magic shadows make UI inconsistent and painful to maintain.

Core Features & Use Cases

  • Detect hardcoded design literals such as colors, spacing, radii, shadows, durations, easing, z-index, and typography across component and style code.
  • Rewrite to token references by converting literals into existing project tokens (or snapping to the nearest scale when needed).
  • Propose safe token additions by updating tokens.css first with a diff when the literal has no corresponding token.
  • Enforce consistency rules so interactive elements include hover/active/focus-visible/disabled, motion respects prefers-reduced-motion, and dark mode is emitted alongside light.
  • Tailwind-aware conversion to map arbitrary values to semantic token-alias classes via tailwind.config.* and tokens.css var names.

Quick Start

Use the design-system-keeper skill while editing your UI files to automatically replace literals with the correct token references and suggest any missing tokens in tokens.css.

Frequently Asked Questions about design-system-keeper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace hardcoded colors and spacing with Tailwind design tokens?

To replace hardcoded design literals with Tailwind tokens, the skill detects raw hex colors, pixel sizes, and magic shadows in component code and rewrites them into semantic token-alias classes mapped via tailwind.config and tokens.css.

What are design tokens and why do I need them for UI consistency?

Design tokens are semantic references for colors, spacing, radii, shadows, durations, and typography. You need them for UI consistency because hardcoded design values like raw hex codes make component styling inconsistent and difficult to maintain across a project.

How do I add a missing design token when converting hardcoded CSS values?

To add a missing design token when converting hardcoded CSS values, the skill proposes safe token additions by generating a diff for tokens.css first, ensuring the new token exists before rewriting your component styling to reference it.

Does this approach enforce accessibility states like focus-visible and prefers-reduced-motion?

Yes, this approach enforces accessibility by requiring interactive elements to include hover, active, focus-visible, and disabled states, while mandating that all motion respects prefers-reduced-motion compliance and emits dark mode alongside light mode.

Can I use this tokenization method with my existing Tailwind theme files?

Yes, you can use this tokenization method with existing Tailwind theme files. It is Tailwind-aware and maps arbitrary values to semantic token-alias classes by reading your tailwind.config and tokens.css var names during UI development.

What happens to hardcoded z-index and typography values when snapping to the nearest token scale?

When snapping to the nearest token scale, hardcoded z-index and typography values are converted into existing project tokens, or proposed as safe token additions in tokens.css if no corresponding token exists, ensuring consistent layering and typography.