home / skills / ehtbanton / claudeskillsrepo / lint-staged-config-generator
This skill generates a complete lint-staged configuration for staged files, enabling automated linting with ESLint, Prettier, and other tools.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill lint-staged-config-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: lint-staged-config-generator
description: Generate lint-staged configuration for running linters on staged Git files. Triggers on "create lint-staged config", "generate lint staged", "lint-staged setup", "staged file linting".
---
# Lint-Staged Config Generator
Generate lint-staged configuration for running linters only on staged Git files.
## Output Requirements
**File Output:** `.lintstagedrc.js`, `lint-staged.config.js`, or in `package.json`
**Format:** Valid lint-staged configuration
**Standards:** lint-staged 15.x
## When Invoked
Immediately generate a complete lint-staged configuration for the project's file types.
## Example Invocations
**Prompt:** "Create lint-staged config for TypeScript and CSS"
**Output:** Complete `.lintstagedrc.js` with ESLint, Prettier, and Stylelint.
This skill generates a ready-to-use lint-staged configuration for running linters and formatters on staged Git files. It emits .lintstagedrc.js, lint-staged.config.js, or a package.json section formatted for lint-staged 15.x. The goal is to produce a complete, valid configuration tailored to the project's file types and tooling.
When invoked with a target set of file types or tools, the skill builds rules that map globs to commands (ESLint, Prettier, Stylelint, etc.) and formats them to the requested output file. It respects lint-staged 15.x syntax and includes common optimizations like using --cache, batching, and running fix flags where appropriate. The generated config is ready to paste into the repo or written to the selected output file.
Which output formats are supported?
I can generate .lintstagedrc.js, lint-staged.config.js, or a package.json lint-staged section formatted for lint-staged 15.x.
What linters and formatters can I include?
Common choices are ESLint, Prettier, Stylelint, and TypeScript checks. Provide the tools you want and I will include appropriate commands and flags.
Will the config use best practices?
Yes. The generated config uses --fix where safe, enables caching for tools that support it, and uses batching to keep staged runs fast.