PostCSS Config Validator

v1.0.0

Validate PostCSS config files (.postcssrc, postcss.config.js, package.json#postcss) for plugin ordering, deprecated plugins, Tailwind integration, and best p...

0· 13·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (PostCSS config validation) match the included code and SKILL.md. The script parses JSON configs, inspects plugin lists and ordering, and reports findings consistent with the stated ruleset.
Instruction Scope
Runtime instructions tell the agent to run the bundled Python script against local PostCSS config files. The script reads files from the working directory (config files and package.json), which is appropriate and expected for this purpose. It does not instruct the agent to read unrelated system paths or transmit data externally.
Install Mechanism
No install spec; this is instruction-only with a bundled script. Execution requires Python 3.8+ and no external packages (script claims to use only the stdlib). No downloads or archive extraction are used.
Credentials
The skill requires no environment variables, credentials, or config paths beyond local project files. This is proportional to a linter that analyzes local PostCSS configs.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modify other skills. It runs on demand and does not declare autonomous elevation.
Assessment
This skill appears to be a straightforward, local PostCSS config linter. It will read files in the project directory (e.g., .postcssrc, postcss.config.js, package.json) to produce warnings/errors; that is expected behavior. Before running: ensure you're comfortable the agent can read the project files you point it at. The script claims no network activity or credentials; if you need extra assurance, inspect the full bundled Python file for any hidden I/O or network calls (the visible portions use only local file I/O and stdlib). Requires Python 3.8+ to run. If you only want static analysis and not to execute arbitrary scripts, consider running the included Python file locally in a sandbox or review the remaining parts of the script yourself prior to use.

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

latestvk970ehk70m0ndtmeq4wn3kar7n85bems
13downloads
0stars
1versions
Updated 4h ago
v1.0.0
MIT-0

PostCSS Config Validator

Validate .postcssrc, .postcssrc.json, postcss.config.js, postcss.config.ts, and package.json#postcss for deprecated plugins, ordering issues, Tailwind integration problems, parser misconfiguration, and best practices. JS/TS configs are detected but cannot be statically validated. Supports text, JSON, and summary output formats with CI-friendly exit codes.

Commands

# Full validation (all 22+ rules)
python3 scripts/postcss_config_validator.py validate .postcssrc

# Quick structure-only check
python3 scripts/postcss_config_validator.py check .postcssrc.json

# Explain config in human-readable form
python3 scripts/postcss_config_validator.py explain package.json

# Suggest improvements
python3 scripts/postcss_config_validator.py suggest .postcssrc

# JSON output (CI-friendly)
python3 scripts/postcss_config_validator.py validate .postcssrc --format json

# Summary only (pass/fail + counts)
python3 scripts/postcss_config_validator.py validate .postcssrc --format summary

# Strict mode (warnings and infos become errors)
python3 scripts/postcss_config_validator.py validate .postcssrc --strict

Rules (22+)

#IDCategorySeverityRule
1S1StructureErrorFile not found or unreadable
2S2StructureErrorEmpty config file
3S3StructureErrorInvalid JSON syntax
4S4StructureWarningUnknown top-level keys (valid: plugins, parser, syntax, stringifier, map, from, to)
5S5StructureInfoJS/TS config detected — cannot statically validate
6P1PluginsWarningEmpty plugins object/array
7P2PluginsWarningDeprecated plugin (autoprefixer-core, postcss-cssnext, lost, postcss-sprites)
8P3PluginsWarningDuplicate plugins
9P4PluginsInfoPlugin ordering issues (autoprefixer after preset-env, cssnano last)
10P5PluginsInfopostcss-import should be first plugin
11P6PluginsInfoUnknown/uncommon plugin name (not in top 50 list)
12T1TailwindInfotailwindcss without nesting plugin
13T2TailwindWarningtailwindcss after autoprefixer (wrong order)
14T3TailwindInfopostcss-preset-env with tailwindcss (potential conflict)
15X1Syntax/ParserWarningBoth parser and syntax specified
16X2Syntax/ParserInfoUnknown parser value
17X3Syntax/ParserInfoParser set but no matching preprocessor plugin
18M1Source MapsInfoSource maps disabled (map: false)
19M2Source MapsInfoInline source maps enabled (map.inline: true)
20B1Best PracticesWarningNo plugins configured
21B2Best PracticesInfoUsing postcss-preset-env AND individual feature plugins it includes
22B3Best PracticesInfoVery large number of plugins (>15)

Output Formats

  • text (default): Human-readable with severity icons
  • json: Machine-parseable JSON with findings array and summary
  • summary: Pass/fail with error/warning/info counts

Exit Codes

  • 0: No errors (warnings/infos only or clean)
  • 1: One or more errors found
  • 2: File not found or invalid input

Requirements

  • Python 3.8+
  • No external dependencies (pure stdlib)

Comments

Loading comments...