| created | "2025-12-16T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2026-04-25T00:00:00.000Z" |
| allowed-tools | Bash(ruff *), Bash(eslint *), Bash(rustfmt *), Bash(gofmt *), Bash(prettier *), Read, SlashCommand |
| model | sonnet |
| args | [path] [--fix] [--format] |
| argument-hint | [path] [--fix] [--format] |
| description | Universal linter that auto-detects ruff/eslint/clippy/gofmt for the project language. Use when linting code, auto-fixing with --fix, formatting, or running pre-commit checks across a polyglot repo. |
| name | code-lint |
When to Use This Skill
| Use this skill when... | Use something else instead when... |
|---|
| Auto-detecting and running the correct linter for a polyglot repo | Looking up autofix patterns and exact commands → code-lint-fix |
Running ruff/eslint/clippy/gofmt with optional --fix and --format | Detecting structural anti-patterns linters miss → code-antipatterns |
| Driving a one-shot lint pass before commit | Reviewing broader code quality and architecture → code-review |
| Running language-aware lint over a path argument | Scanning specifically for swallowed errors → code-error-swallowing |
Context
- Package files: !
find . -maxdepth 1 \( -name "package.json" -o -name "pyproject.toml" -o -name "setup.py" -o -name "Cargo.toml" -o -name "go.mod" \) -type f
- Pre-commit config: !
find . -maxdepth 1 -name ".pre-commit-config.yaml" -type f
Parameters
$1: Path to lint (defaults to current directory)
$2: --fix flag to automatically fix issues
$3: --format flag to also run formatters
Linting Execution
Python
{{ if PROJECT_TYPE == "python" }}
Run Python linters:
- Ruff check:
uv run ruff check ${1:-.} --output-format=concise ${2:+--fix}
- Type checking:
uv run ty check ${1:-.} --hide-progress
- Format check:
uv run ruff format ${1:-.} ${3:+--check}
- Security:
uv run bandit -r ${1:-.}
{{ endif }}
JavaScript/TypeScript
{{ if PROJECT_TYPE == "node" }}
Run JavaScript/TypeScript linters:
- ESLint:
npm run lint ${1:-.} ${2:+-- --fix}
- Prettier:
npx prettier ${3:+--write} ${3:---check} ${1:-.}
- TypeScript:
npx tsc --noEmit
{{ endif }}
Rust
{{ if PROJECT_TYPE == "rust" }}
Run Rust linters:
- Clippy:
cargo clippy --message-format=short -- -D warnings
- Format:
cargo fmt ${3:+} ${3:--- --check}
- Check:
cargo check
{{ endif }}
Go
{{ if PROJECT_TYPE == "go" }}
Run Go linters:
- Go fmt:
gofmt ${3:+-w} ${3:+-l} ${1:-.}
- Go vet:
go vet ./...
- Staticcheck:
staticcheck ./... (if available)
{{ endif }}
Pre-commit Integration
If pre-commit is configured:
pre-commit run --all-files ${2:+--show-diff-on-failure}
Multi-Language Projects
For projects with multiple languages:
- Detect all language files
- Run appropriate linters for each language
- Aggregate results
Fallback Strategy
If no specific linters found:
- Check for Makefile:
make lint
- Check for npm scripts:
npm run lint
- Suggest installing appropriate linters via
/deps:install --dev
- Suggest configuring project linting standards via /configure:linting
Post-lint Actions
After linting:
- Summary of issues found/fixed
- If unfixable issues exist, suggest
/code:refactor command
- If all clean, ready for
/git:smartcommit