Skip to content
nathan-gage avatar

Python Best Practices

Opinionated Python engineering rules, distilled from real PR reviews, covering data modeling, error handling, and typing.

CCM score
54 of 100
skills.sh installs
882
GitHub stars
3
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers 75 rules across 8 categories, ranked by impact, from data modeling and error handling down to imports and structure
  • Includes a quick-reference list of rule IDs (such as data-mutable-defaults and error-specific-exceptions), each with a one-line summary
  • Enforces impact levels so critical bug classes like swallowed cancellations are flagged while style nits stay opportunistic
  • Designed for writing, reviewing, or refactoring Python 3.11+ code, with asyncio guidance delegated to a separate skill

Install

$ npx -y skills add nathan-gage/python-skills --skill python-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Python Best Practices

Guidelines for writing and reviewing Python. 75 rules across 8 categories, prioritized by impact.

A rule match is a signal, not a verdict. Most rules are design preferences for new code, not bugs to fix across the repo — check the rule's impact level before flagging in review or refactoring stable code.

Quick-reference lines are triggers, not licenses: before applying a rule as a review finding or a transformation, open the rule file and check its counter-signal — the marker-opened paragraph (**When ...** / **Scope:** / **Preserve ...**) saying when NOT to apply it.

When to Apply

  • Writing new Python modules, functions, classes, or data models
  • Reviewing code for correctness or type safety
  • Refactoring patterns in code that's being edited anyway

Avoid applying these rules as a blanket sweep across stable code — the churn rarely pays off.

Impact Levels

Details

Repository
github.com/nathan-gage/python-skills
Categories
Python, Code Review & Quality
First seen
Jun 3, 2026

Similar to Python Best Practices

More Python