web-styling-scss-modules-b67ac8 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited web-styling-scss-modules-b67ac8 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Quick Guide: Two-tier token system (Core primitives -> Semantic tokens). Foreground/background color pairs. Components use semantic tokens only. SCSS Modules + CSS Cascade Layers. HSL format. Dark mode via .dark class with mixin. Data-attributes for state. Self-contained (no external dependencies).<critical_requirements>
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering, import type, named constants)(You MUST wrap ALL UI package component styles in `@layer components {}` for proper cascade precedence)
(You MUST use semantic tokens ONLY in components - NEVER use core tokens directly)
(You MUST use HSL format for colors with CSS color functions - NO Sass color functions like darken/lighten)
(You MUST use data-attributes for state styling - NOT className toggling)
(You MUST use `@use` for imports - `@import` is deprecated and will be removed in Dart Sass 3.0.0)
</critical_requirements>
Auto-detection: UI components, styling patterns, design tokens, SCSS modules, CSS Cascade Layers, dark mode theming
When to use:
Key patterns covered:
.dark class with mixin pattern)When NOT to use:
Detailed Resources:
<philosophy>
The design system follows a self-contained, two-tier token architecture where core primitives (raw HSL values, base sizes) map to semantic tokens (purpose-driven names). Components consume only semantic tokens, enabling theme changes without component modifications.
Core Principles:
</philosophy>
<patterns>
The design system uses a two-tier token architecture: Tier 1 (Core tokens) provides raw values, Tier 2 (Semantic tokens) references core tokens with purpose-driven names.
#### Token Architecture
Location: packages/ui/src/styles/design-tokens.scss
Tier 1: Core tokens - Raw HSL values, base sizes, primitives
--color-white: 0 0% 100%;
--color-gray-900: 222 47% 11%;
--color-red-500: 0 84% 60%;
--space-unit: 0.2rem;Tier 2: Semantic tokens - Reference core tokens with purpose-driven names
--color-background-base: var(--color-white);
--color-text-default: var(--color-gray-500);
--color-primary: var(--color-gray-900);
--color-primary-foreground: var(--color-white);
--color-destructive: var(--color-red-500);Why this matters: Semantic tokens make purpose clear (what the token is for), theme changes only update token values (not component code), components remain theme-agnostic.
For complete implementation examples, see examples/core.md.
Store HSL values without the hsl() wrapper in tokens, apply hsl() wrapper when using tokens, and use modern CSS color functions for transparency and color mixing.
#### Color Format Rules
hsl() wrapper: --color-gray-900: 222 47% 11%;hsl() wrapper when applying: background-color: hsl(var(--color-primary))hsl(var(--color-primary) / 0.5) (append alpha to HSL components)color-mix(in srgb, hsl(var(--color-primary)), white 10%)hsl(from hsl(var(--color-primary)) h s calc(l * 0.8)) (wrap origin in hsl() first)darken(), lighten(), transparentize()Why HSL: HSL format eliminates Sass dependencies, CSS color functions work natively in browsers, semantic naming clarifies purpose (not just value), theme changes update token values without touching components.
For complete implementation examples, see examples/core.md.
Use CSS Cascade Layers to control style precedence across the monorepo, ensuring UI package components have lower priority than app-specific overrides.
#### Layer Hierarchy (lowest -> highest priority)
@layer reset - Browser resets and normalizations@layer components - Design system component styles (UI package)#### Key Rules
@layer components {}layers.scss first to declare layer orderWhy layers: Wrapping in @layer components {} ensures app styles can override without specificity wars, loading order becomes irrelevant, predictable precedence across monorepo.
For complete implementation examples, see examples/core.md.
.dark Class and MixinImplement dark mode by adding .dark class to root element, which overrides semantic tokens. Use mixin pattern for organization.
#### Key Principles
.dark class, never Tier 1 core tokensFor complete implementation examples, see examples/theming.md.
The following patterns are documented with full examples in the examples/ folder:
</patterns>
<red_flags>
For complete anti-patterns and red flags, see reference.md.
High Priority Issues:
@layer components {}darken(), lighten())@import instead of @use (deprecated in Dart Sass 1.80.0, removed in 3.0.0)/ for division instead of math.div() (deprecated)</red_flags>
<critical_reminders>
All code must follow project conventions in CLAUDE.md
(You MUST wrap ALL UI package component styles in `@layer components {}` for proper cascade precedence)
(You MUST use semantic tokens ONLY in components - NEVER use core tokens directly)
(You MUST use HSL format for colors with CSS color functions - NO Sass color functions like darken/lighten)
(You MUST use data-attributes for state styling - NOT className toggling)
(You MUST use `@use` for imports - `@import` is deprecated and will be removed in Dart Sass 3.0.0)
Failure to follow these rules will break theming, create cascade precedence issues, and violate design system conventions.
</critical_reminders>
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.