Agent skill · Workflow & Productivity

python-anti-patterns

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.

Seth Hobson38,331★ · +219/wk · 1 repos on radarProfile →
claude-codecodexcopilotcursorMIT
Install
npx skills add wshobson/agents --skill python-anti-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Path: plugins/python-development/skills/python-anti-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 38,479 · +148 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 ```python # 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. ```python # GOOD: Centralized retry logic @retry(stop=stop_after_attempt(3), wait=wait_exponential()) def http_get(url: str) -> Response: return requests.get(url, timeout=30) ``` ### Double Retry ```python # BAD: Retrying at multiple layer

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Infrastructure Anti-Patterns
  3. Scattered Timeout/Retry Logic
  4. Double Retry
  5. Hard-Coded Configuration
  6. Architecture Anti-Patterns
  7. Exposed Internal Types
  8. Mixed I/O and Business Logic
  9. Error Handling Anti-Patterns
  10. Bare Exception Handling
  11. Ignored Partial Failures
  12. Missing Input Validation
  13. Resource Anti-Patterns
  14. Unclosed Resources
More from agents
All skills →
About this skill
What does the python-anti-patterns skill 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.

How do I install it?

Run `npx skills add wshobson/agents --skill python-anti-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From wshobson/agents, a repository with 38,479 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going