python
Skill15 starsChanged 9 months agoMITView on GitHub
Google's official Python style guide extending PEP 8. Covers type annotations, Google-style docstrings, imports, naming conventions, f-strings, comprehensions, and exception handling. Enforces 80-char line length and 4-space indentation.
44 other projects use a version of this.
Adopted by
Most recently taken up by
- niksavis/handilytheir own version, first seen Nov 8, 2026
- niksavis/basiclytheir own version, first seen Nov 7, 2026
- its-ash/skillstheir own version, first seen Nov 1, 2026
- shubh3794/claude-code-portabletheir own version, first seen Nov 1, 2026
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Nov 1, 2026
- hmj1026/dhpktheir own version, first seen Nov 1, 2026
Used with
Projects with it also use android-kotlin, flutter and 6 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.
alinaqiSkillandroid-kotlin
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing
Also in 4 projects that use this
ffsshhttiikkSkillflutter
Flutter cross-platform framework
Also in 4 projects that use this
mcollinaSkillnode
Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.
Also in 4 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 7 projects that use this
dylantarreSkillangular
Builds token-driven Angular components with signals and standalone components. Use when creating Angular component libraries, integrating design tokens, or building design system components with new control flow syntax.
Also in 3 projects that use this
jsshin-hamsterlabSkillgemini-review
This skill orchestrates code review and plan validation using Google Gemini CLI. It should be used when users want to validate implementation plans, review completed code, or discuss architecture decisions with Gemini as a second opinion. Supports FastAPI, Next.js, and general tech stacks with specialized checklists. Uses gemini-3-pro-preview model with free tier (60 req/min, 1000 req/day).
Also in 3 projects that use this
Other versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- alinaqi/maggy★ 711same name
- alinaqi/claude-bootstrap★ 708same name
- Mindrally/skills★ 275same name
- kid-sid/claude-spellbook★ 190same name
- hass-energy/haeo★ 77same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- maroffo/claude-forge★ 17same name
- G1Joshi/Agent-Skills★ 15same name
- kissgyorgy/coding-agents★ 15same name
- harness-studio/harness-studio★ 9same name
34 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 repository17 other files it gives its agents.
- angularjsSkill
- common-lispSkill
- cppSkill
- csharpSkill
- goSkill
- html-cssSkill
- javascriptSkill
- javaSkill
- jsonSkill
- markdownSkill
- objective-cSkill
- rSkill
- shellSkill
- google-styleguides-skillsSkill
- swiftSkill
- typescriptSkill
- vim-scriptSkill
The file
Files
Google Python Style Guide
Official Google Python coding standards extending PEP 8.
Golden Rules
- Follow PEP 8 as baseline — Google's guide extends it
- Use type annotations for all public functions and methods
- 4-space indentation — no tabs
- Maximum line length: 80 characters
- Docstrings mandatory for all public modules, functions, classes, methods
- Prefer comprehensions over
map()/filter() - Use f-strings for string formatting (Python 3.6+)
Quick Reference
Naming Conventions
| Element | Convention | Example |
| Modules | snake_case | user_service.py |
| Classes | UpperCamelCase | UserService |
| Functions/Methods | snake_case | get_user_by_id |
| Variables | snake_case | user_count |
| Constants | UPPER_SNAKE_CASE | MAX_RETRIES |
| Protected | _single_leading | _internal |
| Private | __double_leading | __private |
Type Annotations
# ✓ CORRECT
def get_user(user_id: int) -> Optional[dict]:
...
def process_items(items: List[str], max_count: int = 10) -> List[str]:
...
# ✗ INCORRECT
def get_user(user_id): # missing type annotations
...Docstrings (Google Style)
def fetch_data(url: str, timeout: int = 30) -> dict:
"""Fetches data from the given URL.
Args:
url: The URL to fetch data from.
timeout: Request timeout in seconds. Defaults to 30.
Returns:
A dictionary containing the response data.
Raises:
ValueError: If the URL is invalid.
"""
...Imports
# ✓ CORRECT - stdlib, then third-party, then local
import os
import sys
from typing import Optional, List
import numpy as np
from myproject import utils
# ✗ INCORRECT
import os, sys # one import per line
from os.path import * # never wildcard importsString Formatting
# ✓ CORRECT - f-strings
name = "Alice"
greeting = f"Hello, {name}!"
# ✗ INCORRECT
greeting = "Hello, " + name + "!" # use f-strings
greeting = "Hello, %s!" % name # use f-stringsComprehensions
# ✓ CORRECT
squares = [x ** 2 for x in range(10)]
user_map = {user.id: user for user in users}
evens = [x for x in range(20) if x % 2 == 0]
# ✗ INCORRECT
squares = list(map(lambda x: x ** 2, range(10))) # use comprehensionException Handling
# ✓ CORRECT - catch specific exceptions
try:
data = json.loads(raw_input)
except json.JSONDecodeError as e:
raise ValueError(f"Could not parse: {e}") from e
# ✗ INCORRECT
try:
...
except: # never bare except
passDefault Arguments
# ✗ INCORRECT - mutable default arguments
def add_item(item: str, items: List[str] = []) -> List[str]: # BAD!
items.append(item)
return items
# ✓ CORRECT - use None for mutable defaults
def add_item(item: str, items: Optional[List[str]] = None) -> List[str]:
if items is None:
items = []
items.append(item)
return itemsCommon Mistakes
| Mistake | Correct Approach |
| Mutable default args | Use None as default |
| Wildcard imports | Explicit imports only |
Bare except | Catch specific exceptions |
% or .format() strings | Use f-strings |
map()/filter() | Use comprehensions |
| Missing docstrings | Add Google-style docstrings |
| Missing type annotations | Annotate public functions |
When to Use This Guide
- Writing new Python code
- Refactoring existing Python
- Code reviews
- Setting up linting rules (pylint, flake8)
- Onboarding new team members
Install
npx skills add testdino-hq/google-styleguides-skills/pythonFull Guide
See python.md for complete details, examples, and edge cases.
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.

