dark-mode-check
БесплатноБез исполняемых скриптовНе проверенAudit SCSS and TSX files for dark mode issues — missing variable usage, hardcoded colors, icon gaps, selector misuse, and inline dark overrides outside the…
от anyproto★ 9 169 звёзд на GitHubОб этом скилле
Dark Mode Check Skill
Audit styles and components for dark mode correctness in the Anytype-TS codebase. Catches hardcoded colors, missing icon variants, inline dark overrides, and CSS variable gaps.
When to Use
Activate this skill when the user:
- Asks to check dark mode styles for a component or file
- Wants to verify a new component works correctly in dark mode
- Asks to audit dark mode across the codebase or a folder
- Adds new styles and wants to ensure they follow theming patterns
- Reports a visual bug that only appears in dark mode
Architecture Reference
Theme Selector
Dark mode is activated by the class themeDark on the <html> element:
html.themeDark { ... }
- Set via
S.Common.setThemeClass()insrc/ts/store/common.ts - Applied by
U.Common.addBodyClass('theme', 'dark')insrc/ts/lib/util/common.ts - Values:
'dark','light','system'(system defers tonativeThemeIsDark)
CSS Variable System
Light mode defaults: src/scss/_vars.scss
Dark mode overrides: src/scss/theme/dark/common.scss (lines 5-82)
Core variable families:
| Family | Examples | Purpose |
|---|---|---|
--color-text-* |
primary, secondary, tertiary, inversion |
Text colors |
--color-shape-* |
primary, secondary, tertiary, highlight-dark/medium/light |
Borders, dividers |
--color-bg-* |
primary, secondary, loader, grey |
Backgrounds |
--color-control-* |
accent, active, inactive, bg |
Interactive elements |
--color-system-* |
accent-125, accent-50, accent-25, selection |
System accents |
--color-light-* |
grey, yellow, orange, red, pink, purple, blue, ice, teal, lime |
Tag/highlight colors (light variants) |
--color-very-light-* |
Same set as above | Even lighter tag/highlight variants |
--color-dark-* |
Same set as above | Dark tag/highlight variants |
Dark Mode File Organization
src/scss/theme/dark/
├── common.scss (~485 lines) - CSS variables + shared overrides + icon paths
├── page.scss (~236 lines) - Page-specific dark styles
├── block.scss (~250 lines) - Block component dark styles
├── menu.scss (~315 lines) - Menu dark styles
├── popup.scss (~116 lines) - Popup/modal dark styles
└── widget.scss (~87 lines) - Widget dark styles
All are imported via src/scss/common.scss.
Icon Theming
Dark mode icons live in src/img/theme/dark/ mirroring src/img/icon/:
$themePath: '~img/theme/dark';
html.themeDark {
.icon.buttonAdd { background-image: url('#{$themePath}/icon/block/add0.svg'); }
.icon.buttonAdd:hover { background-image: url('#{$themePath}/icon/block/add1.svg'); }
}
Convention: name0.svg = default, name1.svg = hover/active.
In TypeScript, dynamic icon paths use S.Common.getThemePath():
// Returns 'theme/dark/' or ''
const path = `./img/${S.Common.getThemePath()}icon/file/${type}.svg`;
Dark Shadow Mixin
// In dark/common.scss
@mixin shadow {
box-shadow: 0px 4px 16px rgb(0 0 0 / 20%), 0px 0px 0px 1px #393933 inset;
}
Review Checklist
When auditing a file or component for dark mode correctness, check every item below.
1. Hardcoded Colors
Rule: No raw hex (#xxx), rgb(), or rgba() values should appear in dark mode blocks unless they are truly one-off (e.g., a specific gradient stop with no variable equivalent).
Search pattern:
grep -E '#[0-9a-fA-F]{3,8}|rgb\(|rgba\(' src/scss/theme/dark/*.scss
Known violations (for reference):
src/scss/theme/dark/block.scss—.label { color: #464646; }, bgColor-* classes with hardcoded hexsrc/scss/theme/dark/common.scss— shadow mixin#393933, vault#393939, iconWrap#4f4f4f/#000000, markup highlight#044062src/scss/theme/dark/menu.scss— bgColor-* palette,.connected::before #294b0e,.error::before #581f0csrc/scss/theme/dark/page.scss—.btn.light .bg { background-color: #fff; }
Action: Flag each hardcoded color. Suggest the closest CSS variable or recommend creating a new one.
2. Inline Dark Overrides Outside Theme Folder
Rule: Dark mode style overrides belong in src/scss/theme/dark/. They should NOT be placed inline in component SCSS files using html.themeDark & or html.themeDark .component.
Search pattern:
grep -rn 'html\.themeDark\|\.themeDark' src/scss/ --include='*.scss' | grep -v 'src/scss/theme/dark/'
Known violations:
src/scss/popup/aiOnboarding.scss— Lines 69-91, inlinehtml.themeDark &block with hardcodedrgba()colorssrc/scss/form/button.scss— Dark mode button overridessrc/scss/page/main/settings.scss— Dark mode settings overrides
Action: Flag inline dark overrides. Recommend moving them to the appropriate file in src/scss/theme/dark/.
3. Missing Icon Dark Variants
Rule: Every icon that appears in the UI must have a dark variant in `src/img/theme/da
Установить dark-mode-check в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dark-mode-check?
Audit SCSS and TSX files for dark mode issues — missing variable usage, hardcoded colors, icon gaps, selector misuse, and inline dark overrides outside the theme folder
Как установить скилл dark-mode-check?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dark-mode-check запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic