python-lint
Fix Python build, type, and lint errors with minimal surgical fixes
SKILL.md.claude/skills/python-lint/SKILL.md
GitHubPython Lint
Fix Python build errors, type errors, and lint issues incrementally. Invokes the python-build-resolver agent for minimal, surgical fixes.
When to Use
mypyreports type errorsruff checkorflake8shows lint violationspython -m py_compilefails with SyntaxError- Import errors block execution
- CI pipeline fails on Python checks
What This Command Does
- Run diagnostics (
dev/lintordev/test-backend) - Parse errors grouped by file and severity
- Fix incrementally, one error at a time
- Verify each fix with re-run
- Report summary of fixes and remaining issues
Common Errors Fixed
| Error | Typical Fix |
|---|---|
Missing type annotation |
Add type hints |
ModuleNotFoundError |
Fix imports or install package |
Incompatible types |
Add type conversion or annotation |
Optional access without check |
Add None guard |
SyntaxError |
Fix syntax |
IndentationError |
Fix indentation |
Unused import |
Remove import |
Fix Strategy
- SyntaxError first (blocks everything)
- ImportError second (blocks module loading)
- Type errors third
- Lint warnings last
Stop Conditions
- Same error after 3 attempts
- More errors introduced than fixed
- Architectural changes required
- Missing external dependency that can't be installed
Related
/python-review- Code review/python-tdd- TDD workflow- Skills:
python-patterns
Language
- Internal reasoning and thinking should be in English
- All user-facing output, reports, and summaries must be written in Japanese