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.
Generates modern pyproject.toml files with uv-native dependencies, tool configurations, and optional migration from requirements.txt.
npx claudepluginhub jugrajsingh/skillgardenThis skill is limited to using the following tools:
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].name[project]
name = "{project_name}"
version = "0.1.0"
description = ""
requires-python = ">=3.11"
dependencies = [
"pydantic>=2.0",
"pydantic-settings[yaml]>=2.0",
]
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.24",
"pytest-cov>=5.0",
"mypy>=1.11",
"ruff>=0.8",
"pre-commit>=4.0",
]
# =============================================================================
# Tool Configurations
# =============================================================================
[tool.ruff]
line-length = 120
target-version = "py311"
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
".eggs",
".idea",
".pytest_cache",
".mypy_cache",
]
[tool.ruff.lint]
select = [
"F", "E", "W", "C90", "I", "N", "D", "UP", "YTT", "ANN", "ASYNC",
"S", "BLE", "FBT", "B", "A", "COM", "C4", "DTZ", "T10", "EM",
"EXE", "FA", "ISC", "ICN", "G", "INP", "PIE", "T20", "PYI", "PT",
"Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT",
"ARG", "PTH", "TD", "FIX", "ERA", "PD", "PGH", "PL", "TRY",
"FLY", "NPY", "AIR", "PERF", "FURB", "LOG", "RUF",
]
ignore = [
"D100", "D101", "D102", "D103", "D104", "D105", "D107", # Missing docstrings
"ANN401", # Dynamically typed expressions
"S101", "S311", # Assert, pseudo-random
"FBT001", "FBT002", "FBT003", # Boolean args
"B008", # Function calls in defaults
"COM812", "ISC001", # Conflicts with formatter
"UP007", # Use X | Y (prefer Optional[X])
"EM101", "EM102", "TRY003", # Exception messages
"RET504", # Unnecessary assignment
"PLR0913", "PLR2004", # Too many args, magic values
"TD002", "TD003", "FIX002", # TODO comments
"CPY001", # Copyright notice
"G004", # Logging f-strings
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "ANN", "D", "PLR2004"]
"scripts/*" = ["T20", "INP001"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
addopts = ["-v", "--strict-markers"]
markers = [
"slow: marks tests as slow",
"integration: marks tests as integration tests",
]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.coverage.run]
source = ["."]
omit = ["*/tests/*", "*/__pycache__/*", "*/site-packages/*", ".venv/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
When 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
Commands:
uv add <package> # Add production dependency
uv add --dev <package> # Add dev dependency
uv sync # Install all dependencies
uv run pytest # Run tests
uv run ruff check . # Lint code
uv run ruff format . # Format code
| Task | Command |
|---|---|
| Add production dep | uv add package |
| Add dev dep | uv add --dev package |
| Remove dep | uv remove package |
| Sync deps | uv sync |
| Run tool | uv run tool |
| Update lockfile | uv lock --upgrade |
| 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",
]
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.