← ClaudeAtlas

pythonlisted

Python development best practices: clean code, patterns, type hints, decorators, context managers, and architecture. Trigger: When writing Python code anywhere in the project.
lgzarturo/codeconductor · ★ 0 · AI & Automation · score 76
Install: claude install-skill lgzarturo/codeconductor
## When to Use - Writing any Python code in the project - Reviewing code for quality and maintainability - Designing new functions, classes, or modules - Implementing business logic or utilities ## Clean Code Principles ### Readability > Brevity Code is read more times than it's written. Prioritize clarity over cleverness: ```python # WRONG — clever but obscure def f(x): return x if x else 0 # CORRECT — readable def calculate_discount(price, has_discount): if not has_discount: return 0 return price * DISCOUNT_RATE ``` ### Meaningful Names | What | Convention | Example | | --------- | ---------------------- | -------------------------------------------- | | Variables | descriptive snake_case | `total_price`, `products_list` | | Functions | verb snake_case | `get_active_products()`, `calculate_total()` | | Classes | PascalCase | `OrderService`, `CartController` | | Constants | UPPER_SNAKE_CASE | `MAX_RETRY_COUNT`, `DEFAULT_PAGE_SIZE` | | Modules | snake_case | `order_service.py`, `cart_utils.py` | ```python # WRONG — cryptic names d = 1500 p = products.filter(a=True) # CORRECT — names that say what they are discount_amount = 1500 active_products = Product.objects.filter(is_active=True) ``` ### Small Functions A function should do ONE thing. Ideally under 30 lines: ```python # WRONG — function does many things def pr