Agent skill · writing content · aiskillstore

python-style-guide

Comprehensive Python programming guidelines based on Google's Python Style Guide. Use when Claude needs to write Python code, review Python code for style issues, refactor Python code, or provide Python programming guidance. Covers language rules (imports, exceptions, type annotations), style rules (naming conventions, formatting, docstrings), and best practices for clean, maintainable Python code.

Why this skill is useful

Codifies Python style guidelines that the AI could infer but now doesn't have to guess.

What it needs

About 6k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Python Style Guide Comprehensive guidelines for writing clean, maintainable Python code based on Google's Python Style Guide. Core Philosophy BE CONSISTENT. Match the style of the code around you. Use these guidelines as defaults, but always prioritize consistency with existing code. Language Rules Imports Use import statements for packages and modules only, not for individual classes or functions. Yes: No: Import Formatting Group imports: standard library, third-party, application-specific Alphabetize within each group Use absolute imports (not relative imports) One import per line (except for multiple items from typing or collections.abc) Exceptions Use exceptions appropriately. Do not suppress errors with bare except: clauses. Yes: No: Type Annotations Annotate all function signatures. Type annotations improve code readability and catch errors early. General rules: Annotate all public APIs Use built-in types (list, dict, set) instead of typing.List, etc. (Python 3.9+) Import typing symbols directly: from typing import Any, Union Use None instead of type(None) or NoneType Default Argument Values Never use mutable objects as default values in function definitions. Yes: No: True/False Evaluations Use implicit false where possible. Empty sequences, None, and 0 are false in boolean contexts. Yes: No: Comprehensions & Generators Use comprehensions and generators for simple cases. Keep them readable. Yes: No: Lambda Functions Use lambdas for one-liners only. For anything complex, define a proper function. Yes: Acceptable but prefer named function: Style Rules Line Length Maximum line length: 80 characters. Exceptions allowed for imports, URLs, and long strings that can't be broken. Indentation Use 4 spaces per indentation level. Never use tabs. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/python-style-guide

View the source on GitHub

Browse the @skills marketplace