python-project-setup

Solid

Sets up Python projects with modern tooling including pyproject.toml, linting with ruff, formatting, type checking with mypy or pyright, testing with pytest, and pre-commit hooks. Triggers on: "setup Python project", "create Python package", "python project structure", "pyproject.toml".

Code & Development 7 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
30
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Python Project Setup ## Instructions ### Step 1: Gather Requirements Ask: 1. What type of project? (library/package, web app, CLI tool, data pipeline) 2. Minimum Python version? (default: 3.11+) 3. Package manager preference? (pip, uv, poetry, pdm) 4. Layout preference? (src-layout or flat-layout) 5. What frameworks? (FastAPI, Django, Flask, Click, Typer) 6. CI platform? (GitHub Actions, GitLab CI) ### Step 2: Project Structure **src-layout (recommended for libraries):** ``` my-project/ src/ my_package/ __init__.py main.py models.py tests/ __init__.py conftest.py test_main.py pyproject.toml README.md .pre-commit-config.yaml .github/ workflows/ ci.yml ``` **flat-layout (simpler, for apps):** ``` my-project/ my_package/ __init__.py main.py tests/ conftest.py test_main.py pyproject.toml README.md ``` Use src-layout by default. It prevents accidental imports of the source during testing. ### Step 3: Generate pyproject.toml ```toml [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "my-package" version = "0.1.0" description = "A brief description of the project" readme = "README.md" license = "MIT" requires-python = ">=3.11" authors = [ { name = "Your Name", email = "you@example.com" }, ] dependencies = [] [project.optional-dependencies] dev = [ "pytest>=8.0", "pytest-cov>=5.0", "ruff>=0.4", "mypy>=1.10", "pre-commit>=3.7", ] ...

Details

Author
timwukp
Repository
timwukp/agent-skills-best-practice
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Solid

python-build-tools

Python project tooling with uv, mise, ruff, basedpyright, and pytest. Use when setting up pyproject.toml, running builds, typechecking, configuring tests, linting, formatting, or managing Python environments.

38 Updated 5 days ago
martinffx
AI & Automation Solid

python-dev

Opinionated Python development setup with uv + ty + ruff + pytest + just. Use when creating new Python projects, setting up pyproject.toml, configuring linting, type checking, testing, or build tooling. Triggers on "python project", "uv init", "pyproject.toml", "ruff config", "ty check", "pytest setup", "justfile", "python linting", "python formatting", "type checking python".

31 Updated 3 days ago
tenequm
AI & Automation Listed

python-project-standard

Enforce a strict, type-safe, model-agnostic, AI-navigable Python project standard: mypy --strict + beartype runtime type-checking + pydantic at boundaries + provider Protocol seams (zero-SDK core) + src layout with a real package name + domain-first deep structure + centralized config/logging/prompts + a one-command zero-warning gate + drift guards. Use this whenever starting or scaffolding a new Python project, service, or package; setting up pyproject/ruff/mypy/pytest; deciding where code, config, or prompts belong; adding type checking, runtime validation, or an LLM/embedding/vector-store dependency; organizing or deepening package structure; wiring providers; setting up CI or pre-commit; or checking that an existing Python project conforms. Apply it even when the user only says "start a Python project", "set up the repo", "add types", "wire up an LLM", or "structure this", without naming the standard.

1 Updated 1 weeks ago
VoldemortGin