← 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.
CasLubbers/code-design-skills · ★ 1 · Code & Development · score 62
Install: claude install-skill CasLubbers/code-design-skills
# 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 - Stepdown rule: file reads top-down, callers above callees, one level of abstraction per function ## 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 - Composition over inheritance: inherit only for genuine is-a, compose for reuse - 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 - G2