# skill: /linter **Location:** `custom-claude-skills/skills/linter/SKILL.md` ## Purpose Audits and manages project formatters/linters. Three modes: scan (audit setup), run (format all files), cleanup (remove orphaned `.pre-lint` files). ## Usage ``` /linter # Scan mode (default) — audit setup /linter scan # Same as above /linter run # Format and lint all files /linter cleanup # Remove orphaned .pre-lint files ``` ## How it works ### Scan mode 1. Finds all file extensions in the project 2. Checks `formatters/` directory for symlinks 3. Verifies tool availability (ruff, shfmt, shellcheck, biome, sqlfluff, prettier) 4. Checks for config files (pyproject.toml, .editorconfig, biome.json, .sqlfluff, .prettierrc) 5. Checks pre-commit hook installation 6. Presents results as a table with status per extension ### Run mode 1. Creates a git stash checkpoint 2. Runs each formatter on all matching files 3. Reports errors and `git diff --stat` summary ### Cleanup mode 1. Finds `*.pre-lint` files (orphaned checkpoint files from interrupted lint runs) 2. Lists and removes them ## Gotchas - Scan mode is non-destructive — safe to run anytime - Run mode creates a stash checkpoint for safety - `.pre-lint` files are git blob SHA references used by the PostToolUse hook for rollback