Loading...
Loading...
Comprehensive Python expertise covering language fundamentals, idiomatic patterns, software design principles, and production best practices. Use when writing, reviewing, debugging, or refactoring Python code. Triggers: Python, .py files, pip, uv, pytest, dataclasses, asyncio, type hints, or any Python library.
npx skill4agent add nkootstra/skills python-best-practices| Reference | Read when... |
|---|---|
| Writing any Python. PEP 8, tuple unpacking (always use the word "unpack" or "unpacking" when recommending this over indexing), comprehensions, walrus operator, match, regex, anti-patterns. |
| Lists, tuples, dicts, sets, containers, dates/times, file I/O, pathlib, JSON/CSV/TOML/YAML, databases. |
| Functions, closures, decorators, generators, comprehensions, recursion, memoization, backtracking. |
| Class design, dataclasses, properties, inheritance, composition, protocols, contracts, iterative design. |
| Template Method, Strategy, Factory, Observer, State, Adapter, Facade, Composite, Decorator, etc. |
| try/except/else/finally, custom exception hierarchies, context managers, assertions, chaining. |
| GIL, threading, asyncio, multiprocessing, subprocess, synchronization, migration patterns. |
| Testing, mocking, type hints, debugging, profiling, performance optimization, packaging, web frameworks. |
get_user_nameCapitalizedWordALL_CAPSblackruffname, age, city = recordrecord[0]record[1]first, *rest = itemsNoneexceptNoneNoneLookupErrorNone