design-system — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited design-system (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
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.
You are in AUTONOMOUS MODE. Do NOT ask questions. Execute the full pipeline below without pausing for user input. Make reasonable decisions using sensible defaults.
PURPOSE: Extract, deduplicate, and formalize a design system from an existing codebase. Scan for hardcoded color values, typography, spacing, border-radius, shadows, and breakpoints. Consolidate into framework-appropriate tokens. Generate a component inventory and flag all hardcoded values that should reference tokens instead.
INPUT: $ARGUMENTS
The user may specify:
If no arguments, scan the entire project and auto-detect the best token format.
============================================================ PHASE 1 -- FRAMEWORK DETECTION ============================================================
Detect the frontend framework and determine the appropriate token format:
| Indicator | Framework | Token Format |
|---|---|---|
| pubspec.yaml | Flutter | ThemeData + ThemeExtension |
| next.config.* or package.json with "next" | Next.js | CSS custom properties or Tailwind config |
| package.json with "react" (no next) | React | CSS custom properties or Tailwind config |
| package.json with "vue" | Vue | CSS custom properties or Tailwind config |
| package.json with "angular" | Angular | SCSS variables + CSS custom properties |
| package.json with "svelte" | Svelte | CSS custom properties or Tailwind config |
| tailwind.config.* | Any + Tailwind | Tailwind config (theme.extend) |
| *.module.css or styled-components | CSS Modules / CSS-in-JS | CSS custom properties |
If Tailwind is detected, tokens go into tailwind.config.* under theme.extend. If Flutter is detected, tokens go into a ThemeData file and optional ThemeExtension classes. Otherwise, tokens go into CSS custom properties in a root stylesheet.
Record: FRAMEWORK, TOKEN_FORMAT, SRC_DIR, STYLE_DIR
============================================================ PHASE 2 -- EXTRACTION SCAN ============================================================
Scan the entire source tree for raw design values. Record every occurrence with file path, line number, and the value found.
Step 2.1 -- Colors
Search for hardcoded color values:
#fff, #ffffff, #RRGGBB, #RRGGBBAArgb(, rgba(hsl(, hsla(Color(0x, Colors., Color.fromRGBO, Color.fromARGBbg-[#, text-[#, border-[#For each color found, record:
Step 2.2 -- Typography
Search for hardcoded typography values:
font-size, fontSize, TextStyle(fontSize:font-weight, fontWeight, FontWeight.font-family, fontFamilyline-height, lineHeight, height: (in TextStyle)letter-spacing, letterSpacingFor each typography value, record:
Step 2.3 -- Spacing
Search for hardcoded spacing values:
padding, margin, gap, space-x-, space-y-EdgeInsets., SizedBox(width:, SizedBox(height:Step 2.4 -- Border Radius
Search for radius values:
border-radius, borderRadius, BorderRadius.circular(rounded-, rounded-[Step 2.5 -- Shadows and Elevation
Search for shadow definitions:
box-shadow, boxShadow, BoxShadow(elevation:, shadow-, drop-shadowStep 2.6 -- Breakpoints
Search for responsive breakpoint values:
@media (min-width:, @media (max-width:MediaQuery.of(, LayoutBuildersm:, md:, lg:, xl: usage patterns============================================================ PHASE 3 -- DEDUPLICATION AND TOKENIZATION ============================================================
Step 3.1 -- Color Palette
Group extracted colors by visual similarity (within 10% hue/lightness):
RGB channel, propose consolidating to one token.
--color-primary-500, --color-neutral-100, --color-errorcolorScheme.primary, AppColors.neutral100Produce a color palette table:
| Token Name | Hex Value | Used In (count) | Replaces |
|---|
Step 3.2 -- Typography Scale
Group extracted typography into a type scale:
Produce a typography scale table:
| Token Name | Size | Weight | Line Height | Letter Spacing | Used In |
|---|
Step 3.3 -- Spacing Scale
Derive the spacing scale:
Step 3.4 -- Radius Scale
Derive the border-radius scale:
Step 3.5 -- Shadow Scale
Derive the shadow/elevation scale:
============================================================ PHASE 4 -- TOKEN FILE GENERATION ============================================================
Generate the token files based on FRAMEWORK and TOKEN_FORMAT:
CSS Custom Properties (React, Next.js, Vue, Svelte without Tailwind): Create src/styles/tokens.css (or project-appropriate path):
:root {
/* Colors */
--color-primary-500: #value;
/* Typography */
--font-size-body: 16px;
/* Spacing */
--space-sm: 8px;
/* Radius */
--radius-md: 8px;
/* Shadows */
--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}Tailwind Config (projects with Tailwind): Update tailwind.config.* theme.extend with extracted tokens.
Flutter ThemeData (Flutter projects): Create or update lib/config/theme.dart and optional lib/config/colors.dart, lib/config/spacing.dart, lib/config/typography.dart:
AppColors class with static const Color valuesAppSpacing class with static const double valuesAppRadius class with static const BorderRadius valuesThemeData with ColorScheme.fromSeed or manual ColorSchemeTextTheme with all scale entriesSCSS Variables (Angular): Create src/styles/_tokens.scss with variables and maps.
Commit: "feat(design): generate design system tokens from codebase extraction"
============================================================ PHASE 5 -- COMPONENT INVENTORY ============================================================
Catalog every reusable UI component in the codebase:
| Component | File | Props/Params | Uses Tokens | Hardcoded Values |
|---|---|---|---|---|
| Button | src/... | variant, size | partial | color, padding |
| Card | src/... | elevation | yes | none |
For each component, note:
Flag components that are duplicated or near-duplicated across the codebase -- these should be extracted into the shared component library.
============================================================ PHASE 6 -- HARDCODED VALUE REMEDIATION ============================================================
Replace all hardcoded values with token references:
color: #3b82f6 -> color: var(--color-primary-500)bg-[#3b82f6] -> bg-primary-500Color(0xFF3B82F6) -> AppColors.primary or colorScheme.primaryfont-size: 16px -> font-size: $font-size-bodyfor third-party logos). Note these as exceptions.
Commit per batch of related changes:
============================================================ PHASE 7 -- VERIFICATION ============================================================
Step 7.1 -- Static Analysis
Run the appropriate linter/analyzer:
flutter analyze -- fix all errors and warningstsc --noEmit -- fix type errorsStep 7.2 -- Token Coverage Audit
Re-scan the codebase for any remaining hardcoded values that were missed. Report coverage:
============================================================ SELF-HEALING VALIDATION (max 3 iterations) ============================================================
After completing fixes, re-validate:
STOP when:
IF STILL FAILING after 3 iterations:
============================================================ OUTPUT ============================================================
## Design System Extraction Complete
### Framework: [detected]
### Token Format: [CSS vars / Tailwind / Flutter ThemeData / SCSS]
### Token Files Generated
| File | Contents |
|------|----------|
| [path] | [description] |
### Token Summary
| Category | Tokens Defined | Hardcoded Values Found | Values Replaced | Coverage |
|----------|---------------|----------------------|-----------------|----------|
| Colors | N | N | N | N% |
| Typography | N | N | N | N% |
| Spacing | N | N | N | N% |
| Border Radius | N | N | N | N% |
| Shadows | N | N | N | N% |
| Breakpoints | N | N | N | N% |
### Component Inventory
| Component | Token Coverage | Needs Refactor |
|-----------|--------------|----------------|
| [name] | full / partial / none | yes / no |
### Remaining Hardcoded Values
[List any values intentionally left hardcoded with rationale]============================================================ NEXT STEPS ============================================================
After design system extraction:
/ux to audit overall UX quality and accessibility."/dark-mode to generate a dark theme from the extracted token palette."/responsive to audit responsive behavior across breakpoints."/i18n to extract hardcoded strings alongside design tokens."============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /design-system — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
============================================================ DO NOT ============================================================
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.