python-best-practices
Skill13 starsChanged 7 months agoApache-2.0View on GitHub
Review and improve Python code using focused guidance on common anti-patterns, performance bottlenecks, test quality, and error handling. Use this skill when writing or reviewing Python code that needs judgment beyond linters and type checkers.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- baekenough/oh-my-customcodetheir own version, first seen Oct 3, 2026
- The-AIOS/aiostheir own version, first seen Sep 24, 2026
- excatt/superclaude-plusplustheir own version, first seen Sep 7, 2026
- amirrezaalasti/codescribetheir own version, first seen Aug 3, 2026
- Madheshvivekanandan/ai-engineering-skillstheir own version, first seen Jul 31, 2026
- tomroberts92/skillstheir own version, first seen Jun 25, 2026
Used with
Projects with it also use typescript-best-practices, react-best-practices and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ofershapSkilltypescript-best-practices
Also in 3 projects that use this
OpenAISkillreact-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 3 projects that use this
VercelSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Also in 4 projects that use this
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 4 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- The-AIOS/aios★ 69same name
- baekenough/oh-my-customcode★ 43same name
- jefflester/claude-skills-supercharged★ 42same name
- excatt/superclaude-plusplus★ 14same name
- arnabdeypolimi/claude_code_setup★ 4same name
- Sanskar015/claude-skills-supercharged★ 3same name
- amirrezaalasti/codescribe★ 2same name
- b12consulting/skills★ 2same name
- medy-gribkov/arcana★ 1same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- ai-harness-setupSkill
- ai-native-assessmentSkill
- code-reviewSkill
- commit-and-push-changesSkill
- create-pull-request-with-reviewersSkill
- gh-pr-comment-resolutionSkill
- pr-follow-upSkill
- reflect-on-changesSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when reviewing or writing Python code that needs human-style engineering judgment: code smells, hot-path performance issues, …
- Distinctive: line 15
Start by identifying the kind of Python work in front of you, then read only the matching reference files.
- Very specific: line 17
Read references/anti-patterns.md when reviewing general code quality, maintainability, architecture smells, configuration handling, …
- Very specific: line 18
Read references/performance.md when the code is latency-sensitive, CPU-heavy, memory-heavy, uses async execution, or appears to sit on a …
- Very specific: line 19
Read references/testing.md when reviewing test code, coverage quality, fixtures, mocking strategy, parameterization, or the structure of a …
- Very specific: line 20
Read references/error-handling.md when reviewing validation, exceptions, failure modes, batch processing, recovery behavior, or API/service …
- Distinctive: line 30
Use the references to look for issues that mechanical tools often miss:
- Distinctive: line 38
Do not inline the full guidance from the references into your response unless the user asks for it.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Best Practices
Use this skill when reviewing or writing Python code that needs human-style engineering judgment: code smells, hot-path performance issues, test quality, and robust failure handling.
How To Use This Skill
Start by identifying the kind of Python work in front of you, then read only the matching reference files.
- Read
references/anti-patterns.mdwhen reviewing general code quality, maintainability, architecture smells, configuration handling, resource usage, or type-safety issues. - Read
references/performance.mdwhen the code is latency-sensitive, CPU-heavy, memory-heavy, uses async execution, or appears to sit on a hot path. - Read
references/testing.mdwhen reviewing test code, coverage quality, fixtures, mocking strategy, parameterization, or the structure of a pytest suite. - Read
references/error-handling.mdwhen reviewing validation, exceptions, failure modes, batch processing, recovery behavior, or API/service robustness.
Load more than one reference when the change crosses concerns. Examples:
- API handlers often need both
references/error-handling.mdandreferences/testing.md. - Async services often need both
references/performance.mdandreferences/anti-patterns.md. - Refactors of business logic and persistence boundaries often need both
references/anti-patterns.mdandreferences/error-handling.md.
Review Focus
Use the references to look for issues that mechanical tools often miss:
- brittle boundaries between I/O and business logic
- retries, timeouts, and configuration scattered through the code
- blocking work inside async flows
- tests that only cover happy paths or overuse mocks
- exceptions that lose context or hide partial failures
Do not inline the full guidance from the references into your response unless the user asks for it. Read the relevant file, apply it to the code at hand, and return concrete findings or edits.
Reference Map
references/anti-patterns.mdreferences/performance.mdreferences/testing.mdreferences/error-handling.md
Attribution
The reference material in this skill is adapted from wshobson/agents and used under the MIT license. See NOTICE for the full license text and copyright notice.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

