/web-development-tools:dark-mode-theming-stingerfrom web-development-tools
Audits and implements dark mode for React/Next.js: CSS tokens, next-themes wiring, FOWT prevention, SSR hydration, Tailwind v4 config, multi-brand theming.
Ships in web-development-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Start with README.md for the workflow map and detailed references.
The dark-mode theming surface is one of the most deceptively complex areas of a modern React/Next.js stack. Getting it right requires aligning four systems: CSS token architecture, a theme provider library, SSR hydration semantics, and (in multi-brand apps) a runtime CSS variable override layer. Getting any one of them wrong produces visible flashes, hydration warnings, inaccessible OS-native controls, or cross-tenant token leakage.
This Stinger encodes the 2026 consensus patterns for all of these. Read SKILL.md for the overview and task routing; follow the specific guide for deep implementation.
Load this skill when dark-mode-theming-wasp-drone is invoked, or the user says:
This skill covers the full dark-mode theming surface for React/Next.js applications: CSS variable token architecture (semantic vs. primitive), next-themes wiring (ThemeProvider, storageKey, enableSystem), FOWT (flash-of-wrong-theme) prevention via a blocking inline script, SSR hydration safety (suppressHydrationWarning, typeof window guards, mounted guard pattern), Tailwind v4 dark-mode configuration (@custom-variant, selector strategy), and multi-brand/white-label runtime theme swapping via CSS variable overrides.
Do NOT use for palette creation or source-of-truth token file authorship (design-system-wasp-drone), per-component visual deltas (ux-ui-svelte-wasp-drone), or persisted-preference schema design (db-wasp-drone). See the scope boundary table below for the full routing map.
| Task | Guide |
|---|---|
| Understand principles and token contract | guides/00-principles.md |
Build the :root / .dark CSS variable layer | guides/01-css-token-architecture.md |
Wire next-themes ThemeProvider | guides/02-next-themes-wiring.md |
| Eliminate flash-of-wrong-theme | guides/03-fowt-prevention.md |
| Fix SSR hydration warnings / mounted guard | guides/04-ssr-hydration-safety.md |
| Configure Tailwind v4 dark mode | guides/05-tailwind-v4-dark-mode.md |
| Implement multi-brand / white-label theming | guides/06-multi-brand-runtime-swap.md |
| Happy-path example (App Router + next-themes + Tailwind v4) | examples/happy-path-app-router.md |
| Edge-case example (cookie-based SSR match) | examples/edge-case-cookie-ssr.md |
| Token layer skeleton template | templates/tokens.css.template.md |
| Audit report template | templates/audit-report.template.md |
These are the directives from the Command Brief, repeated here as the guardrails for every implementation:
var(--token-name). See guides/00-principles.md.guides/03-fowt-prevention.md.prefers-color-scheme (system preference) from persisted preference (localStorage / cookie). System preference is the fallback, not the override. See guides/02-next-themes-wiring.md.typeof window guards in every SSR-executed code path that reads theme state. See guides/04-ssr-hydration-safety.md.guides/06-multi-brand-runtime-swap.md.--color-primary must point to a semantic alias, not a raw hex value. See guides/01-css-token-architecture.md.| In scope | Out of scope: route to |
|---|---|
CSS variable token layer (:root, .dark, per-brand blocks) | Palette creation, token source-of-truth file: design-system-wasp-drone |
next-themes wiring (ThemeProvider, props, storageKey) | Per-component visual deltas (which token for which role): ux-ui-svelte-wasp-drone |
| FOWT prevention (inline script, script placement) | Persisted-preference DB schema (user_preferences.theme): db-wasp-drone |
SSR hydration safety (suppressHydrationWarning, guards) | CSS variable injection input validation: security-wasp-drone |
Tailwind v4 dark mode (@custom-variant) | Tailwind config beyond darkMode: ux-ui-svelte-wasp-drone |
| Multi-brand CSS variable overrides | Auth-gated per-user theme (server-side preference + RBAC): auth-wasp-drone + db-wasp-drone |
For a standard Next.js 15 App Router + next-themes + Tailwind v4 stack:
:root semantic tokens + .dark overrides in globals.csscolor-scheme CSS property set on :root and .darkmeta[name="color-scheme"] in layout.tsxThemeProvider in a "use client" providers componentsuppressHydrationWarning on <html>disableTransitionOnChange enabled on ThemeProvider@custom-variant dark (&:where(.dark, .dark *)) in globals.css.tsx fileResearch trail: research/research-summary.md | Command Brief: ai-tools/command-briefs/dark-mode-theming-wasp-drone-command-brief.md
README.md (opens in a new tab)examples/edge-case-cookie-ssr.md (opens in a new tab)examples/happy-path-app-router.md (opens in a new tab)guides/00-principles.md (opens in a new tab)guides/01-css-token-architecture.md (opens in a new tab)guides/02-next-themes-wiring.md (opens in a new tab)guides/03-fowt-prevention.md (opens in a new tab)guides/04-ssr-hydration-safety.md (opens in a new tab)guides/05-tailwind-v4-dark-mode.md (opens in a new tab)guides/06-multi-brand-runtime-swap.md (opens in a new tab)reports/README.md (opens in a new tab)research/research-summary.md (opens in a new tab)templates/audit-report.template.md (opens in a new tab)templates/tokens.css.template.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub legioncodeinc/vibe-coding-tools --plugin web-development-tools42 skills in this plugin
/asset-stingerMaintain the Universal Asset Registry. Use to register assets, audit code-to-registry drift, or generate migrations. Read README.md for the guide map./component-vendoring-stingerSelect existing UI components and prepare notice-preserving source-copy plans. Use for component reuse, exact MIT artifact provenance, authorized copies, or local fork updates./csv-xlsx-import-export-stingerImplement spreadsheet import and export in React. Use for CSV/XLSX parsing, mapping, row validation, streaming, or CSV injection. Read README.md for the guide map.Other plugins' skills for the same job