From pysmith
Generate pyproject.toml with uv-native dependency management and tool configurations (ruff, pytest, mypy, coverage). Use when starting a new Python project, migrating from requirements.txt to uv, or setting up modern Python tooling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pysmith:generating-pyprojectThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create or update pyproject.toml with dependencies and tool configurations.
Create or update pyproject.toml with dependencies and tool configurations.
uv add, uv sync, uv runGlob: pyproject.toml, requirements*.txt
If pyproject.toml exists, ask via AskUserQuestion:
If requirements.txt exists, ask via AskUserQuestion:
Check for project name in:
[project].nameRead the template from references/pyproject-template.toml and customize:
name to detected project namerequires-python if needed[project].dependencies[dependency-groups].devWhen migrating, parse requirements.txt and categorize:
Production deps -> [project].dependencies:
pydantic>=2.0
httpx>=0.27.0
aiobotocore>=2.15.0
Dev deps (pytest, ruff, mypy, pre-commit, etc.) -> [dependency-groups].dev:
pytest>=8.0
ruff>=0.8
mypy>=1.11
After migration, ask:
After generating pyproject.toml:
uv sync
This creates uv.lock with resolved dependencies.
Created pyproject.toml (uv-native) with:
[project]
- name: {project_name}
- dependencies: {n} production packages
[dependency-groups]
- dev: {n} development packages
[tool.*]
- ruff: linting + formatting (120 char, google docstrings)
- pytest: async mode, strict markers
- mypy: type checking
- coverage: source tracking
Note: All tool commands should be run via Makefile.local targets:
make -f Makefile.local test # NOT uv run pytest
make -f Makefile.local lint # NOT uv run ruff check .
make -f Makefile.local format # NOT uv run ruff format .
make -f Makefile.local type-check # NOT uv run mypy .
| Task | Command |
|---|---|
| Add production dep | uv add package |
| Add dev dep | uv add --dev package |
| Remove dep | uv remove package |
| Sync deps | make -f Makefile.local install-dev (preferred) or uv sync |
| Run tests | make -f Makefile.local test |
| Lint code | make -f Makefile.local lint |
| Format code | make -f Makefile.local format |
| Update lockfile | uv lock --upgrade |
Important: Always prefer Makefile targets over raw uv run commands. Makefile targets ensure correct PYTHONPATH, environment variables, and project-specific configuration. Only use uv add/uv remove/uv lock directly since these modify pyproject.toml and have no Makefile equivalent.
| Code | Category |
|---|---|
| F | Pyflakes |
| E, W | pycodestyle |
| I | isort |
| N | pep8-naming |
| D | pydocstyle |
| UP | pyupgrade |
| S | bandit (security) |
| B | flake8-bugbear |
| C4 | flake8-comprehensions |
| PT | flake8-pytest-style |
| RUF | ruff-specific |
Web frameworks:
dependencies = [
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
]
Async/AWS:
dependencies = [
"aiobotocore>=2.15.0",
"httpx>=0.27.0",
]
Database:
dependencies = [
"sqlalchemy>=2.0",
"asyncpg>=0.29.0",
"alembic>=1.13.0",
]
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jugrajsingh/skillgarden --plugin pysmith