Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Design System

ASecurity

Build a new design system (tokens, variants, theming). Use when "create a design system" or "component library from scratch". Drifted existing system → housekeep-design. Plan-only unification → plan-uiux-unification.

9 stars
0 votes
0 copies
0 views
Added 10/6/2026
ai-agentstypescriptbashreactdocumentation

Security Analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned 10/6/2026

$npx -y skills add kensaurus/skills --skill design-system --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design System?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Design System
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kensaurus-design-system-skills/badge)](https://www.skillsdirectory.com/skills/kensaurus-design-system-skills)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: design-system
description: >
  Build a new design system (tokens, variants, theming). Use when
  "create a design system" or "component library from scratch". Drifted
  existing system → housekeep-design. Plan-only unification →
  plan-uiux-unification.
license: MIT
---

# Design System Skill

**Degree of freedom: MIXED.** Token taxonomy and variants `[HIGH freedom]`;
existing `ui/` / token inventory `[LOW freedom — run exactly]`.

Build scalable, maintainable design systems with consistent tokens, variants, and documentation.

## How to reason

1. **Inventory** — `components/ui`, tokens, `cva`, shadcn/Radix
2. **Tokenize** — semantic tokens, not raw hex in components
3. **Variant** — `cva` covers real states (default/destructive/disabled)
4. **Document** — JSDoc, keyboard/focus, dark mode

## Worked example

> **Inventory:** shadcn `Button` exists; colors are raw `#3B82F6` in three pages; no `--primary`.
> **Tokenize:** `--primary` / `--primary-foreground` in `globals.css`; Tailwind maps `hsl(var(--primary))`.
> **Variant:** extend existing `buttonVariants` — do not add `components/Button2.tsx`.
> **Document:** JSDoc lists variants/sizes; focus ring + dark `.dark` overrides.

## Self-critique before reporting

- **Did not fork** — existing primitives were extended, not recreated
- **Semantic tokens** — components reference tokens, not primitives or hex
- **A11y + dark** — focus, disabled, and dark variants exist
- **Right owner** — drifted existing system → `housekeep-design`; plan-only unification → `plan-uiux-unification`

## Check existing first  [LOW freedom — run exactly]

**Before creating ANY design system components, verify:**

1. **Check for existing design system:**
```bash
ls -la src/components/ui/
cat package.json | grep -i "shadcn\|radix\|headless"
cat components.json 2>/dev/null # shadcn config
```

2. **Check for existing tokens:**
```bash
cat tailwind.config.* | head -100
cat src/styles/globals.css | head -50
rg "var\(--" --type css | head -20
```

3. **Check for existing patterns:**
```bash
rg "cva\(|variants:" --type ts --type tsx | head -10
rg "cn\(|clsx\(|twMerge" --type tsx | head -5
```

**Why:** Don't recreate existing primitives. Extend and enhance what exists.

## Design Tokens  [HIGH freedom]

Face and ground are choices, not defaults: Inter/Roboto/Arial, a cream/off-white page, and a purple-gradient primary are the fallbacks to name and avoid. Add `--font-sans` / `--font-display` tokens for the faces you pick.

### CSS Custom Properties
- Semantic HSL triplets on `:root` (`--background`, `--foreground`, `--primary`, `--muted`, `--destructive`, `--border`, `--ring`, …); `.dark` overrides the same names
- Spacing (`--spacing-xs…xl`), radius (`--radius` ± 4px), shadows (`--shadow-sm…lg`), durations and easings as tokens too
```css
:root {
 --background: 0 0% 100%;
 --foreground: 222.2 84% 4.9%;
 --primary: 221.2 83.2% 53.3%;
 --primary-foreground: 210 40% 98%;
 --radius: 0.5rem;
}
.dark {
 --background: 222.2 84% 4.9%;
 --foreground: 210 40% 98%;
}
```
Full token set: [references/tokens.md](references/tokens.md) §CSS Custom Properties.

### Tailwind Config Integration
- `darkMode: 'class'`; every color is `hsl(var(--token))` with a `DEFAULT` / `foreground` pair
- `borderRadius`, `boxShadow`, `transitionDuration` read the CSS variables, never literals

Full config: [references/tokens.md](references/tokens.md) §Tailwind Config Integration.

## Component Variants with CVA  [HIGH freedom]

- `cva()` base string carries focus-visible ring and `disabled:` styles; `variants.variant` (default/destructive/outline/secondary/ghost/link) and `variants.size` (default/sm/lg/icon) with `defaultVariants`
- Props extend the native element attributes plus `VariantProps<typeof buttonVariants>`; `forwardRef` and `asChild` via `Slot`
- Export both the component and its `*Variants` so consumers can reuse the classes

```tsx
// lib/utils.ts
import { type ClassValue, clsx } from 'clsx'
import { twMerge } from 'tailwind-merge'

export function cn(...inputs: ClassValue[]) {
 return twMerge(clsx(inputs))
}
```

Full `button.tsx`: [references/components.md](references/components.md) §Button with CVA.

## Compound Components Pattern  [HIGH freedom]

- One file exports `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter`
- Each is a `forwardRef` wrapper over the native element with `cn(defaults, className)` and a `displayName`
- Tokens only: `bg-card text-card-foreground`, `text-muted-foreground`

Full `card.tsx`: [references/components.md](references/components.md) §Compound Card.

## Accessible Components with Radix  [HIGH freedom]

- Re-export `Root`, `Trigger`, `Portal`, `Close` from `@radix-ui/react-dialog`; style `Overlay` and `Content` with `forwardRef`
- `data-[state=open]` / `data-[state=closed]` drive enter/exit animation classes
- A visible close button inside `Content` with an `sr-only` label

Full `dialog.tsx`: [references/components.md](references/components.md) §Accessible Dialog with Radix.

## Component Documentation Pattern  [HIGH freedom]

JSDoc block per component: one-line purpose, `@example` usage, then `## Variants`, `## Sizes` (with pixel heights), and `## Accessibility` (native element, `disabled`, focus ring, `asChild`).
Template: [references/components.md](references/components.md) §Component Documentation Pattern.

## File Structure

`src/components/ui/*.tsx` with an `index.ts` barrel, `src/lib/utils.ts` for `cn()`, `src/styles/globals.css` for tokens, `tailwind.config.ts` for the theme.
Tree: [references/components.md](references/components.md) §File Structure.

## Validation  [LOW freedom — do not skip]

After creating design system components:

1. **Consistency** → All components use same tokens
2. **Variants** → Cover all needed use cases
3. **Accessibility** → Keyboard nav, ARIA, focus states
4. **Dark mode** → All components work in dark mode
5. **Responsive** → Mobile-friendly by default
6. **Documentation** → JSDoc comments, usage examples
7. **Type safety** → Full TypeScript support with VariantProps

Attribution

kensauruskensaurus
View sourceSee grades on GitHubMore from kensaurus →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →