python-linter
Skill1 starsChanged 4 days agoMITView on GitHub
Use when the user asks to "lint python", "run the linter", "fix linting errors", "check python code style", "run ruff", "format python code", "fix imports", "check types", "run mypy", or wants to find and fix Python code quality issues using ruff and mypy.
- Installs packages
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-orchestratorSkill
- algorithmic-complexity-analyzerSkill
- api-securitySkill
- architectural-planningSkill
- caching-queues-reviewerSkill
- code-reviewerSkill
- csharp-developerSkill
- design-pattern-detectorSkill
- detect-overengineeringSkill
- github-security-scanner-hookSkill
- java-developerSkill
- legacy-code-modernizationSkill
- llm-as-judgeSkill
- load-memorySkill
- nodejs-executorSkill
- playwright-bdd-testerSkill
- powershell-writerSkill
- python-api-writerSkill
- python-developerSkill
- react-developerSkill
- remote-pod-log-analyzerSkill
- save-memorySkill
- scan-halucinated-testsSkill
- scan-repo-readmeSkill
- skill-creatorSkill
- sql-connectorSkill
- sql-executorSkill
- sync-github-forksSkill
- trace-code-contextSkill
- troubleshoot-and-fixSkill
- typescript-developerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Run ruff (lint + format) and optionally mypy (type checking) on Python code.
- Very specific: line 19
If the project uses uv (uv.lock present or uv on PATH), run uv run ruff and uv run mypy directly.
- Very specific: line 37
Check for an existing pyproject.toml or ruff.toml config.
- Distinctive: line 47
If the user wants to see all issues first without fixing:
- Distinctive: line 66
Ask the user if they want type checking.
- Distinctive: line 88
If issues remain, explain each one clearly and offer to fix them.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Linter
Run ruff (lint + format) and optionally mypy (type checking) on Python code. Auto-fixes safe lint issues and reports remaining violations that require manual attention.
Prerequisites
- Python project with
.pyfiles (uvor.venvsupported)
Workflow
Step 1 — Resolve Environment (uv or .venv)
If the project uses uv (uv.lock present or uv on PATH), run uv run ruff and uv run mypy directly. Otherwise, use .venv:
Windows (PowerShell):
if (-not (Test-Path .venv)) { python -m venv .venv }
$PYTHON = if (Test-Path .venv\Scripts\python.exe) { ".venv\Scripts\python.exe" } else { "python" }
& $PYTHON -m ruff --version *> $null; if ($LASTEXITCODE -ne 0) { & $PYTHON -m pip install ruff }
& $PYTHON -m mypy --version *> $null; if ($LASTEXITCODE -ne 0) { & $PYTHON -m pip install mypy }Unix / macOS (Bash):
[ -d .venv ] || python -m venv .venv
PYTHON=$(if [ -f .venv/Scripts/python ]; then echo .venv/Scripts/python; else echo .venv/bin/python; fi)
$PYTHON -m ruff --version 2>/dev/null || $PYTHON -m pip install ruff
$PYTHON -m mypy --version 2>/dev/null || $PYTHON -m pip install mypyCheck for an existing pyproject.toml or ruff.toml config. If neither exists, offer to create a sensible default (see references/python-linter-reference.md for the recommended config).
Step 2 — Run Ruff Lint (with auto-fix)
$PYTHON -m ruff check --fix .--fixauto-corrects safe issues (unused imports, style violations, etc.)- Note any remaining violations that require manual fixes
- If the user wants to see all issues first without fixing:
$PYTHON -m ruff check .
Step 3 — Run Ruff Format
$PYTHON -m ruff format .- Formats all
.pyfiles in place (replaces black + isort) - To preview changes without applying:
$PYTHON -m ruff format --diff .
Step 4 — Run Type Checking (optional)
Ask the user if they want type checking. If yes:
$PYTHON -m mypy .Or for stricter checking:
$PYTHON -m mypy --strict .See references/python-linter-reference.md for mypy configuration options.
Step 5 — Report Results
Summarise:
- How many lint issues were auto-fixed
- Any remaining issues that need manual attention (with file + line references)
- Formatting changes applied
- Type errors found (if mypy was run)
If issues remain, explain each one clearly and offer to fix them.
Additional Resources
references/python-linter-reference.md— Recommended ruff/mypy configs, rule sets, pyproject.toml templates, CI integration
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

