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.mdsource 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
-
Detect linting tools Check pyproject.toml and installed packages for:
- ruff (modern, fast)
- black + isort + flake8 (traditional)
- pylint
-
Run Linting
With Ruff (Preferred)
ruff check .With Traditional Tools
flake8 src/ tests/ -
Run Formatting Check
With Ruff
ruff format --check .With Black + isort
black --check . isort --check-only . -
Run Type Checking
mypy src/ # or pyright src/ -
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:
- Re-run checks to confirm
- Report what was auto-fixed
- Note any remaining manual fixes needed
Common Issues and Fixes
| Issue | Fix |
|---|---|
| Import order | or |
| Line too long | Break into multiple lines |
| Unused import | Remove or add if intentional |
| Missing type hint | Add type annotations |
| Undefined name | Import or define the name |