$npx -y skills add bitjaru/styleseed --skill ss-lintQuick automated lint — detects common design system violations in seconds
| 1 | # Design Lint (Quick Check) |
| 2 | |
| 3 | Read `PRODUCT-PRINCIPLES.md`, the selected output grammar, `ADAPTERS.md`, and `STYLESEED.md` |
| 4 | before classifying a match. Lint detects deterministic drift; it must not flag an exact |
| 5 | grammar/profile/adapter contract as a violation or let an arbitrary lock value create an |
| 6 | exception. |
| 7 | |
| 8 | ## When NOT to use |
| 9 | |
| 10 | - For deeper review of design judgment (composition, hierarchy, rhythm) → use `/ss-review` |
| 11 | - For accessibility specifically → use `/ss-a11y` |
| 12 | - For Nielsen UX heuristics → use `/ss-audit` |
| 13 | - For applying refactors — this only flags violations; use `/ss-review` to fix |
| 14 | |
| 15 | Target: **$ARGUMENTS** |
| 16 | |
| 17 | ## What This Does |
| 18 | |
| 19 | Fast, grep-based scan for common design violations. Runs in seconds (unlike /ss-review which is a deep manual audit). Run this after every file change. |
| 20 | |
| 21 | ## Checks |
| 22 | |
| 23 | ### 1. Hardcoded Colors |
| 24 | Search for hex colors in className strings that should be semantic tokens: |
| 25 | ```bash |
| 26 | grep -n '#[0-9a-fA-F]\{3,8\}' [file] | grep -v 'theme.css\|tokens\|\.json' |
| 27 | ``` |
| 28 | **Violation:** `text-[#3C3C3C]`, `bg-[#3182F6]` |
| 29 | **Fix:** `text-text-primary`, `bg-brand` |
| 30 | |
| 31 | ### 2. Raw Pixel Values in Tailwind |
| 32 | ```bash |
| 33 | grep -n 'p-\[.*px\]\|m-\[.*px\]\|gap-\[.*px\]' [file] |
| 34 | ``` |
| 35 | **Violation:** `p-[24px]`, `gap-[12px]` |
| 36 | **Fix:** `p-6`, `gap-3` |
| 37 | |
| 38 | ### 3. Old Width/Height Syntax |
| 39 | ```bash |
| 40 | grep -n 'w-[0-9] h-[0-9]\|w-\[.*\] h-\[' [file] |
| 41 | ``` |
| 42 | **Violation:** `w-4 h-4` |
| 43 | **Fix:** `size-4` |
| 44 | |
| 45 | ### 4. Physical Properties (LTR-only) |
| 46 | ```bash |
| 47 | grep -n ' ml-\| mr-\| pl-\| pr-' [file] |
| 48 | ``` |
| 49 | **Violation:** `ml-2`, `mr-4` |
| 50 | **Fix:** `ms-2`, `me-4` |
| 51 | |
| 52 | ### 5. Uncontracted Hard Black |
| 53 | ```bash |
| 54 | grep -n 'text-black\|bg-black\|#000000\|#000"' [file] |
| 55 | ``` |
| 56 | **Violation:** Pure black without an exact structural role in the selected grammar/profile |
| 57 | **Fix:** Use the semantic ink token, or cite the maintained contract that requires hard black |
| 58 | |
| 59 | ### 6. Missing data-slot |
| 60 | ```bash |
| 61 | grep -n 'function [A-Z]' [file] # find components |
| 62 | grep -n 'data-slot' [file] # check if present |
| 63 | ``` |
| 64 | **Violation:** Component without `data-slot` |
| 65 | **Fix:** Add `data-slot="component-name"` |
| 66 | |
| 67 | ### 7. Font Size CSS Variables (CRITICAL — Tailwind v4 conflict) |
| 68 | ```bash |
| 69 | grep -n 'text-\[var(--' [file] |
| 70 | grep -n '\-\-text-.*px\|--fs-.*px' [file] |
| 71 | ``` |
| 72 | **Violation:** `text-[var(--text-sm)]` or `--text-sm: 13px` in theme.css |
| 73 | **Fix:** Use explicit `text-[13px]`. CSS variable font sizes conflict with Tailwind v4's `--text-*` namespace — Tailwind reads them as color, not font-size. |
| 74 | |
| 75 | ### 8. className Without cn() |
| 76 | ```bash |
| 77 | grep -n 'className={`' [file] |
| 78 | ``` |
| 79 | **Violation:** Template literal className |
| 80 | **Fix:** Use `cn()` for all className composition |
| 81 | |
| 82 | ## Output Format |
| 83 | |
| 84 | ``` |
| 85 | 🔴 FAIL [file:line] Hardcoded hex: text-[#3C3C3C] → use text-text-primary |
| 86 | 🔴 FAIL [file:line] Raw px: p-[24px] → use p-6 |
| 87 | 🟡 WARN [file:line] Physical prop: ml-2 → use ms-2 |
| 88 | 🟡 WARN [file:line] Missing data-slot on MyComponent |
| 89 | 🟢 PASS No violations found |
| 90 | |
| 91 | Total: X errors, Y warnings |
| 92 | ``` |
| 93 | |
| 94 | If errors > 0, list specific fixes for each violation. |