Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Design Tokens & Dark Mode — OKLCH + Tailwind v4

    1

    Generate production-ready design token systems with light/dark modes, OKLCH scales, and Tailwind v4 exports.

    Free

    1 useSecurity scanned
    Design Tokens & Dark Mode — OKLCH + Tailwind v4

    Design Tokens & Dark Mode — OKLCH + Tailwind v4

    Example session with this skill installed

    Create a design token system for a fintech app using #0052FF as the brand color. I need light/dark mode and Tailwind v4 CSS. Grep the src folder for any existing values first.

    • Read your context and instructions
    • Compiled the design tokens

    I have analyzed the source files and identified 12 unique hex codes. I clustered these into a unified OKLCH scale and mapped them to a semantic token system.

    Fintech Design System Tokens

    @import "tailwindcss";
    
    @theme {
      /* Primitive Scale: Accent Blue */
      --color-blue-50: oklch(0.96 0.02 255);
      --color-blue-500: oklch(0.62 0.22 255); /* Brand #0052FF */
      --color-blue-600: oklch(0.55 0.22 255);
      --color-blue-950: oklch(0.18 0.08 255);
    
      /* Primitive Scale: Neutral */
      --color-neutral-50: oklch(0.98 0.005 255);
      --color-neutral-900: oklch(0.25 0.01 255);
      --color-neutral-950: oklch(0.15 0.01 255);
    
      /* Layout Scales */
      --spacing-1: 4px;
      --spacing-4: 16px;
      --radius-md: 8px;
    }
    
    :root {
      --surface-base: var(--color-neutral-50);
      --text-primary: var(--color-neutral-950);
      --action-bg: var(--color-blue-600);
      --border-default: var(--color-neutral-200);
      color-scheme: light;
    }
    
    [data-theme="dark"] {
      --surface-base: var(--color-neutral-950);
      --text-primary: var(--color-neutral-50);
      --action-bg: var(--color-blue-500);
      --border-default: var(--color-neutral-800);
      color-scheme: dark;
    }
    
    @theme inline {
      --color-surface: var(--surface-base);
      --color-fg: var(--text-primary);
      --color-action: var(--action-bg);
    }
    
    Semantic PairLight RatioDark RatioStatus
    text.primary / surface.base14.5:112.8:1PASS
    action.bg / surface.base5.2:14.8:1PASS
    text.secondary / surface.base6.1:15.4:1PASS

    Next steps

    1. Add the provided <script> toggle to your <head> to prevent dark mode flickering.
    2. Replace raw classes like text-[#0052FF] with the semantic text-action.
    3. Review the tokens.json file for integration with Figma or other design tools.

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

    About this skill

    Hardcoded hex values and inconsistent spacing make codebases difficult to maintain and nearly impossible to theme. This skill transforms fragmented styles into a multi-tier design token system for production web apps.

    What it does

    • Multi-tier token architecture builds systems using primitive, semantic, and component-level tokens for maximum flexibility.
    • Color scale generation creates perceptually uniform OKLCH scales for neutrals, accents, and status colors.
    • Light and dark mapping defines semantic pairs like surface.base and text.primary that swap automatically.
    • Codebase extraction greps existing repos to cluster raw values and identify "drift" for cleanup.
    • Accessibility verification checks every semantic pair against WCAG 4.5:1 and 3:1 contrast ratios.
    • Multi-format export generates CSS variables, Tailwind v4 @theme blocks, and W3C DTCG JSON.

    How it works

    1. Analyze the brand brief or existing codebase to identify core colors, typography, and density requirements.
    2. Build the primitive scales for colors (steps 50-950), spacing (4px base), and typography (1.25 ratio).
    3. Map semantic tokens to light and dark modes, ensuring elevation is handled via surface steps rather than shadows in dark mode.
    4. Export the final token manifest to tokens.json and a production-ready CSS/Tailwind configuration.

    Frameworks & tools

    Specifically designed for modern web development using Tailwind CSS v4, CSS Variables, and the W3C Design Token Community Group (DTCG) standard. It utilizes oklch for color space precision and supports any framework that consumes CSS or JSON.

    Why this beats prompting it yourself

    Standard LLMs often generate random hex values that lack perceptual uniformity and ignore contrast accessibility. This skill enforces a strict three-tier architecture and uses specific mathematical scales for spacing and type, ensuring your UI remains consistent as it scales.

    Use cases

    • Add a professional dark mode to an existing React or Next.js application.
    • Unify inconsistent margins and colors in a legacy CSS codebase.
    • Scaffold a design system for a new project starting from a single brand color.
    • Export design tokens from a codebase into a JSON format for design tool syncing.

    Known limitations

    Does not support Tailwind v3 config files. Requires the codebase to be accessible for the extract mode to identify raw hex and RGB values.

    Supports Tailwind v4 only. Requires existing codebase access for extraction. Focuses on CSS/web platforms; no native mobile (SwiftUI/XML) export provided.

    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

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 6 days ago

    • Free with an Agensi account

    Permissions

    Write Files
    Listed6 days ago
    Updated1 day ago

    What's inside

    Frequently Asked Questions

    The skill uses the OKLCH color space to ensure colors have consistent perceived lightness, preventing the 'muddy' or 'vibrant' inconsistencies common with standard Hex/RGB scaling. It also enforces a strict three-tier architecture (Primitive, Semantic, Component) to make your theme scalable and easy to update.

    This skill is optimized for Tailwind v4's new CSS-first configuration and the W3C Design Token Community Group (DTCG) standard. While it does not support Tailwind v3's JavaScript config, it generates standard CSS variables that work with any modern framework like React, Vue, or Svelte.

    Yes, the skill includes a codebase extraction feature that can scan your existing repository to identify 'drift'—inconsistent hex values and spacing—and group them into a unified token system. This makes it ideal for migrating legacy projects to a modern, themed architecture.

    You receive a production-ready manifest including a `tokens.json` file (W3C format), a CSS variables stylesheet, and a Tailwind v4 `@theme` block. It also provides an accessibility report verifying WCAG contrast ratios for all semantic color pairs.

    The skill includes a dedicated accessibility verification step that automatically checks every semantic color pairing against WCAG 4.5:1 (AA) and 3:1 standards. It flags failing combinations and suggests adjustments to the OKLCH lightness values to ensure compliance.

    New in Frontend & Web Apps