/major-ai-skills:lint-auto-fix-delegationfrom major-ai-skills
Delegate mechanical style and import corrections to the repository's linter and inspect the resulting diff.
Ships in major-ai-skills. 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.
None: SKILL.md is the whole skill.
When a continuous integration check or code quality gate reports 30 style violations (missing semicolons, trailing commas, unused import statements, improper quote marks), naive agents attempt to fix each violation manually through LLM code generation turns.
Asking an LLM to fix mechanical lint errors burns 2,000 to 5,000 output tokens, takes 15 to 25 seconds of streaming latency, and risks introducing subtle logic regressions during the rewrite.
The Linter Auto-Fix Delegation Protocol delegates 100% of deterministic style, formatting, and import fixes to local high-speed CLI linters (ruff, biome, eslint --fix, cargo clippy), resolving violations in 10 milliseconds on local CPU at zero token cost.
┌─────────────────────────────────────────────────────────────┐
│ Linter Resolution Comparison │
│ │
│ Manual LLM Code Rewrite (30 Lint Errors): │
│ • Agent reads 400-line file into context │
│ • Generates 400 lines of modified code to fix quotes/semis │
│ • 2,200 tokens billed, 14.5 seconds streaming latency │
│ • High risk of accidentally altering business logic │
│ │
│ Local Linter Delegation (`ruff --fix` / `biome --write`): │
│ • Agent executes: `ruff check --fix src/` via CLI │
│ ↳ 30 violations healed deterministically in 12ms (Local CPU)│
│ ↳ 0 Tokens Billed ($0.00), 1,200x Faster Execution! │
└─────────────────────────────────────────────────────────────┘
Execute these sub-50ms CLI commands via run_command:
ruff - 100x Faster than Flake8/Black)# Fix unused imports, sorting, quotes, and standard PEP8 rules
ruff check --fix src/
ruff format src/
biome or eslint)# Ultra-fast Rust-based linter & formatter (Biome)
npx -y @biomejs/biome check --write src/
# Standard ESLint auto-fix
npx -y eslint --fix src/
# Rust: Auto-format and apply clippy suggestions
cargo fmt
cargo clippy --fix --allow-dirty
# Go: Format and optimize imports
gofmt -w .
goimports -w .
┌───────────────────────────────────────────────────────────────────────────┐
│ TIER 1: RUN LOCAL AUTO-FIX FIRST (Always Mandatory) │
│ Run `ruff check --fix` or `eslint --fix`. In 90% of cases, all errors heal│
│ │
│ TIER 2: LLM INTERVENTION ONLY FOR REMAINING SEMANTIC ERRORS │
│ If linter reports un-fixable semantic error (e.g. `TS2345: Type mismatch`)│
│ • Use `replace_file_content` targeting *only* that specific line │
└───────────────────────────────────────────────────────────────────────────┘
Resolving 50 formatting, import, and style violations across a 15-file repository:
| Metric | Manual LLM Code Rewriting | Linter CLI Auto-Fix Delegation | Improvement |
|---|---|---|---|
| Total LLM Tokens Billed | 18,500 tokens | 0 tokens | 100% Token Savings |
| Execution Duration | 48.0 seconds | 0.04 seconds | 1,200x Faster |
| Accidental Logic Loss | 2 bugs introduced | 0 (Guaranteed by AST engine) | 100% Deterministic |
MANDATORY: Agents must NEVER manually rewrite code files to fix formatting, indentation, semicolon, or unused import violations. Always delegate mechanical lint fixes to local CLI tools (
ruff --fix,biome check --write,eslint --fix).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization.Other plugins' skills for the same job
/act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.