dotfiles/claude-code/skills/python/SKILL.md
Python development. Auto-load when working in Python projects (pyproject.toml, .py files, uv.lock, .python-version detected, pip, poetry, venv).
npx skillsauth add jimweller/dotfiles pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
STARTER_CHARACTER = 🐍
uv is the only package manager. Never use pip, poetry, pipenv, conda, or bare python/python3 commands.
Always use src layout with a proper package. Never write loose scripts in the project root.
<project-name>/
├── pyproject.toml
├── uv.lock
├── .python-version
├── .envrc
├── src/
│ └── <package_name>/
│ ├── __init__.py
│ └── ...
└── tests/
├── conftest.py
├── unit/
├── integration/
├── contract/
├── property/
├── regression/
├── smoke/
└── e2e/
Virtual environment lives at .venv/ at the project root. Never venv/ or env/.
Use uv init --lib defaults for [build-system]. Do not override the build backend.
[project]
name = "<package-name>"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = []
[project.scripts]
<cli-name> = "<package_name>.__main__:main"
[dependency-groups]
dev = [
"pytest>=8",
"pytest-cov",
"ruff",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=src --cov-report=term-missing"
[tool.coverage.report]
fail_under = 90
[tool.ruff]
line-length = 100
Use [dependency-groups] for dev deps. Older projects may use [project.optional-dependencies] but new projects use dependency-groups.
Pytest config lives in pyproject.toml. Never create a separate pytest.ini.
Set .python-version at the project root. Match requires-python in pyproject.toml to that version.
| Directory | Purpose | |-----------|---------| | tests/unit/ | Isolated unit tests with mocks | | tests/integration/ | Tests across real subsystems | | tests/contract/ | Interface contract verification | | tests/property/ | Property-based tests | | tests/regression/ | Bug regression coverage | | tests/smoke/ | Minimal viability verification | | tests/e2e/ | Full end-to-end workflow tests |
Run tests: uv run pytest
For async code: add pytest-asyncio and set asyncio_mode = "auto" in [tool.pytest.ini_options].
uv run ruff check . # lint
uv run ruff format . # format (ruff)
uv run black . # format (black)
Line length is 100 for both ruff and black.
Use uv init --lib <name> to scaffold. Edit pyproject.toml to add dependency-groups and tool config per the template above. Run uv sync to create .venv and install deps.
Source .envrc before running scripts when present:
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) && [[ -f "$PROJECT_ROOT/.envrc" ]] && source "$PROJECT_ROOT/.envrc"
testing
Search saved session transcripts for past decisions, actions, errors, and context that has left the current conversation window.
data-ai
Review a PRD for defects via Claude opus subagent.
development
Markdown authoring guidelines for formatting, code blocks, and structure. Use when writing or editing markdown files.
development
--- name: md-style description: README style guide for concise, direct documentation. Use when writing or editing README files. ß--- <!-- markdownlint-disable-file MD041 --> # README Style Guide Write concise, direct README files for experienced engineers. ## Principles - **No fluff** - Skip tables of contents, verbose explanations, development history - **No roadmaps** - Document current state only, not plans or decisions. Readme is an engineering specification. Not a project plan or chan