← ClaudeAtlas

python-pep8listed

Enforce PEP 8 style in Python code. Use this skill whenever the user shows you Python code and asks you to review, lint, format, clean up, or fix style issues — even if they don't say "PEP 8" explicitly. Also trigger when the user asks "is this good Python?", "check my code style", "format this", "clean this up", or "what's wrong with this Python?". Trigger proactively when writing new Python code to ensure it is PEP 8 compliant from the start. Also use when the user asks "what does PEP 8 say about X?", "how should I name this?", or any question about Python style conventions.
jzills/Claude-Marketplace · ★ 0 · Code & Development · score 62
Install: claude install-skill jzills/Claude-Marketplace
# Python PEP 8 Style Guide This skill covers four modes — pick the one that fits the user's request: 1. **Review** — audit existing code and report violations 2. **Fix** — rewrite code to be PEP 8 compliant 3. **Generate** — write new Python code that follows PEP 8 from the start 4. **Explain** — answer questions about specific PEP 8 rules --- ## Step 1: Detect Available Tools Before reviewing or fixing code, check which tools are installed. Run these in parallel: ```bash command -v ruff 2>/dev/null && echo "ruff available" command -v black 2>/dev/null && echo "black available" command -v flake8 2>/dev/null && echo "flake8 available" ``` **Tool preference order:** ruff > black (for formatting) > flake8 > manual review. If none are found, proceed with inline analysis using the rules in `references/pep8-rules.md`. --- ## Mode: Review Goal: identify every PEP 8 violation and explain it clearly. ### With ruff (preferred) ```bash ruff check <file-or-directory> ``` Report each violation with: rule code, line number, the offending line, and a plain-English explanation. ### With flake8 ```bash flake8 <file-or-directory> ``` Same reporting approach. ### Manual review Read `references/pep8-rules.md` for the full rule set. Work through the code systematically: 1. Code layout (indentation, line length, blank lines, imports) 2. Whitespace in expressions and statements 3. Naming conventions 4. Comments and docstrings 5. Programming recommendations **Report format** — use