skills/code-quality/code-linting/SKILL.md
Run Python (ruff) and JavaScript (Biome) linting.
npx skillsauth add notque/claude-code-toolkit code-lintingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Unified linting workflow for Python (ruff) and JavaScript (Biome). Covers check, format, and auto-fix for both languages. Only handles Python and JavaScript/TypeScript -- complex logic issues and other languages are out of scope.
| Signal | Load These Files | Why |
|---|---|---|
| Python violations, ruff rules, F401/E711/B006/UP errors | ruff-rules-reference.md | Routes to the matching deep reference |
| ruff not found, pyproject.toml config, ruff version differences | ruff-rules-reference.md | Routes to the matching deep reference |
| JavaScript/TypeScript violations, Biome rules, noVar/useConst/noDoubleEquals | biome-rules-reference.md | Routes to the matching deep reference |
| biome not found, biome.json config, migrating from ESLint | biome-rules-reference.md | Routes to the matching deep reference |
| Linting CI failures, format check vs lint check differences | biome-rules-reference.md | Routes to the matching deep reference |
Before running any linter, read the repository's CLAUDE.md for project-specific linting rules -- those override every default below. Then locate the project's linter config files (pyproject.toml for ruff, biome.json for Biome). All linter invocations must use these configs as-is; never override line width, rule sets, or other project settings.
When a project contains both Python and JavaScript/TypeScript, lint both unless the user explicitly requests a single language. Run the check command first to see what violations exist:
# Python -- use project venv when available
ruff check .
# or: ./venv/bin/ruff check .
# JavaScript/TypeScript
npx @biomejs/biome check src/
Always display the complete linter output. Never summarize results as "no issues found" or describe output secondhand -- show the actual command output so the user can see every error, warning, and style issue together.
Read the full output and understand what violations exist and their severity before applying any fixes. Jumping straight to --fix without reviewing risks auto-removing imports that are still needed or making changes that reduce readability.
Apply --fix for safe categories: formatting, import ordering, and style issues that the linter can correct mechanically.
# Python
ruff check --fix .
ruff format .
# JavaScript/TypeScript
npx @biomejs/biome check --write src/
npx @biomejs/biome format --write src/
Only run the linters and fixes that were requested. Do not add custom rules, configuration changes, or additional tooling unless the user explicitly asks.
After auto-fix, review the diff to verify changes are correct and safe:
git diff
Auto-fixes can occasionally remove imports that are still needed, reformat code in ways that hurt readability, or introduce subtle bugs through variable shadowing changes. Revert any problematic auto-fixes before proceeding.
For violations that cannot be auto-fixed, explain each one and how to resolve it:
Python common fixes:
ruff check --fixJavaScript common fixes:
var with let/constconst for unchanging values=== instead of ==Run the linter one final time to confirm zero violations before suggesting a commit:
ruff check .
ruff format --check .
npx @biomejs/biome check src/
Report output factually -- no self-congratulation, just the command results.
Remove any temporary lint report files or cache files created during execution.
make lint # Check both Python and JS
make lint-fix # Fix both Python and JS
| Tool | Config | Typical Line Width | |------|--------|-------------------| | ruff | pyproject.toml | 88-120 | | biome | biome.json | 80-120 |
Cause: Virtual environment not activated or ruff not installed Solution:
./venv/bin/ruff or ./env/bin/ruffpip install ruffpipx run ruff check .Cause: Biome not installed in project
Solution: Run npx @biomejs/biome to use npx-based execution
Cause: Running from wrong directory Solution: cd to project root where pyproject.toml/biome.json exist
Load these files when the task involves the corresponding domain:
| Task type | Reference file |
|-----------|---------------|
| Python violations, ruff rules, F401/E711/B006/UP errors | references/ruff-rules-reference.md |
| ruff not found, pyproject.toml config, ruff version differences | references/ruff-rules-reference.md |
| JavaScript/TypeScript violations, Biome rules, noVar/useConst/noDoubleEquals | references/biome-rules-reference.md |
| biome not found, biome.json config, migrating from ESLint | references/biome-rules-reference.md |
| Linting CI failures, format check vs lint check differences | references/ruff-rules-reference.md + references/biome-rules-reference.md |
documentation
Document translation: quick/normal/refined modes with chunked parallel subagents and glossary support.
development
AI image generation: Gemini and Nano Banana backends; single/series/batch workflows with prompt-to-disk.
testing
Unified voice content generation pipeline with mandatory validation and joy-check. 13-phase pipeline: LOAD, GROUND, STATS-CHECKPOINT, GENERATE, HOOK-GATE, VALIDATE, REFINE, VARIETY-GATE, JOY-CHECK, ANTI-AI, CLOSE-GATE, OUTPUT, CLEANUP. Use when writing articles, blog posts, or any content that uses a voice profile. Use for "write article", "blog post", "write in voice", "generate content", "draft article", "write about".
documentation
Critique-and-rewrite loop for voice fidelity validation.