Skip to content

Phở Founder Lifetime: $59 once, 1 year of Phở AI included. Limited seats. See the offer

Engineering · Skill

Python Anti-Patterns Checklist

Use this skill when reviewing Python code for common anti-patterns to avoid. Use as a checklist when reviewing code, before finalizing implementations, or when debugging issues that might stem from known bad practices.

Open in Phở

What the skill covers

The sections of its instructions, in order.

  1. 01 When to Use This Skill
  2. 02 Infrastructure Anti-Patterns
  3. Scattered Timeout/Retry Logic
  4. Double Retry
  5. Hard-Coded Configuration
  6. 03 Architecture Anti-Patterns
  7. Exposed Internal Types
  8. Mixed I/O and Business Logic
  9. 04 Error Handling Anti-Patterns
  10. Bare Exception Handling
  11. Ignored Partial Failures
  12. Missing Input Validation
  13. 05 Resource Anti-Patterns
  14. Unclosed Resources
  15. Blocking in Async
  16. 06 Type Safety Anti-Patterns
  17. Missing Type Hints
  18. Untyped Collections
  19. 07 Testing Anti-Patterns
  20. Only Testing Happy Paths

More in Python development

  • Async Python Patterns

    Master Python asyncio, concurrent programming, and async/await patterns for high-performance applications. Use when building async APIs, concurrent systems, or I/O-bound…

  • Python Background Jobs & Task Queues

    Python background job patterns including task queues, workers, and event-driven architecture. Use when implementing async task processing, job queues, long-running operations, or…

  • Python Code Style & Documentation

    Python code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or…

  • Python Configuration Management

    Python configuration management via environment variables and typed settings. Use when externalizing config, setting up pydantic-settings, managing secrets, or implementing…

  • Python Design Patterns

    Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use this skill when designing a new service or component…

  • Python Error Handling

    Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception…

  • Python Observability

    Python observability patterns including structured logging, metrics, and distributed tracing. Use when adding logging, implementing metrics collection, setting up tracing, or…

  • Python Packaging

    Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or…

  • Python Performance Optimization

    Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving…

  • Python Project Structure & Module Architecture

    Python project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with __all__, or…

  • Python Resilience Patterns

    Python resilience patterns including automatic retries, exponential backoff, timeouts, and fault-tolerant decorators. Use when adding retry logic, implementing timeouts, building…

  • Python Resource Management

    Python resource management with context managers, cleanup patterns, and streaming. Use when managing connections, file handles, implementing cleanup logic, or building streaming…

  • Python Testing Patterns

    Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing…

  • Python Type Safety

    Python type safety with type hints, generics, protocols, and strict type checking. Use when adding type annotations, implementing generic classes, defining structural interfaces…

  • UV Package Manager

    Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows. Use when setting up Python projects, managing…

Similar engineering skills

Frequently asked questions

What does Python Anti-Patterns Checklist do?

Use this skill when reviewing Python code for common anti-patterns to avoid. Use as a checklist when reviewing code, before finalizing implementations, or when debugging issues that might stem from known bad practices.

Is Python Anti-Patterns Checklist free to use?

Yes. Python Anti-Patterns Checklist is published by Seth Hobson under the MIT licence, and you can use it with a free Phở account.

How do I use Python Anti-Patterns Checklist in Phở?

Press Open in Phở, then Try to apply it to your next message, or add the Python development set so Phở loads it whenever a request matches.

Does Python Anti-Patterns Checklist need other tools?

No. It works in a normal Phở chat with what you type or upload.

Copied unchanged from wshobson/agents at commit 7e2fb55 and credited to Seth Hobson, who is not affiliated with Phở. The full instructions and licence text ship with the skill inside Phở.