Saas design tokens

From Basinfy/Basinfy-SaaS-Studio · View interactive version

Saas design tokens is an AI agent skill from the GitHub repository Basinfy/Basinfy-SaaS-Studio. Author semantic UI design tokens, color scales, typography, and component primitives.

How to use this skill

Skill file

<!-- Generated from .claude/skills by scripts/sync-agent-skills.py. -->

Running this workflow on this client

Run commands from the project root (use Git Bash on Windows if bash points to an unavailable WSL distro). Shared studio files live in .claude/; follow .agents/PORTABLE-RUNTIME.md and .claude/docs/config-resolution.md for client tools, delegation, and approval rules.

Run bash .claude/hooks/yaml-helper.sh resolve_config --keys locale,review_mode,automation,workflow,docs.density and use its output below.

Resolved above — use as-is; --review overrides review_mode. No block →

defaults in .claude/docs/config-resolution.md.

Design Tokens & Semantic UI Spec

Locale & User Profile: Match locale (pt-BR → natural Brazilian Portuguese questions/options, overriding English examples; en → English) and user_profile (founder → plain business language with (Recomendado) first, zero tech jargon; developer → technical). Keep code/tests in English.

The Design Tokens & Semantic UI Spec establishes the foundational design language,

semantic color system, typography scale, spacing tokens, and component styling for the entire

SaaS application. It gates all UI and frontend asset development.


Phase 0: Parse Arguments and Context Check

Every AskUserQuestion call follows .claude/docs/automation-modes.md

(collaborative asks always · guided major-only · autonomous logs and proceeds;

automation_always_ask categories always prompt).

docs.density: controls per-section depth:

workflow:

Context Check:

Read design/prd/product-concept.md or design/product-brief.md. Use design/product-concept.md as a legacy fallback. If none exists, prompt:

"No product concept found. Run /saas-brainstorm first to establish product pillars and target audience."


Phase 1: Framing

Identify the product's primary design direction:

  1. Target Audience & Market: B2B enterprise, developer tool, consumer SaaS, fintech, or creator economy.
  2. Visual Archetype:

[!TIP]

Anti-Slop Foundations (/saas-frontend-taste):

Leverage curated, production-tested palettes (.claude/skills/saas-frontend-taste/library/palettes.json) and typography pairings (library/type.json) calibrated for SaaS archetypes (Linear, Stripe, Vercel, x.ai).

Phase 2: Core Token Foundation (Sections 1–4)

Section 1: Design Philosophy & Personality

Define 3-4 visual design principles (e.g., "Clarity over Decoration", "Speed in Every Interaction", "Calm and Focused Workspaces").

Section 2: Semantic Color System

Define hex, HSL, or OKLCH values for:

  1. Primitives: Neutral scale (50 to 950), Brand primary scale (50 to 950).
  2. Semantic Tokens (Light & Dark themes):
  1. Contrast Validation: Verify all text on background pairings satisfy WCAG 2.2 AA (minimum 4.5:1 for normal text, 3:1 for large text).

Section 3: Typography System

Define font stacks and scales:

  1. Font Families:
  1. Type Scale:
  1. Font Weights: Regular (400), Medium (500), Semibold (600), Bold (700).

Section 4: Spacing, Grid & Elevation

  1. Spacing Scale: 4px base (4, 8, 12, 16, 24, 32, 48, 64px).
  2. Radius Tokens: radius-sm (4px), radius-md (8px), radius-lg (12px), radius-xl (16px), radius-full (9999px).
  3. Elevation & Shadows: shadow-xs, shadow-sm, shadow-md, shadow-lg, shadow-modal.
  4. Z-Index Scale: Base (0), Dropdown (50), Sticky (100), Modal Backdrop (200), Modal (201), Toast (300).

Phase 3: Component Systems & Standards (Sections 5–8)

Section 5: Component Styling & Variants

Specify visual standards for core UI building blocks:

Section 6: Iconography & Visual Assets

  1. Icon Set: Selected library (e.g. Lucide React, Heroicons, Radix Icons).
  2. Stroke Width & Sizes: 16px (inline/small), 20px (standard UI), 24px (features/large).
  3. Empty State & Marketing Visuals: Style guide for empty state illustrations, avatars, and hero graphics.

Section 7: Navigation & App Shell Tokens

  1. Sidebar Tokens: Background, active route highlight, collapsed icon rail width (64px), expanded width (240px).
  2. Topbar Tokens: Height (56px/64px), border color, backdrop blur (backdrop-blur-md).
  3. Command Palette (Cmd+K): Modal overlay blur, search item highlight token, shortcut badge styling.

Section 8: Web Asset Standards & Export Formats

  1. File Format Rules:
  1. File Size Budgets:
  1. Code Export:

Phase 4: Save & Export

Write the completed specification to design/tokens/design-tokens.md (and generate src/styles/tokens.css or Tailwind theme values if source directory exists).


Phase 5: Design System Director Sign-Off

Execute review check with design-system-director agent:

  1. Are all color pairings accessible (WCAG 2.2 AA compliant)?
  2. Is the type scale cohesive with appropriate line heights?
  3. Are light and dark theme tokens fully balanced?

Output Verdict:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.