dark-mode-check

Audit SCSS and TSX files for hardcoded colors and missing dark-mode variants.

8.6k|564|Updated May 22, 2023
One-click install
npx skills add https://github.com/anyproto/anytype-ts --skill dark-mode-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dark-mode-check
Source: https://github.com/anyproto/anytype-ts/tree/main/.claude/skills/dark-mode-check
Command: npx skills add https://github.com/anyproto/anytype-ts --skill dark-mode-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers ensure that codebases adhere to consistent dark mode theming across styles and components, preventing visual regressions when switching themes.

Core Features & Use Cases

  • Static checks for CSS variable usage and proper theme class activation (e.g., html.themeDark).
  • Identify hardcoded color values and suggest replacements with CSS variables.
  • Flag missing dark variants for icons and components.
  • Audit for inline dark overrides and propose relocating them to the dark theme files.
  • Use cases include code reviews, adding new components, or auditing a folder of components for dark mode compliance.

Quick Start

Run the skill against your codebase to report dark mode hotspots and remediation steps. For example, apply it to a project folder like src/ to generate a prioritized report.

Frequently Asked Questions about dark-mode-check

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

FAQPage Schema
How do I audit my SCSS and TSX files for dark mode issues?

To audit SCSS and TSX files for dark mode issues, run this skill against a target folder like src/ to scan for hardcoded colors, missing icon variants, and improper theme class activation, generating a prioritized remediation report.

What causes dark mode visual regressions in a codebase?

Dark mode visual regressions are typically caused by hardcoded color values instead of CSS variables, missing dark variants for icons, and inline overrides located outside the designated theme folder, which bypass proper theme class activation.

How do I find hardcoded colors in my SCSS and TSX components?

You can find hardcoded colors in SCSS and TSX components by using this skill to statically check for direct color values, which then suggests replacing them with proper CSS variables to ensure consistent theming across your codebase.

Does this dark mode check work with CSS variables and theme classes?

Yes, this dark mode check validates CSS variable usage and verifies proper theme class activation, such as html.themeDark, ensuring your codebase adheres to consistent theming standards across both SCSS and TSX files.

What is the best way to flag missing dark variants for icons during code review?

The best way to flag missing dark variants for icons during code review is to statically audit the component folder, allowing the skill to detect missing variants and propose relocating inline dark overrides to the dark theme files.

When should I relocate inline dark overrides in my codebase?

You should relocate inline dark overrides when they exist outside the theme folder, as this skill audits for these overrides and proposes moving them to dedicated dark theme files to prevent visual regressions when switching themes.