Awesome-claude-code lint

Run Python linting, formatting, and type checking

install
source · Clone the upstream repo
git clone https://github.com/m-ret/awesome-claude-code
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/m-ret/awesome-claude-code "$T" && mkdir -p ~/.claude/skills && cp -r "$T/templates/python/.claude/skills/lint" ~/.claude/skills/m-ret-awesome-claude-code-lint-e9868a && rm -rf "$T"
manifest: templates/python/.claude/skills/lint/SKILL.md
source content

Python Lint Skill

Run comprehensive code quality checks for Python projects.

When to Use

  • Before committing code
  • After making significant changes
  • When user requests code quality check
  • Part of pre-commit workflow

Steps

  1. Detect linting tools Check pyproject.toml and installed packages for:

    • ruff (modern, fast)
    • black + isort + flake8 (traditional)
    • pylint
  2. Run Linting

    With Ruff (Preferred)

    ruff check .
    

    With Traditional Tools

    flake8 src/ tests/
    
  3. Run Formatting Check

    With Ruff

    ruff format --check .
    

    With Black + isort

    black --check .
    isort --check-only .
    
  4. Run Type Checking

    mypy src/
    # or
    pyright src/
    
  5. Report Issues Categorize by severity:

    • Errors (must fix)
    • Warnings (should fix)
    • Style (optional)

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PYTHON CODE QUALITY CHECK

Linting (ruff/flake8): [pass/X issues]
Formatting (ruff/black): [pass/X files need formatting]
Type Check (mypy): [pass/X errors]

[Details of any issues]

Suggested fixes: [if applicable]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Auto-Fix Mode

When invoked with "fix" argument:

With Ruff

ruff check --fix .
ruff format .

With Traditional Tools

black .
isort .

After fixing:

  1. Re-run checks to confirm
  2. Report what was auto-fixed
  3. Note any remaining manual fixes needed

Common Issues and Fixes

IssueFix
Import order
isort .
or
ruff check --fix
Line too longBreak into multiple lines
Unused importRemove or add
# noqa: F401
if intentional
Missing type hintAdd type annotations
Undefined nameImport or define the name