
design-foundation
Create or extract a design-token foundation — colors, typography, spacing, radii, shadows — as a real tokens file (CSS variables and/or Tailwind theme) plus a migration map from current hardcoded values. Use when the user says 'set up a design system', 'our styles are inconsistent', 'we have 50 shades of the same blue', 'add design tokens', 'formalize our design', 'make new features match', or when starting a new frontend that needs a foundation before building screens. Also the first step whenever other design work keeps fighting ad-hoc values. Produces the tokens file, a global→semantic token structure wired for dark mode, and a short list of the worst drift to migrate first.
- Installs
- 81
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/sanky369/vibe-building-skills --skill design-foundation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads design-foundation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Design Foundation
Produce a working tokens file for this specific codebase — not a document about tokens. A token is a named design decision (--color-text-primary, --space-4); centralizing them is what makes every later design skill (layout, type, color, components) land consistently. Governing principle: extract before you invent — in an existing codebase, the token system should formalize the best of what's already there, so migration is renaming, not redesigning.
When to use / handoffs
- Use to create tokens from scratch or extract them from an existing codebase.
- If the user's pain is specifically color (palette, contrast, dark mode depth) →
skills/frontend-design/color-systemafter the token skeleton exists. - If specifically type (scale, fonts, readability) →
skills/frontend-design/typography-system. - If they want components built on tokens →
skills/frontend-design/component-architecturenext. - For broad "where do I start" requests →
skills/frontend-design/frontend-orchestrator.
Step 1 — Inspect the codebase
Before asking anything, gather evidence:
- Find the current styling entry points. Glob
tailwind.config.{js,ts,cjs,mjs},**/globals.css,**/index.css,**/app.css,**/*theme*,**/tokens*. Read them. - Detect the stack. Tailwind v4 (
@import "tailwindcss"+@themein CSS) vs v3 (config filethemeobject) vs CSS Modules / styled-components / vanilla CSS. Checkpackage.jsonfor the tailwindcss version. - Measure drift. Grep source for
#[0-9a-fA-F]{3,8}\b,rgba?\(,hsla?\(→ count distinct colors. Grep for\d+pxand Tailwind arbitrary values\[(\d+px|#)→ count rogue spacing/size values. These counts go in your rationale. - Find the de facto system. Sort found values by frequency. The most-used font sizes, spacing steps, and colors are the candidate tokens.
- Check dark mode (
dark:,prefers-color-scheme) — determines whether the semantic layer must ship two modes now.
Step 2 — Intake
Ask in one batch, only what's missing: brand color (or "pick for me"), product feel (dense data tool vs. spacious marketing/consumer), and dark mode now or later. Infer everything else. Don't stall: if the codebase already answers these (an obvious brand blue, an existing dark: usage), state assumptions and proceed.
Step 3 — Build the token system
Two layers minimum, three when a component library exists:
- Global tokens — raw values: a neutral ramp (50–950, tinted toward the brand hue, never pure grey), the brand ramp, semantic status colors (success/warning/error/info), a spacing scale on a 4px base (4, 8, 12, 16, 24, 32, 48, 64), font sizes, radii, shadows, z-index steps, transition durations.
- Semantic tokens — meaning, referencing globals:
bg-primary/secondary,text-primary/secondary/tertiary/inverse,border-primary,interactive-primary/hover/active/disabled. This is the layer that flips for dark mode — components only ever consume semantic tokens. - Component tokens — only if a component library exists or is planned next (
--button-primary-bg: var(--color-interactive-primary)).
Decision rules:
- Tailwind v4 → define tokens as CSS variables in
@themein the main CSS file. Tailwind v3 →theme.extendin the config, with semantic layer as CSS variables referenced from the config. No Tailwind → plain CSS custom properties on:root(+.darkor media-query block). - Extraction rule: when existing values cluster (15px, 16px, 17px), collapse to the scale value closest to the most frequent; list every collapse in the migration map.
- Naming: kebab-case, category-first (
--color-text-primary,--space-4,--radius-md). Match Tailwind's names where Tailwind is present, so utilities keep working.
Canonical shape (CSS variables; adapt to the detected stack)
:root {
/* global */
--gray-50: #F8FAFC; --gray-500: #64748B; --gray-900: #0F172A; /* full 50–950 ramp, brand-tinted */
--brand-500: #3B82F6; --brand-600: #2563EB; /* full ramp */
--space-1: 0.25rem; --space-2: 0.5rem; --space-4: 1rem; --space-8: 2rem;
--radius-md: 0.375rem; --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10);
/* semantic — the only layer components touch */
--color-bg-primary: var(--gray-50);
--color-text-primary: var(--gray-900);
--color-text-secondary: var(--gray-600);
--color-border-primary: var(--gray-200);
--color-interactive-primary: var(--brand-600);
--color-interactive-hover: var(--brand-700);
}
.dark {
--color-bg-primary: var(--gray-950); /* dark gray, never #000 */
--color-text-primary: var(--gray-50);
--color-text-secondary: var(--gray-300);
--color-border-primary: var(--gray-700);
}
Full three-layer taxonomy, Tailwind v3/v4 wiring, and the variant/responsive-token patterns: read references/token-architecture.md when building the complete file.
Step 4 — Write the file and migrate the worst offenders
- Write the tokens into the detected entry point (don't create a parallel system beside an existing one — extend it).
- Migrate 1–3 of the highest-traffic files (the ones your grep showed drifting most) as a demonstration, replacing raw values with tokens.
- Produce the migration map for the rest.
Required output format
Deliver code plus this summary:
## Tokens file
[path written, e.g. src/app/globals.css or tailwind.config.ts — full contents]
## Decisions
| Decision | Choice | Why |
| Stack wiring | Tailwind v4 @theme / v3 config / CSS vars | [detected how] |
| Neutral tint | [hue] | matches brand [color] |
| Spacing base | 4px | [most existing values already multiples / default] |
| Dark mode | now via .dark class / deferred | [user answer or inference] |
## Migration map (worst drift first)
| Found in code | Count | Replace with |
| #3c82f7, #3B82F6, #3a80f0 | 23 | var(--color-interactive-primary) |
| padding: 13px / p-[13px] | 9 | var(--space-3) (12px) |
| ... |
## Migrated now
[files actually edited as demonstration]
## Next step
[Which skill consumes this — typically skills/frontend-design/typography-system or color-system]
Quality bar (check before delivering)
- Every semantic text/background pairing meets WCAG AA (4.5:1 normal text, 3:1 large text) in both modes if dark mode shipped
- Spacing scale is a single geometric-ish progression on one base; no orphan steps
- Neutrals are brand-tinted (nonzero saturation), no
#808080/ pure#000 - Components/examples reference only semantic tokens, never globals directly
- Token names collide with nothing existing; Tailwind utilities still resolve
- Migration map covers every value cluster found in Step 1, each mapped to exactly one token
- No second parallel token system introduced
Integration
- Consumes: maturity diagnosis + drift counts from
skills/frontend-design/frontend-orchestrator(if it ran). - Produces the tokens file consumed by:
skills/frontend-design/typography-system(extends the type tokens),skills/frontend-design/color-system(extends the color ramps + dark mode),skills/frontend-design/layout-system(spacing + breakpoints),skills/frontend-design/visual-hierarchy-refactoring(refactors screens onto tokens),skills/frontend-design/component-architecture(component layer).
References
references/token-architecture.md— full three-layer token taxonomy with complete listings, Tailwind v3 and v4 wiring, and patterns for dark mode, component variants, and responsive tokens. Read when writing the complete tokens file or wiring an unfamiliar stack.
FAQ
What does the design-foundation skill do?
Create or extract a design-token foundation — colors, typography, spacing, radii, shadows — as a real tokens file (CSS variables and/or Tailwind theme) plus a migration map from current hardcoded values. Use when the user says 'set up a design system', 'our styles are inconsistent', 'we have 50 shades of the same blue', 'add design tokens', 'formalize our design', 'make new features match', or when starting a new frontend that needs a foundation before building screens. Also the first step whenever other design work keeps fighting ad-hoc values. Produces the tokens file, a global→semantic token structure wired for dark mode, and a short list of the worst drift to migrate first.
How do I install design-foundation?
Run npx skills add https://github.com/sanky369/vibe-building-skills --skill design-foundation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/design-foundation/ (personal) or .claude/skills/design-foundation/ (project).
Which AI agents can use design-foundation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is design-foundation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains design-foundation?
It is published by sanky369 in sanky369/vibe-building-skills. It has 81 recorded installs.
More from sanky369/vibe-building-skills
social-graphics
sanky369/vibe-building-skills
Produce platform-correct social media graphics: pick the right dimensions and layout per platform, write the headline/body/CTA copy, build the generation prompt, and generate the image via the repo's FAL.ai pipeline. Use whenever the user wants a social post visual, Instagram post/story/carousel, LinkedIn graphic, Twitter/X image, TikTok thumbnail, Pinterest pin, launch announcement graphic, or 'something to post about X' — even if they never name a platform. Also use to adapt one design across several platforms. Produces a Social Graphic Spec per asset (platform, dimensions, layout, copy, full generation prompt) plus generated images when FALAPIKEY is available.
direct-response-copy
sanky369/vibe-building-skills
Write copy engineered to drive one specific action — landing pages, sales pages, opt-in pages, ads, promotional emails — using an eight-part direct-response architecture (hook, problem, mechanism, solution, proof, objections, CTA, urgency). Use when the user says 'write my landing page / sales page / ad', 'this page isn't converting', 'rewrite my homepage copy', 'write copy for my lead magnet page', or any request for persuasive copy with a measurable action at the end. Produces the full copy draft, section-labeled against the architecture, plus hook alternatives and a conversion checklist.
tweet-writer
sanky369/vibe-building-skills
Open the skill to read its SKILL.md instructions.
typography-system
sanky369/vibe-building-skills
Build or repair a typography system: a modular type scale, font choices and loading, hierarchy, line-height/line-length, and fluid sizing — delivered as tokens (Tailwind fontSize config or CSS variables) applied to real components. Use when the user says 'the text looks off', 'fonts are inconsistent', 'headings don't stand out', 'pick fonts for me', 'it's hard to read', 'too many font sizes', or when an audit finds font-size sprawl. Chooses the scale ratio from product density (dense app vs marketing vs editorial), verifies contrast and measure, and produces the type tokens plus a migration map from existing rogue sizes.
remotion-script-writer
sanky369/vibe-building-skills
Write a complete, render-ready Remotion video script as structured JSON: analyze the user's codebase or product, break the video into timed scenes, specify every visual element, animation, transition, and voiceover line, and list required assets and Remotion packages. Use whenever the user wants a Remotion video, a programmatic/code-rendered video, a product demo video of their app, an animated coding tutorial, a data-visualization video, or short-form animated social content — trigger on 'make a video of my app', 'Remotion', 'animated demo', 'code walkthrough video', 'render a video from code'. Produces a Remotion Script JSON (videoMetadata, scenes[], requiredAssets, technicalRequirements) that Remotion agent tooling can implement directly.
product-video
sanky369/vibe-building-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.