You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Scan LESS stylesheets for variable errors — undefined variables, CSS custom properties passed to compile-time functions (fade, darken, lighten, etc.), and incorrect variable name patterns. Reports issues with file, line, and fix.
4
+
argument-hint: "[file-or-directory]"
5
+
---
6
+
7
+
Audit LESS stylesheets in ServerKit for recurring build-breaking patterns.
8
+
Scope: **${ARGUMENTS:-frontend/src/styles/}**
9
+
10
+
## What to Scan For
11
+
12
+
### Pattern 1: CSS custom properties in LESS compile-time functions
13
+
14
+
LESS functions like `fade()`, `darken()`, `lighten()`, `saturate()`, `spin()`, `mix()` require **real color values** at compile time. Variables defined as `var(--something)` will fail.
15
+
16
+
Search for calls to these functions and check if any argument is a variable that resolves to a CSS custom property.
17
+
18
+
**Broken** — these variables use `var(--...)` and cannot be evaluated by LESS:
**Fix**: Use the corresponding `*-raw` variant instead (e.g., `@bg-hover` → `@bg-hover-raw`, `@text-tertiary` → `@text-tertiary-raw`, `@accent-primary` → `@accent-primary-raw`).
27
+
28
+
### Pattern 2: Undefined or misspelled variables
29
+
30
+
Check for variables that don't exist in `_variables.less`. Common mistakes:
31
+
-`@card-bg` → should be `@bg-card`
32
+
-`@accent-success` → should be `@success`
33
+
-`@accent-danger` → should be `@danger`
34
+
-`@accent-info` → should be `@info`
35
+
-`@accent-warning` → should be `@warning`
36
+
-`@primary-color` → should be `@accent-primary` or `@accent-primary-raw`
37
+
-`@spacing-*` → should be `@space-*`
38
+
39
+
### Pattern 3: Non-raw variables in theme-sensitive contexts
40
+
41
+
For any LESS function that manipulates color values (fade, darken, lighten, contrast, saturate, desaturate, spin, mix, tint, shade), the argument MUST be a raw hex/rgb value or a `*-raw` variable.
42
+
43
+
## Reference: Valid Variable Names
44
+
45
+
Read `frontend/src/styles/_variables.less` to get the authoritative list of defined variables. Any `@variable` used in a `.less` file that is not in `_variables.less` (and is not a local variable or LESS built-in) is a bug.
46
+
47
+
## Output Format
48
+
49
+
For each issue found, report:
50
+
```
51
+
[FILE]:[LINE] — [ISSUE]
52
+
Found: [problematic code]
53
+
Fix: [corrected code]
54
+
```
55
+
56
+
At the end, provide a summary count: `X issues found across Y files`.
57
+
If no issues are found, report: `No LESS variable issues found.`
Copy file name to clipboardExpand all lines: .claude/skills/create-pr/SKILL.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,13 @@ Omit the Highlights section entirely for internal-only PRs — don't force it.
103
103
- Bullets should describe the mechanism, not just the intent. "Race condition in `get_or_create_chat` fixed by moving creation inside the lookup session" is good. "Fix database issues" is not.
104
104
- Group related changes together (all typing fixes, all security hardening, all API changes, etc.)
105
105
106
+
#### Contributors
107
+
- If the PR includes commits from multiple authors (not just the repo owner), add a **Contributors** section after the summary and before Highlights.
108
+
- Use `git log main..HEAD --format='%aN <%aE>' | sort -u` to find unique commit authors.
- Format: `@username` if their GitHub handle is available (check the ARGUMENTS or commit metadata), otherwise use their name. Add a brief note about what they contributed if it's clear from the commits.
111
+
- Keep it short — one line per contributor, no need for a full changelog.
112
+
106
113
#### General
107
114
-**No test plan section.** Do not include "Test plan" or "Testing".
108
115
-**No mention of tests.** Do not reference test files, test results, or testing.
0 commit comments