/code-quality-plugin:code-lint [path] [--fix] [--format]from code-quality-plugin
Auto-detects and runs project linters/formatters (ruff, eslint, clippy, gofmt) with optional --fix and --format. Use before commits or to check formatting.
Ships in code-quality-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
| Use this skill when... | Use something else instead when... |
|---|---|
| Auto-detecting and running the correct linter for a polyglot repo | Detecting structural anti-patterns linters miss → code-antipatterns |
Running ruff/eslint/clippy/gofmt with optional --fix and --format | Reviewing broader code quality and architecture → code-review |
| Driving a one-shot lint pass before commit | Scanning specifically for swallowed errors → code-hidden-failures --track errors |
| Looking up autofix commands or common fix patterns per language | (use this skill — autofix reference is now here) |
find . -maxdepth 1 \( -name "package.json" -o -name "pyproject.toml" -o -name "setup.py" -o -name "requirements.txt" -o -name "Cargo.toml" -o -name "go.mod" \) -type ffind . -maxdepth 1 -name ".pre-commit-config.yaml" -type fParse $ARGUMENTS and bind three values before running anything. These are
supplied by the caller; nothing substitutes them for you.
Token in $ARGUMENTS | Binds | Default when absent |
|---|---|---|
| First non-flag token | PATH — the file or directory to lint | . (repo root) |
--fix | FIX — apply autofixes | off; check only |
--format | FORMAT — run formatters in write mode | off; formatters run in --check mode |
Every command in Step 2 is written with a literal PATH placeholder. Substitute
the bound value when you run it — e.g. with $ARGUMENTS empty, ruff check PATH
is run as ruff check ..
Run this lint pass:
PATH is given)When the caller passed no path (or passed .), the bundled detector already does
detection, tool discovery, and fixing in a single call:
bash "${CLAUDE_PLUGIN_ROOT}/skills/code-lint/scripts/detect-and-fix.sh"
bash "${CLAUDE_PLUGIN_ROOT}/skills/code-lint/scripts/detect-and-fix.sh" --check-only
Pass --check-only unless FIX is set. It detects biome, eslint, prettier,
ruff, black, clippy, rustfmt, gofmt, golangci-lint, and shellcheck, reports which
were found, and shows modified files. Report its output and stop.
Continue to Step 1 when the caller scoped the run to a specific PATH, or when
the detector reports no linters found.
Read the Package files line in Context (or ls the target directory)
and map each marker file to a language. The signals are the marker files — do
not guess from file extensions or the repo name.
| Marker file present in the repo root | Language |
|---|---|
pyproject.toml, setup.py, requirements.txt | Python |
package.json | JavaScript / TypeScript |
Cargo.toml | Rust |
go.mod | Go |
Run the Lint and Format commands for every detected language. Swap in the
--fix / --format variants only when the caller set those flags.
| Language | Lint (always) | Lint with --fix | Format check (default) | Format with --format |
|---|---|---|---|---|
| Python | uv run ruff check PATH --output-format=concise | uv run ruff check PATH --output-format=concise --fix | uv run ruff format --check PATH | uv run ruff format PATH |
| JavaScript / TypeScript | npx eslint PATH | npx eslint PATH --fix | npx prettier --check PATH | npx prettier --write PATH |
| Rust | cargo clippy --message-format=short -- -D warnings | cargo clippy --fix --allow-dirty | cargo fmt -- --check | cargo fmt |
| Go | go vet ./... | (no autofix — fix by hand) | gofmt -l PATH | gofmt -w PATH |
Then run each detected language's extra checks:
| Language | Extra checks |
|---|---|
| Python | uv run ty check PATH --hide-progress, uv run bandit -q -r PATH |
| JavaScript / TypeScript | npx tsc --noEmit |
| Rust | cargo check |
| Go | staticcheck ./... (only if installed) |
When the repo defines its own lint script (npm run lint, a just lint recipe),
prefer it over the raw command above — it encodes the project's own flags.
In order, stopping at the first that applies:
Makefile present → make lintpackage.json with a lint script → npm run lint/deps:install --dev
and /configure:linting.If the Pre-commit config line in Context is non-empty:
| Caller flags | Command |
|---|---|
| default | pre-commit run --all-files |
--fix | pre-commit run --all-files --show-diff-on-failure |
| Language | Linter | Autofix Command |
|---|---|---|
| TypeScript/JS | biome | npx @biomejs/biome check --write . |
| TypeScript/JS | biome format | npx @biomejs/biome format --write . |
| Python | ruff | ruff check --fix . |
| Python | ruff format | ruff format . |
| Rust | clippy | cargo clippy --fix --allow-dirty |
| Rust | rustfmt | cargo fmt |
| Go | gofmt | gofmt -w . |
| Go | go mod | go mod tidy |
| Shell | shellcheck | No autofix (manual only) |
JavaScript/TypeScript (Biome): unused imports, prefer-const (let x = 5 → const x = 5).
Python (Ruff): import sorting (I001), unused imports (F401), long lines auto-wrapped.
Rust (Clippy): redundant clone, match → if let for single-arm patterns.
Shell (ShellCheck — manual fixes): quote variables ($var → "$var"), use $() instead of backticks.
Stop autofix and use a different approach when:
After linting:
/code:refactor command/git:commitWhat SKILL.md sets; muted values are Claude Code's defaults
sonnetThree short reads, in order
Python, JavaScript, Rust, Go, TypeScript
npx claudepluginhub laurigates/claude-plugins --plugin code-quality-plugin19 skills in this plugin
/ast-grep-searchFind and replace code patterns structurally with ast-grep. Use when matching code by AST structure, finding functions with specific signatures, or detecting anti-patterns regex cannot match./bulk-sweep-classifyClassify every regex match before a bulk find-replace/syntax-modernization sweep — four match categories, scoped transform, allowlist-aware verification. Use when bulk-renaming commands/tools/paths or migrating syntax across many files./code-antipatternsAnalyze a codebase for anti-patterns using ast-grep. Use when finding magic numbers, console.logs, var usage, excessive any, eval/innerHTML security issues, or deep nesting.Other plugins' skills for the same job