python
Skill1 starsChanged 8 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
26 other projects use a version of this.
Adopted by
Most recently taken up by
- niksavis/basiclytheir own version, first seen Oct 5, 2026
- lgzarturo/codeconductortheir own version, first seen Sep 30, 2026
- kissgyorgy/coding-agentstheir own version, first seen Sep 20, 2026
- jdharmon/skillstheir own version, first seen Sep 8, 2026
- erikhoward/agent-toolstheir own version, first seen Sep 7, 2026
- jawwad-ali/claude-code-skillstheir own version, first seen Sep 5, 2026
Used with
Projects with it also use fastapi, code-quality and 4 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.
martinholovskySkillfastapi
REST API and WebSocket development with FastAPI emphasizing security, performance, and async patterns
Also in 3 projects that use this
MicrosoftSkillcode-quality
Statically check changed C# against the same deterministic rules github-code-quality[bot] runs on pull requests, so a contributor can fix likely findings before opening the PR and keep the bot's inline comments to a minimum. Activate when a contributor asks to "check code quality", "run code quality on my changes", "will the code quality bot complain", "pre-check before I open the PR", "code quality check", or similar. Scoped to C#. Reads the diff and compares it against the enumerated csharp-code-quality rule set below — no CodeQL download or build required. This is a fast approximation of a dataflow engine, not a reproduction; report accordingly. Does NOT apply fixes unless explicitly asked.
Also in 3 projects that use this
AnthropicSkilldocumentation
Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.
Also in 3 projects that use this
BlockSkilldebugging
Debugging guidelines and best practices
Also in 3 projects that use this
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 5 projects that use this
VercelSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Also in 3 projects that use this
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- alinaqi/maggy★ 707same name
- Mindrally/skills★ 266same name
- martinholovsky/claude-skills-generator★ 47same name
- neuron-one/GODMODE★ 33same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- siviter-xyz/dot-agent★ 22same name
- sordi-ai/skill-everything★ 20same name
- alexander-danilenko/cortex-ai-skills★ 16same name
- kissgyorgy/coding-agents★ 15same name
- jnotsknab/mux-swarm★ 9same name
16 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 24 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 24 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.

