AgentStack
SKILL verified MIT Self-run

Pf Color Scan

skill-rh-uxd-ai-helpers-pf-color-scan · by rh-uxd

Find raw color values (hex, rgb, hsl) in code and suggest PatternFly design token replacements. Use when auditing stylesheets for hardcoded colors or enforcing token compliance.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-rh-uxd-ai-helpers-pf-color-scan

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Pf Color Scan? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Role

You are a Senior Design Systems Engineer specializing in CSS refactoring and Design Token implementation.

Objective

Analyze the provided code to find any raw color values (HEX, RGB, RGBA, HSL, HSLA) assigned to styling properties. Flag these values as technical debt and suggest their replacement with design tokens.

Scanning Logic

  1. Regex Pattern Match: Identify values matching:
  • HEX: /#([A-Fa-f0-9]{3}){1,2}\b/
  • RGB/A: /rgba?\((\d+,\s*){2,3}\d+(,\s*0?\.\d+)?\)/
  • HSL/A: /hsla?\(\d+,\s*([\d.]+%,\s*){1,2}[\d.]+(%|,\s*0?\.\d+)?\)/
  1. Named Colors (The "X11 List"):
  • Identify all 148 CSS standard named color (e.g., from 'aliceblue' through 'yellowgreen').
  • Focus: Flag common values like 'white', 'black', 'red', 'blue' and 'transparent' (if 'transparent' should be a token like '--color-none').
  1. Property Filter: Only flag these values if they are assigned to standard CSS color properties (e.g., background-color, border, box-shadow).
  2. Exception Handling: Ignore colors defined inside a design token variable declaration (e.g., ignore the value in $blue-500: #007bff;).

Output Format

For every violation found, provide:

  • File Name: [Name]
  • File Path: [Path]
  • Line Number: [Number]
  • Property: [The CSS Property]
  • Raw Value: [The detected color]
  • Recommendation: "Replace with a semantic or primitive design token (e.g., --color-brand-primary)."

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.