pattern-engineer-pythonlisted
Install: claude install-skill MartinKChen/harness-claude-code
# pattern-engineer-python
## When to activate
Activate when writing or editing any `.py` file, scaffolding a Python service, modifying `pyproject.toml`, working with FastAPI / Flask / Django / SQLAlchemy / Pydantic / pytest, or running `mypy` / `ruff` / `bandit` / `pytest` / `uv`. Skip for non-Python code.
## Project memory overlay
After loading this skill, also check `$MAIN_ROOT/.claude/memory/patterns/pattern-engineer-python.md` in the consuming project (resolve `MAIN_ROOT="$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")"`). If present, load it as an **additive overlay** to the rules below; if absent, skip silently. See `memory-convention` for the full contract (additivity, severity floor, conflict surfacing).
## Patterns
### Environment — `uv` only
- `uv` is the only supported environment / dependency manager.
- No `pip`, `poetry`, `pipenv`, `conda`, `virtualenv` workflows.
- Pin Python version in `pyproject.toml` via `requires-python`.
- Commit `uv.lock`; never edit by hand.
- Prefer `uv run <cmd>` over activating the venv in scripts.
| Command | Purpose |
|---------|---------|
| `uv venv` | Create `.venv` |
| `uv sync` | Install from `pyproject.toml` + `uv.lock` |
| `uv add <pkg>` | Add a runtime dep |
| `uv add --dev <pkg>` | Add a dev dep |
| `uv run <cmd>` | Run inside the project env |
### PEP 8
- 4-space indentation, no tabs.
- Lines ≤ 88 chars (ruff default).
- `snake_case` for functions / methods / variables / modules.
- `PascalCase