Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Stylelint

$ stylelint Community Low Risk
Stylelint · Code & DevOps · MIT · macos / linux / windows

Standard stylesheet linter for CSS, SCSS, Less, and PostCSS syntax catching invalid properties, specificity traps, and style inconsistencies. Provides machine-readable --formatter json, --no-color, and --fix auto-remediation.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
npm install -D stylelint
CLI vs MCP Decision CLI Only

Lints and fixes local CSS/SCSS files directly in the repository workspace.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Supports --formatter json, --no-color, --quiet, --allow-empty-input, and deterministic exit codes.

  • --formatter json writes clean JSON diagnostics
  • --allow-empty-input prevents spurious failures when globs match zero files
Trust & Safety 22 / 25

Read-only by default; modifies files only when --fix is explicitly passed (no --fix-dry-run flag).

  • Non-destructive default lint mode; lacks --fix-dry-run
Setup & Portability 13 / 15

Cross-platform npm package requiring Node.js and project config (.stylelintrc.* or stylelint.config.*).

  • Runs everywhere Node.js is installed
Utility & Efficiency 12 / 15

Standard CSS/SCSS linter with PostCSS plugin ecosystem; pairs cleanly with Prettier.

  • Supports CSS, SCSS, and custom PostCSS syntaxes
Maintenance & Lineage 8 / 10

Long-standing community project (stylelint/stylelint) under MIT license.

  • Active stylelint/stylelint repository
Docs & Verifiability 8 / 10

Clear CLI reference and rule catalog at stylelint.io.

  • Official CLI docs at stylelint.io/user-guide/usage/cli/

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Purely local stylesheet linter; no credentials stored or required.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source npm package; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Stylelint (stylelint) Agent Rules
- Always pass `--formatter json --no-color` when reading stylesheet diagnostics.
- Run read-only lint before `--fix` and quote glob arguments so Stylelint expands them reliably.

Agent-Ready Command Recipes

Safe Read-Only Queries

Lint stylesheets with JSON diagnostics
npx stylelint "src/**/*.{css,scss}" --formatter json --no-color

Emits per-file JSON warning arrays and exits non-zero on errors without editing files.

Controlled Writes & Previews

Apply safe Stylelint auto-fixes
npx stylelint "src/**/*.{css,scss}" --fix --no-color

Applies fixable stylesheet rules in place using the project's .stylelintrc config.

Strengths for Agents

  • + --formatter json --no-color produces clean structured error objects per file.
  • + --allow-empty-input avoids brittle failures on PRs without CSS changes.

Caveats & Pitfalls

  • ! Lacks a --fix-dry-run option like ESLint (use git diff after --fix).
  • ! Requires a Stylelint config file in the project unless --config is passed.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI