SKILL.md
Setup Python Project
Overview
Create the default Python project scaffold used in this repo: standard folders plus uv/ruff/ty/pre-commit configuration. Use the templates in assets/ and then update placeholders.
Inputs to confirm
- Project root path
- Project name for
pyproject.toml - Description and version (default
0.1.0) - Python version (default
3.12.7with>=3.12,<3.13) - Extra dependencies and whether to create
tests/
Workflow
- Create the project directory (or confirm an empty root).
- Create standard folders:
data,docs,output,sample,scripts,src, optionaltests. - Copy templates from
assets/to the project root:
- .python-version - .gitignore - .pre-commit-config.yaml - pyproject.toml - README.md - main.py (optional)
- Edit
pyproject.toml:
- Set project.name, description, version. - Adjust dependencies (keep pre-commit, ruff, pytest, ty unless requested otherwise). - Update requires-python if the project targets a different Python.
- Append
assets/uv-custom-indexes.tomltopyproject.tomlwhen custom uv indexes are required. - Run
uv syncto generate.venvanduv.lock. - Install hooks:
uv run pre-commit install; optionally runuv run pre-commit run --all-files. - Sanity-check tools:
uv run ruff format .,uv run ruff check .,uv run ty check src scripts.
Notes
- The pre-commit
unittesthook prints a skip message whentests/is missing. - Keep
.gitignorealigned with the standarddata/andoutput/directories.