coding-standards
Skill34 starsChanged 4 months agoMITView on GitHub
Python coding standards and best practices covering error handling, performance optimization, async patterns, SOLID design principles, documentation, data validation, and object-oriented programming. Use when writing, reviewing, or refactoring Python code, or when the user asks about Python style, design, or best practices.
120 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- n1kben/agentstheir own version, first seen Nov 8, 2026
- advait/effect-durable-agenttheir own version, first seen Nov 8, 2026
- shinpr/ai-coding-project-boilerplatetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use everything-claude-code, everything-claude-code-conventions and 10 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.
InfopibeSkilleverything-claude-code
Also in 9 projects that use this
mryeastcodeSkilleverything-claude-code-conventions
Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
Also in 8 projects that use this
niloykumarbarmanSkillagent-sort
Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
Also in 8 projects that use this
tpavanipradeepSkillnextjs-turbopack
Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.
Also in 15 projects that use this
CodeWithBehnamSkilldmux-workflows
Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.
Also in 17 projects that use this
InfopibeSkillinvestor-outreach
Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising. Use when the user wants outreach to angels, VCs, strategic investors, or accelerators and needs concise, personalized, investor-facing messaging.
Also in 22 projects that use this
- +1 more from Infopibe
Other versions120 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 120
- affaan-m/ECC★ 246ksame name
- dotnet/winforms★ 4.9ksame name
- zereight/gitlab-mcp★ 2.1ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- sjjian/openhare★ 816same name
- dmmulroy/skills★ 428same name
- nanvix/nanvix★ 318same name
- loulanyue/awesome-claude-notes★ 272same name
- shinpr/ai-coding-project-boilerplate★ 236same name
- kid-sid/claude-spellbook★ 190same name
110 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 repository4 other files it gives its agents.
- data-scienceSkill
- testingSkill
- toolingSkill
- web-applicationSkill
The file
Files
Python Coding Standards
A comprehensive collection of Python coding standards and best practices. Designed for AI agents and LLMs to generate high-quality, performant, and maintainable Python code.
Categories
Error Handling [CRITICAL]
Prevent failures from being hidden or reported as successful outcomes.
| Rule | Description |
| error-no-silent-exceptions | Never swallow exceptions |
Performance Optimization [CRITICAL]
Apply Python optimization patterns to improve processing speed and memory efficiency.
| Rule | Description |
| perf-list-comprehension | Prefer list comprehensions over loops (1.5-2x faster) |
| perf-generator-expression | Use generators for large datasets (O(1) memory) |
| perf-dict-get | Use dict.get() for efficient default values |
| perf-set-lookup | Use set for fast lookups (O(1) vs O(n)) |
| perf-str-join | Use join for string concatenation (O(n) vs O(n²)) |
Async Processing [HIGH]
Efficient asynchronous programming patterns using asyncio.
| Rule | Description |
| async-gather | Use asyncio.gather for independent tasks |
| async-create-task | Proper background task creation |
| async-context-manager | Resource management with async with |
| async-semaphore | Limit concurrency with semaphores |
Design Principles [HIGH]
Software design principles for maintainability and extensibility.
| Rule | Description |
| design-philosophy | DRY, YAGNI, KISS principles |
| design-single-responsibility | Single Responsibility Principle |
| design-dependency-injection | Loose coupling with dependency injection |
| design-no-global-singleton | Avoid global singletons and module-level shared instances |
| solid-ocp | Open/Closed Principle |
| solid-lsp | Liskov Substitution Principle |
| solid-isp | Interface Segregation Principle |
| design-pure-functions | Prefer pure functions without side effects |
| design-early-return | Reduce nesting with early returns |
Documentation [HIGH]
Documentation standards for public API clarity and machine-checkable contracts.
| Rule | Description |
| doc-docstring | Document public APIs with Google style docstrings |
| doc-type-hints | Require type hints for public APIs |
Data Validation [HIGH]
Validation patterns for data crossing trust boundaries.
| Rule | Description |
| validation-pydantic | Use Pydantic for boundary data validation |
Object-Oriented Programming [MEDIUM]
Best practices for Pythonic object-oriented programming.
| Rule | Description |
| oop-composition-over-inheritance | Prefer composition over inheritance |
| oop-dataclass | Use dataclass for data containers |
| oop-protocol | Prefer Protocol over abstract base classes |
| oop-property | Use property instead of getters |
Quick Reference
Error Handling
try:
config = parse_config(path)
except ConfigParseError as exc:
raise StartupError(f"Invalid configuration: {path}") from exc
def main() -> int:
try:
start_application()
except StartupError:
logger.exception("Application startup failed")
return 1 # explicit non-success outcome at the process boundary
return 0
if __name__ == "__main__":
raise SystemExit(main())Performance Patterns
# List comprehension (not loops)
result = [x * 2 for x in items]
# Generator for large data
total = sum(x * x for x in range(1_000_000))
# dict.get() with default
value = config.get("key", default_value)
# Set for fast lookup
valid_ids: set[int] = {1, 2, 3}
if item_id in valid_ids: ...
# join for strings
result = ",".join(values)Async Patterns
# Concurrent execution
results = await asyncio.gather(task1(), task2(), task3())
# Resource management
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
data = await response.json()
# Concurrency limit
semaphore = asyncio.Semaphore(10)
async with semaphore:
await do_work()Design Patterns
# Dependency injection (not module-level singletons)
class Service:
def __init__(self, repository: Repository) -> None:
self.repository = repository
# Composition root builds the graph once
def create_app(settings: Settings) -> Service:
return Service(repository=PostgresRepository(settings.dsn))
# Open/Closed: extend via new types, not edits
class JsonFormat:
def export(self, invoice: Invoice) -> str: ...
# Interface Segregation: small Protocols
class Workable(Protocol):
def work(self) -> None: ...
# Early return
def process(data: Data | None) -> Result:
if data is None:
return Result.empty()
# main logic hereDocumentation Patterns
def create_user(email: str, name: str) -> User:
"""Create a user account.
Args:
email: Unique email address for the account.
name: Display name for the user.
Returns:
The created user.
"""
return user_repository.create(email=email, name=name)Validation Patterns
from pydantic import BaseModel, EmailStr, Field
class CreateUserRequest(BaseModel):
email: EmailStr
age: int = Field(ge=0, le=150)OOP Patterns
# Dataclass
@dataclass
class User:
name: str
email: str
# Protocol for interfaces
class Repository(Protocol):
def get(self, id: str) -> Entity: ...
# Property
@property
def full_name(self) -> str:
return f"{self.first} {self.last}"See Also
- Recommended Tooling - Tools to enforce these standards automatically (ruff, mypy, pytest, pyscn, uv)
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.

