Stylelint

From managedcode/dotnet-skills · View interactive version

Stylelint is an AI agent skill from the GitHub repository managedcode/dotnet-skills. Use Stylelint in .NET repositories that ship CSS, SCSS, or other stylesheet assets alongside web frontends. USE FOR: stylelint.config.*, .stylelintrc*, CSS or SCSS assets; CSS linting; duplicate style cleanup and naming-convention checks. DO NOT USE FOR: JavaScript or TypeScript lint ownership; runt

How to use this skill

Skill file

Stylelint for Stylesheets in .NET Repositories

Trigger On

Do Not Use For

Inputs

Workflow

  1. Confirm what Stylelint should own:
  1. Prefer repo-local installation and checked-in config.
  2. Start from a known shared config such as stylelint-config-standard, then add syntax-specific packages only when the repo truly needs them.
  3. Add repeatable scripts to package.json, for example:
  1. Keep ignore patterns explicit so build output, vendored assets, and generated CSS do not pollute the signal.
  2. Treat autofix as controlled cleanup:
  1. Use Stylelint for semantic CSS and selector policy, not as a replacement for site-level audits.

Bootstrap When Missing

  1. Detect current state:
  1. Prefer a repo-local install:
  1. Add syntax packages only when the repo needs them for SCSS or embedded styles.
  2. Create or refine stylelint.config.js, stylelint.config.mjs, or the existing config format.
  3. Add repeatable commands to AGENTS.md and package.json, then verify with:
  1. Return status: configured if Stylelint is now wired and repeatable, or status: improved if the existing baseline was tightened.
  2. Return status: not_applicable only when another documented tool already owns stylesheet linting and migration is not requested.

Handle Failures

Current 17.14 Guidance

Official Sources

Deliver

Validate

Ralph Loop

  1. Plan: analyze current state, target outcome, constraints, and risks.
  2. Execute one step and produce a concrete delta.
  3. Review the result and capture findings.
  4. Apply fixes in small batches and rerun checks.
  5. Update the plan after each iteration.
  6. Repeat until outcomes are acceptable.
  7. If a dependency is missing, bootstrap it or return status: not_applicable with a reason.

Required Result Format

Example Requests

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.