Tailwind Config Validator

v1.0.0

Validate JSON-exported Tailwind CSS configuration files for structural issues, content path problems, theme misconfiguration, and best practices. Use when au...

0· 18·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for charlie-morrison/tailwind-config-validator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Tailwind Config Validator" (charlie-morrison/tailwind-config-validator) from ClawHub.
Skill page: https://clawhub.ai/charlie-morrison/tailwind-config-validator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install charlie-morrison/tailwind-config-validator

ClawHub CLI

Package manager switcher

npx clawhub@latest install tailwind-config-validator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description match the provided code and instructions. The tool only needs a JSON-exported Tailwind config and the included Python validator operates on that JSON; there are no unrelated environment variables, credentials, or binaries declared.
Instruction Scope
SKILL.md tells the user to run node -e "console.log(JSON.stringify(require('./tailwind.config.js')))" which will execute the project's tailwind.config.js to produce JSON. Executing project JS is required to export the config but can run arbitrary code in that file — the validator itself appears to only read local JSON and perform static checks. Recommend only exporting configs from trusted repositories or running the node export in an isolated environment.
Install Mechanism
No install spec (instruction-only with an included script). No downloads or external package installs are requested; the SKILL.md and script state pure Python stdlib usage.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The declared requirements are proportional to a local static validator.
Persistence & Privilege
Skill is not always-enabled and uses normal model invocation settings. It does not request system-wide configuration or persistent privileges.
Assessment
This skill appears to be a straightforward local validator for JSON-exported Tailwind configs and does not require credentials or external installs. Before running it: (1) Inspect the included script (scripts/tailwind_config_validator.py) yourself to confirm it matches expectations — it appears to use only Python stdlib and local file reads. (2) Be careful when running the suggested node command to export the config: require('./tailwind.config.js') will execute that JS/TS file, which may contain arbitrary code from the project. Only run the node export on code you trust or run it inside a sandbox/container. (3) If you want extra assurance, run node -e on a copy of the config file or convert the config to JSON by hand, then run the validator. If you want me to, I can scan the full Python script for network/socket/subprocess usage or search for os.environ accesses and report back.

Like a lobster shell, security has layers — review code before you run it.

latestvk97cab8vs9zf5e44ncqs6wekq985ezcc
18downloads
0stars
1versions
Updated 3h ago
v1.0.0
MIT-0

Tailwind Config Validator

Validate Tailwind CSS configuration files exported as JSON for structural correctness, content path issues, theme misconfiguration, dark mode problems, plugin hygiene, and best practices. Pure Python 3 stdlib — no external dependencies.

Note: Tailwind configs are JS/TS, not directly parseable. This validator works with JSON-exported configs. Export via:

node -e "console.log(JSON.stringify(require('./tailwind.config.js')))" > config.json
python3 scripts/tailwind_config_validator.py validate config.json

Commands

validate — Full validation with all rules

python3 scripts/tailwind_config_validator.py validate config.json
python3 scripts/tailwind_config_validator.py validate config.json --strict
python3 scripts/tailwind_config_validator.py validate config.json --format json

lint — Run all rules (alias for validate)

python3 scripts/tailwind_config_validator.py lint config.json
python3 scripts/tailwind_config_validator.py lint config.json --format summary
python3 scripts/tailwind_config_validator.py lint config.json --strict --format json

content — Check content configuration

python3 scripts/tailwind_config_validator.py content config.json
python3 scripts/tailwind_config_validator.py content config.json --format json
python3 scripts/tailwind_config_validator.py content config.json --format summary

theme — Check theme configuration

python3 scripts/tailwind_config_validator.py theme config.json
python3 scripts/tailwind_config_validator.py theme config.json --format json
python3 scripts/tailwind_config_validator.py theme config.json --format summary

Flags

FlagDescription
--strictTreat warnings as errors — exit code 1 (CI-friendly)
--format textHuman-readable output (default)
--format jsonMachine-readable JSON
--format summaryCompact summary with counts

Validation Rules (26)

Structure (5)

RuleSeverityDescription
S1errorFile not found or unreadable
S2errorEmpty config file
S3errorInvalid JSON syntax
S4warning/infoUnknown top-level keys (valid: content, theme, plugins, presets, darkMode, prefix, important, separator, corePlugins, safelist, blocklist, future, experimental)
S5infoJS/TS config detected (hint to export as JSON)

Content (5)

RuleSeverityDescription
C1errorMissing content paths (required for tree-shaking)
C2warningEmpty content array
C3warningContent paths include node_modules (performance)
C4warningContent glob too broad (e.g. **/* without extension filter)
C5infoSuspicious content pattern (bare *.css or similar)

Theme (5)

RuleSeverityDescription
T1warningOverriding entire theme key without extend (replaces defaults)
T2infoEmpty theme.extend object
T3warningInvalid color values (not strings)
T4infoReferencing default theme without callback (theme() needed)
T5warningCustom screen breakpoints not in ascending order

Dark Mode (2)

RuleSeverityDescription
D1errorInvalid darkMode value
D2infodarkMode "class" deprecated in v3.4+ (use "selector")

Plugins (3)

RuleSeverityDescription
P1infoEmpty plugins array
P2errorPlugins not an array
P3infoDeprecated official plugins (built-in in v4)

Best Practices (6)

RuleSeverityDescription
B1errorNo content paths defined (tree-shaking broken)
B2warningUsing important: true globally (anti-pattern)
B3warningPrefix with special characters
B4warningcorePlugins disabled entirely
B5warningLarge safelist (>50 patterns, bloats CSS)
B6warningMissing theme.extend (all customizations override defaults)

Exit Codes

CodeMeaning
0No errors (warnings allowed unless --strict)
1Errors found (or warnings in --strict mode)
2File not found / parse error

CI Integration

# GitHub Actions example
- name: Validate Tailwind config
  run: |
    node -e "console.log(JSON.stringify(require('./tailwind.config.js')))" > /tmp/tw-config.json
    python3 scripts/tailwind_config_validator.py validate /tmp/tw-config.json --strict --format json

Example Output

tailwind.config validate — config.json
=======================================
[ERROR  ] C1: Missing 'content' paths — required for tree-shaking
         Without content paths, Tailwind cannot purge unused CSS. Add content: ['./src/**/*.{html,js,ts,jsx,tsx}'].
[WARNING] T1: theme.colors overrides all default colors — use theme.extend.colors instead
         Placing keys directly under 'theme' replaces the entire default set. Move to 'theme.extend' to merge with defaults.
[WARNING] B2: important: true applies !important to all utilities (anti-pattern)
         Prefer important: '#app' to scope specificity to a root selector instead of global !important.
[INFO   ] P3: Plugin '@tailwindcss/forms' is built-in since Tailwind v4
         In Tailwind v4, @tailwindcss/forms functionality is included by default. Remove the plugin if upgrading.
[INFO   ] D2: darkMode 'class' is deprecated since v3.4 — use 'selector' instead
         The 'class' strategy still works but 'selector' is the recommended replacement.

Result: INVALID
Summary: 1 error(s), 2 warning(s), 2 info

Comments

Loading comments...