auto-lint #
Run language-specific linters after Claude Code writes or edits a file.
Lint errors are prefixed with [auto-lint] <tool>: and surfaced to Claude,
which can then fix the issues in the next turn.
All linters are optional. If a tool is not in PATH, the file is left unchecked for that language.
Files under ~/.claude/plans/ are skipped: plan documents are scratch
markdown and do not need lint noise.
Required tools #
jq (parses hook input JSON).
Supported linters #
| Extension | Tool | Nixpkgs | Notes |
|---|---|---|---|
.go |
go vet |
go |
per-package |
.go |
goimports -l |
gotools |
reports files needing import changes |
.go |
golangci-lint run |
golangci-lint |
only if .golangci.yml/.yaml/.toml found |
.md |
markdownlint-cli2 |
markdownlint-cli2 |
per-file |
.nix |
deadnix |
deadnix |
per-file |
.nix |
statix check |
statix |
per-file |
.py |
ruff check |
ruff |
per-file; falls back to flake8 (python3Packages.flake8) |
.rb |
bundle exec srb tc |
via Gemfile | only if Gemfile.lock contains sorbet-static |
.rb |
standardrb |
rubyPackages.standard |
per-file; falls back to rubocop (rubocop) |
.rs |
cargo clippy |
cargo |
walks up to find Cargo.toml |
.sh, .bash |
shellcheck |
shellcheck |
per-file |
.toml |
taplo check |
taplo |
per-file |
.ts, .tsx, .js, .jsx |
eslint |
eslint |
per-file |
.yaml, .yml |
yamllint |
yamllint |
per-file |
Dockerfile* |
hadolint |
hadolint |
per-file |
Project-specific configuration #
Create .auto-tools.json at the root of your project to override the built-in linter for a file extension, or to disable linting for a language:
{
"lint": {
".rs": "cargo clippy --manifest-path $(dirname {})./../Cargo.toml",
".rb": null
}
}
{}in the command is replaced with the absolute path to the edited file.nulldisables linting for that extension.- An absent key falls through to the built-in default.
auto-tools discovers .auto-tools.json by walking up from the edited file's directory to the filesystem root. The innermost config file wins.
Trust model:
.auto-tools.jsonis executed as code. Review it before using this plugin in untrusted repositories.
Installation #
/plugin install auto-lint@jcmuller-plugins