uv-project-management — Claude Code skill: Python projects with uv
A skill that walks the agent through uv commands: project init, dependency changes, uv.lock and pyproject.toml.
npx skills add laurigates/claude-plugins --skill uv-project-management -a claude-codeWhat uv-project-management does
The skill fires when a conversation touches uv, new Python projects, dependencies, lockfiles or pyproject.toml. The agent gets a cheat sheet for uv init, uv add, uv remove, uv lock and uv sync, with command forms and the directory layout uv creates on its own.
A routing table sits inside. Everyday dependency work belongs here; running one-off scripts, git and path dependencies, workspaces and interpreter versions get handed to sibling skills. There is a pyproject.toml template with [project] and [build-system] sections, plus examples of dependency groups: --dev for tests and linters, --group docs for documentation.
Tool access is narrow: Bash, Read, Grep, Glob. The skill installs nothing itself, so a working uv on the machine is a prerequisite — without it the commands in the cheat sheet go nowhere. For CI, uv lock --frozen and uv sync --locked matter: the second one fails when the lockfile is stale, which is your cue to check whether uv.lock was committed.
What it helps with
- scaffold a new Python project in one command
- add a version-pinned dependency without breaking the lockfile
- move packages from
requirements.txtintopyproject.toml - upgrade a single library and leave the rest alone
- fail a CI job when the lockfile drifts from the environment
Example prompts for the agent
- init a new Python project with uv and add pytest
- add fastapi and uvicorn to the project dependencies
- upgrade only requests in uv.lock and sync the environment
How to install uv-project-management
1Skills CLI (Vercel)
npx skills add laurigates/claude-plugins --skill uv-project-management -a claude-code2Manually: put the files in place
~/.claude/skills/uv-project-management/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/uv-project-management/
1Skills CLI (Vercel)
npx skills add laurigates/claude-plugins --skill uv-project-management -a codex2Manually: put the files in place
.agents/skills/uv-project-management/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add laurigates/claude-plugins --skill uv-project-management -a cursor2Manually: put the files in place
.cursor/skills/uv-project-management/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install laurigates/claude-plugins uv-project-management2Manually: put the files in place
.github/skills/uv-project-management/SKILL.md1Skills CLI (Vercel)
npx skills add laurigates/claude-plugins --skill uv-project-management -a gemini-cli2Platform CLI
gemini skills install https://github.com/laurigates/claude-plugins --path python-plugin/skills/uv-project-managementManually: put the files in place
.devin/skills/uv-project-management/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add laurigates/claude-plugins --skill uv-project-management -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about uv-project-management
How do I install uv-project-management in Claude?
Run npx skills add laurigates/claude-plugins --skill uv-project-management -a claude-code. The skill file lands at ~/.claude/skills/uv-project-management/SKILL.md.
What does uv-project-management do?
It gives the agent a uv reference: project init, adding and removing dependencies, lockfile handling and environment sync. You do not invoke it by hand — it triggers on mentions of uv or pyproject.toml.
How is it different from the other uv skills?
This one covers daily operations: uv init, uv add, uv remove, uv lock, uv sync. Script running, git and path dependencies, workspaces and Python versions live in separate skills, and the table inside points you there.
Source text
SKILL.md · MIT
---
created: 2025-12-16
modified: 2026-05-09
reviewed: 2026-04-25
name: uv-project-management
description: Python project setup, deps, and lockfiles with uv. Use when the user mentions uv, creating Python projects, managing dependencies, lockfiles, or pyproject.toml.
user-invocable: false
allowed-tools: Bash, Read, Grep, Glob
---
# UV Project Management
Quick reference for UV project setup, dependencies, and lockfiles.
## When to Use This Skill
| Use this skill when... | Use a focused sibling instead when... |
|---|---|
| Running `uv init`, `uv add`, `uv remove`, `uv lock`, or `uv sync` for everyday dependency management | Running a script or one-off command — use uv-run |
| Authoring or editing pyproject.toml `[project]` and `[tool.uv]` sections | Wiring git/path/editable deps or workspace inheritance — use uv-advanced-dependencies |
| Bootstrapping a new single-package Python project | Splitting a repo into multi-package workspaces — use uv-workspaces |
## When This Skill Applies
- Initializing new Python projects (`uv init`)
- Adding, removing, or updating dependencies (`uv add`, `uv remove`)
- Managing lockfiles (`uv lock`)
- Syncing project environments (`uv sync`)
- Configuring pyproject.toml
For running scripts, see **uv-run** skill.
## Quick Reference
### Project Initialization
```bash
# Create new project with complete structure
uv init my-project
cd my-project
# Initialize in existing directory
uv init
# Initialize with specific Python version
uv init --python 3.11 my-app
```
### Dependency Management
```bash
# Add dependencies
uv add requests
uv add 'flask>=2.0'
uv add 'django>=4.0,<5.0'
# Add development dependencies
uv add --dev pytest pytest-cov black
# Add optional dependency groups
uv add --group docs sphinx sphinx-rtd-theme
# Remove dependencies
uv remove requests flask
# Migrate from requirements.txt
uv add -r requirements.txt
```
### Lockfile Operations
```bash
# Create/update lockfile (uv.lock)
uv lock
# Lock with upgraded packages
uv lock --upgrade-package requests
uv lock --upgrade
# Lock without installing (CI/CD)
uv lock --frozen
```
### Environment Synchronization
```bash
# Sync environment to lockfile
uv sync
# Sync without updating lockfile
uv sync --frozen
# Error if lockfile is out of date
uv sync --locked
```
## Project Structure
UV projects follow this standard structure:
```
my-project/
├── pyproject.toml # Project metadata and dependencies
├── uv.lock # Locked dependency versions
├── .venv/ # Virtual environment (auto-created)
├── README.md
└── src/
└── my_project/
└── __init__.py
```
## Generated pyproject.toml
```toml
[project]
name = "my-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
dependencies = []
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
```
## Common Workflows
### Starting a New Project
```bash
uv init my-app && cd my-app
uv add ruff pytest
uv run pytest
```
### Adding Multiple Dependencies
```bash
# Production dependencies
uv add fastapi uvicorn 'pydantic>=2.0'
# Development tooling
uv add --dev pytest pytest-cov ruff ty
# Documentation
uv add --group docs sphinx mkdocs-material
```
### Updating Dependencies
```bash
# Update specific package
uv lock --upgrade-package requests
# Update all dependencies
uv lock --upgrade
# Sync after update
uv sync
```
## Key Features
- **Fast**: 10-100x faster than pip
- **Deterministic**: Lockfile ensures reproducible installs
- **Automatic**: Creates and manages virtual environments
- **Modern**: Uses pyproject.toml for configuration
- **Compatible**: Works with pip, Poetry, and other tools
## See Also
- **uv-run** - Running scripts, temporary dependencies, PEP 723
- **uv-python-versions** - Managing Python interpreter versions
- **uv-workspaces** - Monorepo and multi-package projects
- **uv-advanced-dependencies** - Git, path, and constraint dependencies
- **uv-tool-management** - Installing CLI tools globally
- **python-testing** - Running tests with pytest
- **python-code-quality** - Linting and formatting with ruff
## References
- Official docs: https://docs.astral.sh/uv/
- GitHub: https://github.com/astral-sh/uv
- Detailed guide: See REFERENCE.md in this skill directory
© laurigates · MIT · laurigates/claude-plugins