Scaffold a new Python project with modern tooling (ruff, mypy, pytest, pre-commit)
Scaffold a new Python project with pre-configured modern tooling including ruff, mypy, pytest, and pre-commit hooks. Use it to instantly set up a production-ready Python project structure with linting and formatting.
/plugin marketplace add tachyon-beep/skillpacks/plugin install axiom-python-engineering@foundryside-marketplace<project-name> [--minimal|--ml]Create a new Python project with modern tooling configured correctly from the start.
Parse arguments
--minimal: Basic structure only--ml: Include ML-specific tooling (MLflow, hydra patterns)Create directory structure
project-name/
├── src/
│ └── project_name/
│ └── __init__.py
├── tests/
│ └── __init__.py
├── pyproject.toml
├── .pre-commit-config.yaml
├── .gitignore
└── README.md
Configure pyproject.toml
Configure pre-commit hooks
Initialize git and pre-commit
cd project-name && git init && pre-commit install
[project]
name = "project-name"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = []
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"mypy>=1.8",
"ruff>=0.3",
"pre-commit>=3.6",
]
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
For comprehensive project structure patterns:
Load skill: axiom-python-engineering:using-python-engineering
Then read: project-structure-and-tooling.md
User: /python-engineering:create-project-scaffold my-api
Claude:
1. Creating project structure for my-api...
├── src/my_api/__init__.py
├── tests/__init__.py
├── pyproject.toml (ruff, mypy, pytest configured)
├── .pre-commit-config.yaml
├── .gitignore
└── README.md
2. Initializing git repository...
3. Installing pre-commit hooks...
4. Project ready! Next steps:
- cd my-api
- python -m venv .venv && source .venv/bin/activate
- pip install -e ".[dev]"
- pre-commit run --all-files