home / skills / ehtbanton / claudeskillsrepo / stylelint-config-generator

stylelint-config-generator skill

/stylelint-config-generator

This skill generates a complete Stylelint configuration for CSS/SCSS linting, producing valid .stylelintrc.js or stylelint.config.js.

npx playbooks add skill ehtbanton/claudeskillsrepo --skill stylelint-config-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
752 B
---
name: stylelint-config-generator
description: Generate Stylelint configuration files for CSS/SCSS linting and formatting. Triggers on "create stylelint config", "generate css linting", "stylelint setup", "css lint rules".
---

# Stylelint Config Generator

Generate Stylelint configuration files for CSS/SCSS code quality.

## Output Requirements

**File Output:** `.stylelintrc.js` or `stylelint.config.js`
**Format:** Valid Stylelint configuration
**Standards:** Stylelint 16.x

## When Invoked

Immediately generate a complete Stylelint configuration with appropriate rules for CSS/SCSS.

## Example Invocations

**Prompt:** "Create stylelint config for Tailwind CSS project"
**Output:** Complete `.stylelintrc.js` with Tailwind and SCSS rules.

Overview

This skill generates complete Stylelint configuration files for CSS and SCSS projects, producing ready-to-use .stylelintrc.js or stylelint.config.js outputs. It targets Stylelint 16.x and includes recommended rulesets and integrations like Tailwind or SCSS where requested. The result is a valid, lint-ready configuration you can drop into a project to enforce consistent styling and catch common errors.

How this skill works

When triggered, the skill composes a full JavaScript-style Stylelint config with appropriate extends, plugins, and rule sets. It selects presets and rule customizations based on the prompt (plain CSS, SCSS, Tailwind integration, formatting preferences). The output is formatted as a single config file (.stylelintrc.js or stylelint.config.js) that adheres to Stylelint 16.x schema.

When to use it

  • Setting up linting for a new CSS or SCSS project
  • Adding Stylelint to an existing project that needs consistent rules
  • Creating a config optimized for Tailwind CSS utility classes
  • Generating a base config that integrates with formatters and CI
  • Quickly scaffolding Stylelint rules for a monorepo or library

Best practices

  • Choose .stylelintrc.js or stylelint.config.js to allow comments and programmatic logic
  • Include only the plugins you actually use (e.g., scss, tailwindcss) to keep performance optimal
  • Combine recommended presets with targeted overrides for your code style
  • Run stylelint --fix in CI or pre-commit hooks to auto-correct simple issues
  • Keep stylelint and plugin versions aligned with the config spec (Stylelint 16.x compatibility)

Example use cases

  • Create stylelint config for Tailwind CSS project that ignores utility class patterns and adds Tailwind plugin
  • Generate stylelint setup for a SCSS codebase using scss-specific rules and nesting allowances
  • Produce a minimal config for plain CSS that enforces best-practice rules and formatting
  • Scaffold a stricter config for a design system with declaration-order and selector specificity rules
  • Create a config that integrates with Prettier and auto-fix workflow

FAQ

Which file formats are generated?

The skill outputs .stylelintrc.js or stylelint.config.js as a JavaScript config file compatible with Stylelint 16.x.

Can it include Tailwind or SCSS rules?

Yes. Include those keywords in your prompt and the generated config will add the appropriate plugins, ignores, and rule adjustments.