wdm0006/python-skills/project-setup
Claude Code and agent skill by wdm0006/python-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Sets up professional Python library projects with modern tooling (pyproject.toml, uv, ruff, pytest, pre-commit, GitHub Actions). Use when creating new Python libraries, modernizing existing projects to pyproject.toml, configuring linting/testing/CI, or setting up Makefiles and pre-commit hooks.
Install
npx vskill@latest install wdm0006/python-skills/project-setupSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Python Library Project Setup
Quick Start
Create a new library with this structure:
Use src/ layout to prevent accidental imports of development code.
Core Configuration
For complete templates, see:
- [PYPROJECT.md](PYPROJECT.md) - Full pyproject.toml with all tool configs
- [CI.md](CI.md) - GitHub Actions and pre-commit setup
- [MAKEFILE.md](MAKEFILE.md) - Makefile automation patterns
Minimal pyproject.toml
Essential Commands
Keep local checks identical to CI
The most common CI failure is not a bug — it's a check that passes locally but fails in CI (or vice versa) because the two run different commands. Two rules prevent an entire class of "green locally, red in CI" (and chronically-red base branch) problems:
1. `make lint` must be read-only — never `--fix`. A lint target that runs ruff check --fix mutates your files and almost always exits 0, so pre-existing violations silently sit on the branch while CI's read-only ruff check goes red. Put --fix only in format and the pre-commit hook. make lint should run the exact commands CI runs.
2. CI (and `make lint`) must check formatting too. ruff check and ruff format are different tools: the linter passing says nothing about formatting. Gate on both, or formatting drift ships / turns a branch red unexpectedly:
Lint the same paths in the Makefile and CI (add examples/, docs/, etc. if they contain Python) — a narrower local scope lets violations accumulate in dirs CI checks. Configure ruff under [tool.ruff.lint] (not the deprecated top-level select/ignore), and keep requires-python and [tool.ruff] target-version in sync so ruff doesn't apply upgrade rules for a version you don't support.
For coverage, prefer running pytest --cov with a terminal report (--cov-report=term-missing) in the CI log over uploading to a third-party service — no external account, token, or network dependency in the gate.
Key Decisions
| Choice | Recommendation | Why | |
|---|---|---|---|
| Layout | src/ | Catches packaging bugs early | |
| Build backend | setuptools | Mature, broad compatibility | |
| Linter | ruff | Fast, replaces flake8+isort+black | |
| Python range | >=3.10 | Don't pin exact versions | |
| Dependencies | Minimal | Move optional deps to extras |
Checklist
Helper Script
Create a new project structure:
--license takes an SPDX identifier (default MIT); a LICENSE file is generated for MIT and BSD-3-Clause.
Learn More
This skill is based on the Guide to Developing High-Quality Python Libraries by Will McGinnis. See these posts for deeper coverage:
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/python/project-setup/SKILL.md
Popularity
- Repository stars
- 95
- Repository forks
- 14
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 May 2026, 5 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wdm0006/python-skills/project-setup)