theme-consistency

Enforce theme.yaml CSS variables and ban hardcoded values in prototype mockups.

91|10|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/marcusgoll/Spec-Flow --skill theme-consistency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: theme-consistency
Source: https://github.com/marcusgoll/Spec-Flow/tree/main/.claude/skills/theme-consistency
Command: npx skills add https://github.com/marcusgoll/Spec-Flow --skill theme-consistency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforce consistent theming across prototype mockups by loading theme.yaml, validating CSS variable usage, preventing hardcoded values, and locking the theme after the first screen approval.

Core Features & Use Cases

  • Load and enforce theme.yaml values during mockup generation.
  • Prevent hardcoded colors, spacing, and typography values.
  • Validate new screens against established design patterns.
  • Lock the theme after first approval to ensure session-wide consistency.

Quick Start

  1. Automatically invoke this skill when /prototype create [screen] is called and theme.yaml exists.
  2. When not yet locked, load the theme and allow updates; once approved, lock the theme.
  3. For each new screen, generate HTML using theme variables and validate against rules.
  4. Iterate until all screens align with the established theme.

Frequently Asked Questions about theme-consistency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I maintain consistent theming across prototype screens?

Theme consistency is maintained by loading a theme.yaml file that defines design tokens like colors, spacing, and typography. The Skill enforces these variables across all prototype screens, preventing hardcoded values and ensuring visual alignment from the first screen through all subsequent mockups.

Can I use CSS variables to enforce design system rules in prototypes?

Yes. CSS variables from theme.yaml replace hardcoded colors and spacing values. The Skill validates that every screen uses these variables and density classes, blocking hardcoded styling to lock in consistency once the first screen is approved.

What happens after I approve the first prototype screen?

Once you approve the first screen, the theme is locked session-wide. All subsequent screens must conform to the established design tokens, variables, and density classes. This prevents theme drift and ensures every new mockup aligns with the original design system.

How do I prevent hardcoded colors and spacing in generated HTML mockups?

The Skill automatically validates each generated HTML mockup against theme.yaml rules during /prototype create. It rejects hardcoded color and spacing values, requiring designers to use CSS variables and predefined density classes instead.

Does theme consistency work with OKLCH color spaces in design systems?

Yes. The Skill supports OKLCH and other color models defined in theme.yaml. It enforces whatever color space and token structure your design system specifies, validating all new screens against those established values.

Can I update the theme between prototype screens before locking it?

Yes. Before the first screen is approved, you can update theme.yaml and the Skill will apply changes to new screens. Once approved, the theme locks to prevent inconsistency across the remaining mockups in that session.