python-conventions
Skill9 starsChanged 8 days agoMITView on GitHub
Python style and structure conventions based on PEP 8. Load before implementing or reviewing any pyproject.toml/requirements.txt-based feature.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- leroyguillaume/claudetheir own version, first seen Oct 30, 2026
- ek33450505/claude-agent-teamtheir own version, first seen Oct 25, 2026
- andr-ca/agentharnesstheir own version, first seen Oct 15, 2026
- wtsi-hgi/agentskillstheir own version, first seen Oct 4, 2026
- techmefr/mentistheir own version, first seen Sep 11, 2026
- HermeticOrmus/python-conventions-skillstheir own version, first seen May 23, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- tae0y/python-project-template★ 14same name
- ek33450505/claude-agent-team★ 8same name
- leroyguillaume/claude★ 7same name
- HermeticOrmus/python-conventions-skills★ 2same name
- andr-ca/agentharness★ 1same name
- wtsi-hgi/agentskills★ 1same name
- techmefr/mentis★ 0same name
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 repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-debugSkill
- comprehension-workflowSkill
- dev-cleanupSkill
- angular-patternsSkill
- dotnet-conventionsSkill
- github-actions-cicdSkill
- npm-debugSkill
- structural-searchSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Always use self as the first argument of instance methods [web:84].
- Very specific: line 30
Prefer one import per line.
- Distinctive: line 34
Use type hints on public function signatures.
- Distinctive: line 35
Use docstrings for modules, classes, and public functions describing purpose, not implementation.
- Distinctive: line 36
Keep functions focused; if a function mixes multiple responsibilities, split it.
“Common” is measured: kept by at least 6 in 10 of the 7 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 Conventions
Based on PEP 8, the official Python style guide [web:74].
Naming
lower_case_with_underscoresfor functions and variables [web:87].CapitalizedWords(PascalCase) for classes [web:87].UPPERCASE_WITH_UNDERSCORESfor constants [web:87].- Always use
selfas the first argument of instance methods [web:84].
Formatting
- 4 spaces per indentation level; never mix tabs and spaces [web:74][web:84].
- Limit lines to 79 characters for code, 72 for docstrings/comments — relax this ceiling only if the project's linter config already does (e.g., Black's 88-char default) [web:74].
- Two blank lines around top-level functions and classes; one blank line between methods inside a class [web:74].
- One space around operators; no space immediately inside parentheses/brackets [web:87].
- Pick one quote style (single or double) and use it consistently across the codebase [web:87].
Imports
- Order: standard library, then third-party, then local application imports, each group separated by a blank line [web:87][web:84].
- Prefer one import per line; use explicit
from module import nameonly when it improves clarity.
Structure
- Use type hints on public function signatures.
- Use docstrings for modules, classes, and public functions describing purpose, not implementation.
- Keep functions focused; if a function mixes multiple responsibilities, split it.
When Reviewing
Flag mixed tabs/spaces, inconsistent quote style, and missing type hints on public APIs ahead of line-length nits if the project has its own formatter (Black/Ruff) already configured — defer to that tool's config over strict PEP 8 line length.
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.

