Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    dsmith: keep AI agents on your design system

    1

    Hardcoded styling values make design systems impossible to maintain.

    Free

    Security scanned

    dsmith: keep AI agents on your design system

    Example session with this skill installed

    Audit this Next.js dashboard for hardcoded styles. How far off a design system are we, and what tokens would you create?

    • Read your context and instructions
    • Compiled the dsmith
    • Generated the UI component

    I ran dsmith detect and dsmith audit (read-only, nothing outside .dsmith/ was written).

    Summary

    26 files scanned (215 style usages, 33 component usages).

    About 34% of style values are hardcoded, giving a design-system health score of

    52 / 100. The repo is Next.js (app router) with Tailwind (72% of files) and inline styles (44%), and it has a small local UI kit in src/components/ui that most screens don't import yet.

    Hardcoded colors

    RepresentativeUsesSuggested tokenVariants found
    #3b82f612blue-400#3b82f6 ×7, #2f7bee ×3, #3a81f5 ×1, #3c83f7 ×1
    #1118274gray-900#111827 ×4
    #e53e3e4red-500#e53e3e ×2, #ef4444 ×1, #f04545 ×1
    #f9fafb4gray-50#f9fafb ×2, #ffffff ×2
    #6b72803gray-500#6b7280 ×3
    #e5e7eb3gray-100#e5e7eb ×3

    Your "brand blue" exists in four slightly different hex values.

    Spacing off the 4px scale

    pxUses
    189
    103
    133
    223

    Components

    • Duplicates with the same name from different sources:

    Button (src/components/ui/button vs src/components/Button) and

    Badge (src/components/Badge vs src/components/common/StatusBadge).

    • Files with the most hardcoded values: src/components/Topbar.tsx (11), app/globals.css (7), app/products/[id]/page.tsx (5), src/components/common/StatusBadge.tsx (5).

    Proposed tokens (dsmith init --dry-run, nothing written)

    • 6 color, 5 spacing, 2 radius and 2 font-size tokens, merging 23 raw values, written as design-system/tokens.json, tokens.css (--ds-* variables) and tokens.ts.
    • Coverage:

    60 of 62 hardcoded values (96.8%) could be replaced. 31 are exact matches (migrated by default); 29 are near matches that need --close and may shift what renders slightly.

    Next steps

    1. Say "create the tokens" and I'll run dsmith init to write the files above.
    2. Then I'll show the dsmith migrate plan (exact matches only) before changing any source file.
    3. Pick which Button and Badge to keep; dsmith decide records it so imports can be migrated too.

    Topbar.tsx

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Hardcoded styling values make design systems impossible to maintain. This skill automates the detection, extraction, and migration of raw CSS, Tailwind, and React Native styles into a structured design token system. It uses an AST parser to identify inconsistencies and provides a controlled path to refactor your codebase without manual search-and-replace.

    What it does

    • Audit codebase identifies hardcoded colors, spacing, border radii, and font sizes across multiple styling frameworks.
    • Draft design tokens generates W3C-compliant JSON, CSS variables, and TypeScript modules from existing style patterns.
    • Automated migration replaces raw values with token references using exact or near-match logic.
    • Agent enforcement adds a design-system section to AGENTS.md so other AI agents use your tokens and existing components instead of raw values.
    • CI guarding prevents new hardcoded styles from being merged into your main branch.

    How it works

    1. Detect scans the repository to identify the styling architecture and count hardcoded instances.
    2. Draft creates a proposed token set based on the most frequent raw values found in the audit.
    3. Plan generates a migration preview showing exactly which lines will change before any files are modified.
    4. Apply executes the refactor across the codebase, with the option to isolate changes in a dedicated branch.
    5. Install configures rules to keep future code, including AI-generated snippets, aligned with the system.

    Frameworks & tools

    Supports CSS, SCSS, Tailwind (v3/v4), styled-components, Emotion, MUI, and React Native (StyleSheet and Reanimated). Built on an AST parser for safe code manipulation.

    Why this beats prompting it yourself

    Generic prompts often hallucinate token names or miss complex CSS-in-JS patterns. This skill uses a specialized AST-based CLI to ensure every replacement is syntactically correct and tracked for easy reversal.

    Use cases

    • Auditing a legacy repository to quantify design system debt.
    • Bootstrapping a design token library for a project that has none.
    • Refactoring thousands of hardcoded hex codes into semantic CSS variables.
    • Blocking PRs that introduce "magic numbers" into the UI.

    Known limitations

    Migration revert skips files edited after the migration was applied. Near-match migration (--close) requires manual verification as it may slightly alter the UI. CLI messages are currently in Korean; the agent summarizes them in your language.

    Open source and privacy

    MIT licensed: https://github.com/project-hh-org/dsmith. Everything runs locally. The only network call is npx downloading the dsmith package from npm on first run. Commands that write files (init, migrate --apply, install, guard init) only run after you agree.

    Revert skips files modified after migration. Near-match migration may alter UI rendering. Requires local npx execution capability.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 6 days ago

    • Free with an Agensi account

    Requires

    Node.js 20+
    Node.js

    Permissions

    Read Files
    Write Files
    Network Access
    Terminal / Shell

    File Scopes

    .dsmith/**
    design-system/**
    AGENTS.md
    src/**

    Terminal: runs `npx dsmith`. Network: npx downloads the package from npm on first run; no other network calls. Read files: scans style code. Write files: only after the user agrees (tokens in design-system/, migrated source files, AGENTS.md, guard config). State is kept in .dsmith/.

    Listed6 days ago

    What's inside

    Frequently Asked Questions

    dsmith parses your styles with an AST parser instead of regex, so it knows which values are colors, spacing, radius or font sizes in CSS, Tailwind classes, CSS-in-JS and React Native. Migrations are planned first, validated file by file when applied, and recorded so they can be reverted.

    Yes, dsmith supports CSS, SCSS, Tailwind, styled-components, Emotion, MUI, and React Native (StyleSheet/Reanimated), making it ideal for teams managing both web and mobile platforms.

    dsmith groups near-identical values (for example four slightly different blues) into one proposed token. By default migrate only replaces exact matches; near matches need --close, and you can limit a run with --category or --files and review the plan before anything is written.

    The skill is a SKILL.md plus a command reference that teaches your agent when and how to run the dsmith CLI safely (read-only audit first, writes only after you agree). The CLI itself is MIT licensed on GitHub (project-hh-org/dsmith) and runs via npx.

    dsmith install adds a design-system section to AGENTS.md telling agents to use tokens and existing components, and dsmith guard can fail a PR in CI when it adds new hardcoded values above a threshold.

    While dsmith provides a safe migration path, it is recommended to run it on a clean git branch; it includes a revert feature, though it may skip files that have been manually edited post-migration.

    New in Frontend & Web Apps