python-project-standards
Skill4 starsChanged 7 months agoMITArchived repositoryView on GitHub
Load when working with: pyproject.toml, Python files, pre-commit config, dependency management, type hints, linting configuration. The canonical pyproject.toml for all projects. Copy and adjust [project].name and dependencies. See resources/pre-commit-config.md for the full .pre-commit-config.yaml. Every project must have .env.example committed to repo with all required keys listed but no values. .env is always in .gitignore. Application validates all required env vars at startup via Pydantic BaseSettings. See resources/gitignore.md for the full .gitignore template covering Python, uv, ML artifacts, IDE files.
- Reads credentials
In this repository23 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- claude-api-patternsSkill
- critical-analysisSkill
- database-migration-safetySkill
- data-validationSkill
- design-doc-creatorSkill
- experiment-trackingSkill
- fastapi-patternsSkill
- github-actionsSkill
- htmx-frontendSkill
- infra-yandex-cloudSkill
- langgraph-patternsSkill
- ml-data-handlingSkill
- multimodal-routerSkill
- nlp-slm-patternsSkill
- predictive-analyticsSkill
- prompt-engineeringSkill
- rag-vector-dbSkill
- skill-developerSkill
- supply-chain-auditorSkill
- test-first-patternsSkill
- windows-developerSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 140
Every project must have .env.example committed to repo with all required keys listed but no values.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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 Load This Skill
Load when working with: pyproject.toml, Python files, pre-commit config, dependency management, type hints, linting configuration.
Stack Versions (as of 2026-Q1)
- Python:
>=3.11(minimum), prefer3.12 - uv: latest stable (replaces pip, venv, pip-tools — all in one)
- Ruff:
>=0.9.0 - MyPy:
>=1.10.0 - pre-commit:
>=3.7.0
pyproject.toml Standard Config
The canonical pyproject.toml for all projects. Copy and adjust [project].name and dependencies.
[project]
name = "project-name"
version = "0.1.0"
description = ""
readme = "README.md"
requires-python = ">=3.11"
dependencies = []
[project.optional-dependencies]
dev = [
"ruff>=0.9.0",
"mypy>=1.10.0",
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-bdd>=7.0.0",
"pytest-cov>=5.0.0",
"httpx>=0.27.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
target-version = "py311"
line-length = 100
fix = true
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # bugbear
"C4", # comprehensions
"UP", # pyupgrade
"ANN", # annotations
"S", # bandit security
"SIM", # simplify
"TCH", # type-checking imports
"RUF", # ruff-specific
]
ignore = ["ANN101", "ANN102", "S101"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "ANN"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
no_implicit_reexport = true
ignore_missing_imports = false
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "--cov=src --cov-report=term-missing --cov-fail-under=80"
[tool.coverage.run]
source = ["src"]
omit = ["tests/*", "*/migrations/*"]uv Commands Reference
uv init project-name
uv add fastapi uvicorn[standard]
uv add --dev ruff mypy pytest pytest-asyncio pytest-bdd
uv run pytest
uv run ruff check .
uv run mypy src/
uv sync
uv lockpre-commit Config Standard
See resources/pre-commit-config.md for the full .pre-commit-config.yaml.
Project File Structure
project-name/
├── src/
│ └── {project_name}/
│ ├── __init__.py
│ ├── api/
│ │ ├── __init__.py
│ │ └── routers/
│ ├── core/
│ │ └── __init__.py
│ ├── services/
│ │ └── __init__.py
│ ├── adapters/
│ │ └── __init__.py
│ └── models/
│ └── __init__.py
├── tests/
│ ├── __init__.py
│ ├── conftest.py
│ ├── unit/
│ ├── integration/
│ └── features/ # BDD .feature files
├── dev/
│ ├── status.md # ALWAYS maintained
│ └── active/ # task-specific context
├── pyproject.toml
├── uv.lock
├── .pre-commit-config.yaml
├── .gitignore
├── .env.example
├── design-doc.md
└── README.md.env.example Standard
Every project must have .env.example committed to repo with all required keys listed but no values.
.env is always in .gitignore. Application validates all required env vars at startup via Pydantic BaseSettings.
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
openrouter_api_key: str
database_url: str
environment: str = "development"
settings = Settings().gitignore Standard
See resources/gitignore.md for the full .gitignore template covering Python, uv, ML artifacts, IDE files.
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.

