
Python Anti Patterns
A comprehensive code review checklist that catches the Python mistakes that actually matter in production. Covers infrastructure gotchas like double retry layers and scattered timeout logic, architectural problems like exposing ORM models directly through APIs, and resource management issues like blocking calls in async code. The quick checklist at the end is genuinely useful during code reviews. What I appreciate most is that it focuses on the anti-patterns that cause real operational pain, not just style issues. Each example shows both the problematic code and the fix, making it practical for teams establishing coding standards.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 5
- skills.sh installs
- 13.8K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill python-anti-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Python Anti-Patterns Checklist
A reference checklist of common mistakes and anti-patterns in Python code. Review this before finalizing implementations to catch issues early.
When to Use This Skill
- Reviewing code before merge
- Debugging mysterious issues
- Teaching or learning Python best practices
- Establishing team coding standards
- Refactoring legacy code
Note: This skill focuses on what to avoid. For guidance on positive patterns and architecture, see the python-design-patterns skill.
Infrastructure Anti-Patterns
Scattered Timeout/Retry Logic
# BAD: Timeout logic duplicated everywhere
def fetch_user(user_id):
try:
return requests.get(url, timeout=30)
except Timeout:
logger.warning("Timeout fetching user")
return None
def fetch_orders(user_id):
try:
return requests.get(url, timeout=30)
except Timeout:
logger.warning("Timeout fetching orders")
return None
Fix: Centralize in decorators or client wrappers.
Sponsors
Details
- Repository
- github.com/wshobson/agents
- Categories
- Debugging, Python
More from wshobson/agents
All 174- Stripe Integration13.8K
- Microservices Patterns13.7K
- Secrets Management13.6K
- Web Component Design13.6K
- Gitlab Ci Patterns13.6K
- Grafana Dashboards13.6K
- Langchain Architecture13.6K
- Protocol Reverse Engineering13.5K
- Python Packaging13.4K
- Llm Evaluation13.3K
- Python Type Safety13.2K
- Startup Financial Modeling13.1K
- React Modernization13.1K
- Wcag Audit Patterns13K
- Unity Ecs Patterns12.5K
- Workflow Orchestration Patterns12.5K
- Helm Chart Scaffolding12.4K
- Python Resilience12.2K
- Market Sizing Analysis12.2K
- Memory Safety Patterns12.2K
- Gitops Workflow12.1K
- Python Observability12K
- Shellcheck Configuration12K
- Python Configuration12K