code-lint
БесплатноЗапускает вложенные скриптыНе проверенRun the project's linters and formatters — auto-detects ruff/eslint/clippy/gofmt. Use when linting code, auto-fixing lint errors, or checking formatting.
от laurigates★ 61 звезда на GitHubОб этом скилле
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 | 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) |
Context
- Package files: !
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 f - Pre-commit config: !
find . -maxdepth 1 -name ".pre-commit-config.yaml" -type f
Parameters
Parse $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 ..
Execution
Run this lint pass:
Step 0: One-shot path (preferred when no 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.
Step 1: Detect the project language
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 |
- Exactly one match → run that row of Step 2.
- Several matches (polyglot repo) → run each matching row, then aggregate the results into one summary. Do not pick one arbitrarily.
- No match → skip to Step 3.
Step 2: Run the row for each detected language
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.
Step 3: Fallback when no language was detected
In order, stopping at the first that applies:
Makefilepresent →make lintpackage.jsonwith alintscript →npm run lint- Otherwise report that no linters were found, and suggest
/deps:install --devand/configure:linting.
Step 4: Pre-commit integration
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 |
Autofix Command Reference
| Language | Linter | Autofix Comman
Установить code-lint в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(bash ${CLAUDE_PLUGIN_ROOT}/skills/code-lint/scripts/detect-and-fix.sh *)Bash(find *)Bash(uv run ruff check *)Bash(uv run ruff format *)Bash(npx eslint *)Bash(npx prettier *)Bash(npx tsc *)Bash(cargo clippy *)Bash(cargo fmt *)Bash(cargo check *)Bash(go vet *)Bash(gofmt *)Bash(pre-commit run *)Bash(npm run lint *)Bash(just lint *)ReadSlashCommandВложенные файлы
FAQ
Что делает скилл code-lint?
Run the project's linters and formatters — auto-detects ruff/eslint/clippy/gofmt. Use when linting code, auto-fixing lint errors, or checking formatting.
Как установить скилл code-lint?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-lint запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic