Skip to content

feat(skill): add raw colors scan skill#20

Open
jcmill wants to merge 1 commit intomainfrom
feat/raw-colors-scan
Open

feat(skill): add raw colors scan skill#20
jcmill wants to merge 1 commit intomainfrom
feat/raw-colors-scan

Conversation

@jcmill
Copy link

@jcmill jcmill commented Mar 18, 2026

What changed
New file: plugins/pf-react/skills/raw-colors-scan/SKILL.md
A Cursor/Agent Skill that scans code for raw color usage and recommends design tokens.

What the skill does
Role: Senior Design Systems Engineer focused on CSS refactoring and design token usage.
Goal: Find raw color values (HEX, RGB/RGBA, HSL/HSLA, and named colors like white, black, red, blue, transparent) used for styling, treat them as technical debt, and suggest replacing them with design tokens.

Scanning rules
Regex matching for HEX, RGB/RGBA, and HSL/HSLA.
Named colors: Flags the 148 CSS named colors, with emphasis on common ones (e.g. white, black, red, blue, transparent).
Property scope: Only considers values on real color-related properties (e.g. background-color, border, box-shadow).
Exceptions: Ignores colors that appear inside design token variable definitions (e.g. $blue-500: #007bff;).
Output

For each finding it reports: File name, File path, Line number, Property, Raw value, and a Recommendation to use a semantic or primitive design token (e.g. --color-brand-primary).

@jcmill jcmill changed the title feat()add raw colors scan skill feat(SKILL): add raw colors scan skill Mar 18, 2026
@jcmill jcmill changed the title feat(SKILL): add raw colors scan skill feat(skill): add raw colors scan skill Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant