What problem does it solve?
Projects often lack consistent, automated formatting and linting on file save, causing style drift, avoidable CI failures, and developer inefficiency; this Skill detects tools and config files and generates hooks to enforce formatting and linting automatically.
Core Features & Use Cases
- Automatic detection: Scans project root for package.json, pyproject.toml, Cargo.toml, go.mod, Gemfile, and composer.json to determine language and tooling.
- Smart hook generation: Chooses formatter-first then linter, prefers tools with automatic fix/write flags, and generates either inline commands or an external script based on complexity.
- Safe application: Merges or updates .claude/settings.json without overwriting unrelated settings, creates .claude/hooks scripts when needed, and sets executable permissions.
- Use case: For a Node.js repo with Prettier and ESLint, generate a format-and-lint hook that runs Prettier --write then ESLint --fix on edited files.
Quick Start
Run the setup-linter-hooks skill to detect project linters and generate or merge .claude hook configurations and an executable formatter-and-linter script that runs on file edits.