agentleFS
strongeronstrongeron/ui-guides-agent-rules/.claude/skills/theme-validation/SKILL.md

theme-validation

Skill1 starsChanged 10 months agoMITView on GitHub

Validate UI components and principles work correctly in both light and dark themes using Playwright screenshots. Use this skill when: - Adding new UI components that use color - Creating or modifying aesthetics principles - After making theme-related CSS changes - Before committing color-heavy UI changes Save to: screenshots/theme-validation/{num}-{principle-name}-light.png 5. Capture dark mode screenshot: Save to: screenshots/theme-validation/{num}-{principle-name}-dark.png When doing a theme check, prioritize these aesthetics principles: - Color Dominance (aesthetics-color-dominance) - Design Variety (aesthetics-design-variety) - Atmospheric Backgrounds (aesthetics-atmospheric-backgrounds) - Design…

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 7
  2. Distinctive:

    After making theme-related CSS changes

    line 10
  3. Distinctive:

    Before committing color-heavy UI changes

    line 11
  4. Distinctive:

    When doing a theme check, prioritize these aesthetics principles:

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Theme Validation

Validate UI components and principles work correctly in both light and dark themes using Playwright screenshots.

When to Use

Use this skill when:

  • Adding new UI components that use color
  • Creating or modifying aesthetics principles
  • After making theme-related CSS changes
  • Before committing color-heavy UI changes

Workflow

  1. Start dev server (if not running):
    npm run dev
  2. Navigate to principle using Playwright:
    // Use JavaScript to click sidebar buttons (handles scroll issues)
    () => {
      const buttons = Array.from(document.querySelectorAll('button'));
      const btn = buttons.find(b => b.textContent.includes('PRINCIPLE_NAME'));
      if (btn) { btn.scrollIntoView({ behavior: 'instant', block: 'center' }); btn.click(); }
    }
  3. Capture light mode screenshot:
    // Ensure light mode
    document.documentElement.classList.remove('dark');
    Save to: screenshots/theme-validation/{num}-{principle-name}-light.png
  4. Toggle to dark mode:
    document.documentElement.classList.add('dark');
  5. Capture dark mode screenshot: Save to: screenshots/theme-validation/{num}-{principle-name}-dark.png
  6. Repeat for all target principles

Screenshot Naming Convention

screenshots/theme-validation/
├── 01-color-dominance-light.png
├── 01-color-dominance-dark.png
├── 02-design-variety-light.png
├── 02-design-variety-dark.png
└── ...

Color-Heavy Principles to Validate

When doing a theme check, prioritize these aesthetics principles:

  • Color Dominance (aesthetics-color-dominance)
  • Design Variety (aesthetics-design-variety)
  • Atmospheric Backgrounds (aesthetics-atmospheric-backgrounds)
  • Design Commitment (aesthetics-design-commitment)
  • Anti-Generic Design (aesthetics-anti-generic)

Theme Strategy

App Shell: Uses semantic tokens that adapt to theme

  • bg-card, bg-muted, text-foreground, text-muted-foreground

Example Components: May have explicit backgrounds

  • "Bad" examples often use fixed colors to demonstrate specific issues
  • "Good" examples should use semantic tokens when possible
  • Styled demos (gradients, specific palettes) use explicit colors isolated from theme

Validation Checklist

  • Text is readable in both themes
  • Contrast ratios meet accessibility standards
  • Example components don't disappear into background
  • Primary buttons have proper contrast with text
  • Semantic colors (success, error) work in both themes

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.