Guide · Agent skill
How to use the Python Anti-Patterns Checklist agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The Python Anti-Patterns Checklist is an agent skill: a single SKILL.md instruction file that tells your AI agent to review Python code against a list of common mistakes. This guide explains what the skill makes the agent do, how to install it, how to trigger it with plain requests, and what to watch for. By the end you will be able to ask your agent for a Python review that checks for issues such as scattered retry logic, hard-coded secrets, and blocking calls in async code.
Quick start
- 1Download the ZIP. Download the skill ZIP from this page. It contains SKILL.md.
- 2Unzip into a skills folder. Extract the python-anti-patterns folder into ~/.claude/skills/ for personal use or into .claude/skills/ inside a project.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill there.
- 4Ask for a Python review. Describe the Python code you want checked and mention anti-patterns or a pre-merge review.
- 5Read the findings. Check each reported item against the code, using the bad and good examples in the skill as reference.
- 6Fix and re-check. Apply the suggested fixes, then ask the agent to run the review again or work through the Quick Review Checklist.
What is an agent skill, and what does this one do?
An agent skill is a folder of instructions that an AI agent can load when a task matches the skill's description. This one is called python-anti-patterns and comes from the wshobson/agents repository, under plugins/python-development/skills/python-anti-patterns. It is released under the MIT licence.
Once the skill is active, the agent uses its file as a reference checklist when you ask it to review Python code. The checklist covers infrastructure, architecture, error handling, resource handling, type safety and testing. Each item shows a bad example, a suggested fix and a better example.
- Scattered timeout or retry logic that should be centralised
- Double retry, where both the application and the infrastructure retry
- Hard-coded configuration and secrets
- Exposed internal types such as ORM models leaking through APIs
- Mixed I/O and business logic
- Bare exception handling and swallowed errors
- Ignored partial failures in batch processing
- Unclosed files and other resources
- Blocking calls inside async code
- Missing type hints and untyped collections
- Tests that only cover the happy path and over-mocking
Install the skill from the ZIP download
Download the ZIP for this skill from this page. The skill is a single file, SKILL.md, so the archive is small. Unzip it so that the skill folder, containing SKILL.md, sits inside a skills directory. You can use either of these locations:
- Personal skills: ~/.claude/skills/ (available across your projects)
- Project skills: .claude/skills/ inside a specific project (shared with anyone who works in that repository)
- Claude apps: upload the skill under Settings → Capabilities → Skills
Trigger the skill with natural requests
You do not need a special command. The skill's description tells the agent when to use it: reviewing Python code for anti-patterns, using it as a checklist when reviewing code, before finalising implementations, or when debugging issues that might come from known bad practices. Ask in ordinary language and mention Python code and what you want checked.
Good requests name the file or change and the goal. For example, ask the agent to review a module before a merge, or to look for problems in a service that is misbehaving.
- Review this Python module for anti-patterns before I merge it.
- Use the Python anti-patterns checklist to check my API handlers for leaked database models.
- Before I finalise this async code, check for blocking calls.
- This batch job stops on the first error. Check it against common Python anti-patterns.
- Check this test file for happy-path-only coverage and over-mocking.
What to expect from a review
The agent compares your code with each section of the checklist and reports where it matches a listed anti-pattern. Because the skill is a written reference, the agent judges the code by reading it. It is not a parser or a scanner, so you should treat its output as a careful manual review rather than proof that the code is clean.
The file also ends with a quick review checklist you can work through yourself before finalising code, and a summary table pairing each anti-pattern with its fix.
- Expect findings that quote the relevant pattern and suggest the listed fix.
- Expect the agent to point to the good example style, such as context managers for files or specific exception types.
- Ask a follow-up if you want the fix applied to the code, or if a finding is unclear.
What you need and what the skill does not do
The skill lists no requirements. It does not run scripts and does not use the network, according to its listing. The only file in the skill is SKILL.md. Your agent environment must be able to load skills, and the code you review must be Python.
- Requires: nothing listed beyond an agent that can load skills
- Runs scripts: no
- Uses network: no
- Not for projects in other languages, because the checklist is Python-specific
- Not a replacement for a full linter, type checker or security scanner, because it does not analyse your whole codebase automatically
Tips for getting better results
Give the agent the whole relevant context. A single function may hide a problem such as double retry, which only shows up when you also look at the client configuration. The skill also points to a companion skill, python-design-patterns, for positive patterns and architecture guidance, so use it when you want to know what to build instead of what to avoid.
Pair the review with your normal tools. Run your linter, type checker and tests as usual, because this checklist covers judgement-based mistakes that those tools may miss.
- Include the surrounding code, such as the client or decorator used, when checking retry logic.
- Use the skill before merges and releases, or when you are teaching or setting team standards.
- Use the Quick Review Checklist at the end of the file as a self-check list.
- Keep the skill's file in your team's repository if you want everyone to review against the same standard.
What people use it for
- Reviewing a Python pull request for hard-coded secrets and unclosed files before a merge
- Checking a FastAPI or similar service for ORM models returned directly from endpoints
- Auditing async code for blocking time.sleep or requests calls inside coroutines
- Reviewing a test suite for happy-path-only coverage and excessive mocking
- Teaching junior developers common Python pitfalls with concrete bad and good examples
Frequently asked questions
How do I install the python-anti-patterns skill?
Download the ZIP from this page and unzip it so the skill folder sits in ~/.claude/skills/ for personal use or in .claude/skills/ inside a project. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.
Does the python-anti-patterns skill need anything else installed?
The listing states no requirements, and the skill does not run scripts or use the network. Its only file is SKILL.md, so it is a set of instructions for the agent rather than a program.
Is the python-anti-patterns skill free?
The skill is released under the MIT licence, as listed on this page. Check the licence file in the source repository for the full terms.
Can this skill replace pylint, mypy or a security scanner?
No. The skill is a manual reference checklist and does not analyse your whole codebase automatically. Keep using a linter, type checker and security scanner alongside it.
What languages does it work with?
It is Python-specific. For projects written in other languages, the checklist does not apply.
How is this different from python-design-patterns?
The anti-patterns skill focuses on what to avoid. The skill's own notes point to python-design-patterns for guidance on positive patterns and architecture.
Why does the agent not find a problem I expected?
The agent reads the code it is given and compares it with the checklist. Give it the surrounding context, such as the client configuration for retry logic, and ask it to check specific areas.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you review Python code before merges or releases, want a shared list of Python standards, or are learning common pitfalls. Pick a full linter, type checker or security scanner instead if you need automatic analysis of a whole codebase, or if your project is not written in Python.
Download the skill