← ClaudeAtlas

python-clean-codelisted

Use when writing, fixing, editing, reviewing, or refactoring any Python code. Enforces Robert Martin's complete Clean Code catalog—naming, functions, comments, DRY, and boundary conditions.
phanijapps/memex · ★ 0 · Code & Development · score 72
Install: claude install-skill phanijapps/memex
# Clean Python: Complete Reference Enforces all Clean Code principles from Robert C. Martin's Chapter 17, adapted for Python. ## Comments (C1-C5) - C1: No metadata in comments (use Git) - C2: Delete obsolete comments immediately - C3: No redundant comments - C4: Write comments well if you must - C5: Never commit commented-out code ## Environment (E1-E2) - E1: One command to build (`pip install -e ".[dev]"`) - E2: One command to test (`pytest`) ## Functions (F1-F4) - F1: Maximum 3 arguments (use dataclasses for more) - F2: No output arguments (return values) - F3: No flag arguments (split functions) - F4: Delete dead functions ## General (G1-G36) - G1: One language per file - G2: Implement expected behavior - G3: Handle boundary conditions - G4: Don't override safeties - G5: DRY - no duplication - G6: Consistent abstraction levels - G7: Base classes don't know children - G8: Minimize public interface - G9: Delete dead code - G10: Variables near usage - G11: Be consistent - G12: Remove clutter - G13: No artificial coupling - G14: No feature envy - G15: No selector arguments - G16: No obscured intent - G17: Code where expected - G18: Prefer instance methods - G19: Use explanatory variables - G20: Function names say what they do - G21: Understand the algorithm - G22: Make dependencies physical - G23: Prefer polymorphism to if/else - G24: Follow conventions (PEP 8) - G25: Named constants, not magic numbers - G26: Be precise - G27: Structure over convention - G28: Encapsulate