python
Skill1 starsChanged 7 months agoMITView on GitHub
Python project conventions and coding standards. Use when: creating a new Python project, writing Python modules, setting up pyproject.toml, configuring Python dependencies, writing Python tests, scaffolding Python Lambda functions, auditing Python code for type safety and convention compliance, or improving an existing Python codebase. Covers type hints, pydantic, docstrings, and dependency management.
- Reads credentials
44 other projects use a version of this.
Adopted by
Most recently taken up by
- niksavis/handilytheir own version, first seen Nov 8, 2026
- testdino-hq/google-styleguides-skillstheir 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
Used with
Projects with it also use android-kotlin, java and 8 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
testdino-hqSkilljava
Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.
Also in 6 projects that use this
testdino-hqSkillcsharp
Google's official C# style guide. Covers naming conventions, formatting, LINQ, async/await, XML documentation, and .NET best practices.
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
- +1 more from testdino-hq
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
- testdino-hq/google-styleguides-skills★ 15same 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 repository42 other files it gives its agents.
- accessibility-testingSkill
- alternatives-analysisSkill
- anomaly-detectionSkill
- api-designSkill
- async-messagingSkill
- caching-strategiesSkill
- chartsSkill
- cicdSkill
- code-reviewSkill
- commsSkill
- critical-feedbackSkill
- data-analysisSkill
- databaseSkill
- data-migrationsSkill
- data-visualizationSkill
- dependency-managementSkill
- dockerSkill
- error-handlingSkill
- feature-flagsSkill
- git-workflowSkill
- goalsSkill
- ide-setupSkill
- large-changeSkill
- logging-metricsSkill
- markdown-docsSkill
- mcp-serverSkill
- meeting-agendasSkill
- okrsSkill
- presentationsSkill
- product-managementSkill
- prompt-writingSkill
- reclassificationSkill
- release-managementSkill
- retrospectivesSkill
- roadmap-planningSkill
- securitySkill
- stakeholder-commsSkill
- statisticsSkill
- status-updatesSkill
- testingSkill
- ticket-writingSkill
- typescriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 7 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 40 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use the latest Python language features:
- Very specific: line 36
Use uv as the package and project manager.
- Very specific: line 56
Use pyproject.toml as the single source for all project metadata and dependencies.
- Very specific: line 83
Use Pydantic BaseModel as the default for all structured data that crosses a function or module boundary: API request/response models, …
- Very specific: line 106
Use pydantic-settings for environment-based configuration.
- Very specific: line 131
Never use plain dict for structured data that crosses a function or module boundary.
- Distinctive: line 135
Write docstrings following Google docstring standards.
- Very specific: line 157
Use specific exception types rather than bare except.
- Very specific: line 161
Use the logging module, never print() for operational output.
- Distinctive: line 162
Use appropriate log levels: DEBUG for detail, INFO for progress, WARNING for recoverable issues, ERROR for failures.
- Distinctive: line 166
Use Ruff for both linting and formatting.
- Distinctive: line 183
Use pytest as the test framework.
- Distinctive: line 185
Use descriptive test class and method names that read as specifications.
- Very specific: line 187
Use tmp_path fixture for file system tests.
- Distinctive: line 188
Test edge cases: empty inputs, missing config, error conditions, boundary values.
“Common” is measured: kept by at least 6 in 10 of the 40 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 Project Standards
When to Use
- Creating a new Python project or module
- Setting up pyproject.toml and dependency management
- Writing Python functions, classes, or scripts
- Scaffolding Python-based AWS Lambda functions
- Auditing an existing Python project for type hint coverage, missing Ruff config, or dependency management gaps
- Upgrading Python projects to modern conventions (union types, pathlib, pydantic v2)
Python Version
Target Python 3.12+ unless constraints require otherwise.
Language Features
Use the latest Python language features:
- Type hints on all function signatures and return types
- f-strings for string formatting
- List and dict comprehensions where they improve readability
- Union types using
X | Ysyntax (Python 3.10+) - Match statements where appropriate (Python 3.10+)
- Walrus operator (
:=) where it improves readability
Package Management
Use uv as the package and project manager. It is substantially faster than pip and handles virtual environments, lockfiles, and workspaces in a single tool.
# Create a new project
uv init my-project && cd my-project
# Add runtime dependencies
uv add fastapi mangum pydantic pydantic-settings
# Add dev-only dependencies (not bundled in Lambda)
uv add --dev pytest ruff mypy boto3
# Run tools within the project environment
uv run pytest
uv run ruff check .
# Sync environment from lockfile (CI / fresh checkout)
uv sync- Use
pyproject.tomlas the single source for all project metadata and dependencies. - The
uv.locklockfile must be committed to version control for reproducible installs. - For AWS Lambda deployment, packages already in the Lambda runtime (
boto3,botocore) belong in[dependency-groups] dev— not bundled in the artifact.
[project]
name = "my-project"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = [
"fastapi",
"mangum",
"pydantic",
"pydantic-settings",
]
[dependency-groups]
dev = [
"boto3",
"pytest",
"ruff",
"mypy",
]Data Modeling with Pydantic
Use Pydantic BaseModel as the default for all structured data that crosses a function or module boundary: API request/response models, configuration, and any externally-sourced data.
Request and Response Models
from datetime import datetime
from pydantic import BaseModel, Field
class CreateProjectRequest(BaseModel):
name: str = Field(..., min_length=1, max_length=100)
description: str = Field(default="", max_length=500)
is_public: bool = False
class ProjectResponse(BaseModel):
id: str
name: str
description: str
is_public: bool
created_at: datetimeConfiguration with BaseSettings
Use pydantic-settings for environment-based configuration. It reads env vars automatically and validates types at startup — fail fast before any work begins:
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
service_name: str = "my-api"
stage: str = "dev"
database_url: str # required — no default
api_key: str # required — no default
max_retries: int = 3
model_config = {"env_file": ".env", "env_prefix": "APP_"}
settings = Settings() # reads APP_DATABASE_URL, APP_API_KEY, etc.Choosing the Right Type
| Use | When |
BaseModel | Validation needed, API boundaries, config, JSON parsing |
@dataclass | Pure data containers with no validation or serialization |
TypedDict | Typing only — no runtime instances, plain dict interop |
Never use plain dict for structured data that crosses a function or module boundary.
Documentation
- Write docstrings following Google docstring standards.
def process_items(items: list[str], max_count: int = 10) -> dict[str, int]:
"""Process a list of items and return frequency counts.
Args:
items: List of item names to process.
max_count: Maximum number of items to include in results.
Returns:
Dictionary mapping item names to their frequency counts.
Raises:
ValueError: If items list is empty.
"""Error Handling
- Wrap main logic in try/except blocks.
- Log errors before re-raising or returning error codes.
- Use specific exception types rather than bare
except.
Logging
- Use the
loggingmodule, neverprint()for operational output. - Use appropriate log levels: DEBUG for detail, INFO for progress, WARNING for recoverable issues, ERROR for failures.
Linting and Formatting
- Use Ruff for both linting and formatting.
- Configure Ruff in
pyproject.toml:
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "UP", "B", "SIM"]
[tool.mypy]
strict = trueTesting
- Use pytest as the test framework.
- Name test files
test_<module>.pyand test functionstest_<behavior>. - Use descriptive test class and method names that read as specifications.
- Mock external dependencies (APIs, file systems, databases).
- Use
tmp_pathfixture for file system tests. - Test edge cases: empty inputs, missing config, error conditions, boundary values.
IDE Integration
For VS Code / Cursor configuration with Pylance type checking, Ruff format-on-save, uv virtual environment discovery, and pytest test runner, see the ide-setup skill. For FastAPI web server patterns and Lambda deployment, see the python-web-server skill. For general testing strategy and coverage thresholds, see the testing skill. For data pipeline development with dlt, see the data-pipelines skill. For DataFrame analysis workflows with pandas, Polars, and DuckDB, see the data-analysis skill.
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.

