/lint-fix:lint-fix <commit> | <from>..<to> | unstaged | staged | helpfrom lint-fix
Check and fix lint issues for changed Python files. Supports single commit, commit range, and unstaged/staged working tree changes. Use when the user wants to verify or fix lint compliance.
Ships in lint-fix. 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.
Target: $ARGUMENTS
If $ARGUMENTS is help (case-insensitive), output the following usage guide exactly as-is and stop:
/lint-fix - Check and fix lint issues for changed Python files.
Usage:
/lint-fix <commit> Check files changed in a single commit
/lint-fix <from>..<to> Check files changed across a commit range
/lint-fix unstaged Check unstaged working tree changes
/lint-fix staged Check staged (added but not committed) changes
/lint-fix help Show this help message
Examples:
/lint-fix HEAD Lint files changed in the latest commit
/lint-fix abc1234 Lint files changed in commit abc1234
/lint-fix main..HEAD Lint all files changed since branching from main
/lint-fix HEAD~5..HEAD Lint files changed in the last 5 commits
/lint-fix unstaged Lint files you've modified but not yet git-added
/lint-fix staged Lint files you've git-added but not yet committed
Linters (run in order): isort -> ruff -> black -> codespell
Parse $ARGUMENTS to determine which mode to use:
| Argument | Mode | Command to get changed .py files |
|---|---|---|
unstaged | Unstaged working tree changes | git diff --name-only -- '*.py' |
staged | Staged (added but not committed) | git diff --cached --name-only -- '*.py' |
Contains .. (e.g. main..HEAD, HEAD~5..HEAD) | Commit range | git diff --name-only <from>..<to> -- '*.py' |
Anything else (e.g. HEAD, abc1234) | Single commit | git diff --name-only <commit>^..<commit> -- '*.py' (fall back to git diff-tree --no-commit-id --name-only -r <commit> -- '*.py' for initial commits) |
After getting the file list, filter out any files that no longer exist on disk (deleted files).
If no Python files are found, report that and stop.
Run each linter on the changed files. The project's .pre-commit-config.yaml defines the canonical tool versions and flags. Use these defaults if no project config is found:
Check:
isort --check-only --diff --profile=black <files>
Fix if needed:
isort --profile=black <files>
ruff check --output-format=github --fix <files>
Check:
black --check <files>
Fix if needed:
black <files>
codespell <files>
If a linter is not installed, skip it and note the skip in the report.
Summarize:
If fixes were applied, show the diff summary and stage with git add <files> so the user can review before committing.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub primatrix/skills --plugin lint-fixOther plugins' skills for the same job