danieldekay/ai-ops/svelte-design-tokens-system

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Implement comprehensive design token systems for SvelteKit projects using CSS custom properties and TypeScript utilities. Covers color, typography, spacing, and component tokens with accessibility considerations.

Install

npx vskill@latest install danieldekay/ai-ops/svelte-design-tokens-system

SKILL.md

When to Use

Use this skill when implementing or enhancing design token systems in SvelteKit projects. Ideal for:

  • Setting up new design systems from scratch
  • Enhancing existing CSS with comprehensive tokens
  • Creating reusable component libraries
  • Migrating from hardcoded values to token-based systems
  • Implementing accessibility-compliant design systems

Procedure

  1. Analyze existing design system
  • Read current CSS files to understand existing tokens
  • Identify gaps in token coverage
  • Note existing component patterns
  1. Implement base design tokens in CSS

```css :root { / Color tokens / --color-primary: var(--color-emerald-500); --color-secondary: var(--color-blue-500); --color-accent: var(--color-purple-500); --color-success: var(--color-green-500); --color-warning: var(--color-amber-500); --color-error: var(--color-red-500);

/ Typography tokens / --font-size-xs: 0.75rem; --font-size-sm: 0.875rem; --font-size-base: 1rem; --font-size-lg: 1.125rem; --font-size-xl: 1.25rem; --font-size-2xl: 1.5rem; --font-size-3xl: 1.875rem;

/ Spacing tokens / --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem; } ```

  1. Create TypeScript utility functions

``typescript // src/lib/utils/design-tokens.ts export const tokens = { colors: { primary: 'var(--color-primary)', secondary: 'var(--color-secondary)', // ... other colors }, typography: { sizes: { xs: 'var(--font-size-xs)', // ... other sizes }, weights: { normal: '400', medium: '500', semibold: '600', bold: '700', } }, spacing: { xs: 'var(--spacing-xs)', // ... other spacing } }; ``

  1. Create base components using tokens
  • Card component with consistent padding, border, and shadow
  • Button component with variants (primary, secondary, accent)
  • Typography components (Heading, Text) with proper token usage
  • Ensure all components use design tokens instead of hardcoded values
  1. Implement accessibility attributes
  • Add proper ARIA labels and roles
  • Ensure keyboard navigation support
  • Implement proper focus states
  • Add screen reader support
  1. Test and validate
  • Check token consistency across components
  • Verify accessibility compliance
  • Test responsive behavior
  • Ensure theme switching capability

Pitfalls to Avoid

  • Avoid hardcoded values: Always use CSS custom properties instead of fixed values
  • TypeScript errors: Don't use $$dispatch in Svelte components - use standard events instead
  • Accessibility: Always include proper ARIA attributes and keyboard support
  • CSS specificity: Use proper CSS selectors to avoid token override conflicts
  • Responsive design: Ensure tokens work across different screen sizes
  • Performance: Minimize CSS custom property usage where not needed for theming

Verification

  • All components use design tokens consistently
  • No hardcoded values in components
  • TypeScript compilation passes without errors
  • Accessibility checks pass (WCAG compliant)
  • Theme switching works correctly
  • Responsive behavior tested across devices

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
Repository forks
2
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/danieldekay/ai-ops/svelte-design-tokens-system/badge)](https://verified-skill.com/skills/danieldekay/ai-ops/svelte-design-tokens-system)

Something wrong with this skill or its page? Tell us.