python-uv — Claude Code skill: Python deps via uv
Makes the agent manage Python packages through uv only, no pip or poetry. Useful when the project already runs on uv or when environments keep drifting apart.
npx skills add Mindrally/skills --skill python-uv -a claude-codeWhat python-uv does
The skill installs one rule for the agent: every dependency operation goes through uv. Add a package with uv add <package>, drop one with uv remove <package>, reconcile the environment with uv sync. There is no fallback to pip, pip-tools or poetry, even when the familiar command looks shorter.
Standalone scripts get two options. Dependencies can live inside the file in a # /// script comment block with requires-python and dependencies fields, then run with uv run script.py. Or manage them from the shell: uv add package-name --script script.py, uv remove package-name --script script.py, uv sync --script script.py.
Make sure uv itself is installed — the skill describes working with it, not installing it. And if the project deliberately uses poetry, this rule fights your setup. Either skip the skill or move the project to uv.
What it helps with
- lock Python dependencies in a single file
- add a package without touching pip
- run a script together with its dependencies
- declare dependencies inside a standalone script
- close the gap between local and CI environments
Example prompts for the agent
- Add requests to this project with uv and sync the environment
- Put the dependencies in a script block in this file and run it with uv
- Remove numpy from the script dependencies and refresh the lock
How to install python-uv
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-uv -a claude-code2Manually: put the files in place
~/.claude/skills/python-uv/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/python-uv/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-uv -a codex2Manually: put the files in place
.agents/skills/python-uv/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-uv -a cursor2Manually: put the files in place
.cursor/skills/python-uv/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills python-uv2Manually: put the files in place
.github/skills/python-uv/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-uv -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path python-uvManually: put the files in place
.devin/skills/python-uv/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-uv -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 python-uv
How do I install python-uv in Claude?
Run npx skills add Mindrally/skills --skill python-uv -a claude-code. The skill lands at ~/.claude/skills/python-uv/SKILL.md.
What does python-uv do?
It tells the agent to handle Python dependencies only through uv: uv add, uv remove, uv sync and uv run, with no pip or poetry.
Does it work if my project uses poetry?
The skill forbids pip, pip-tools and poetry for dependency management, so it will conflict with a poetry-based workflow. Move the project to uv first or leave the skill out.
Source text
SKILL.md · Apache-2.0
---
name: python-uv
description: Guidelines for Python dependency management using uv, the fast Python package installer and resolver.
metadata:
maintainer: Mindrally
source: https://github.com/Mindrally/skills
---
# Python Package Management with uv
You are an expert in Python development with uv package management.
## Core Directive
All Python dependencies must be installed, synchronized, and locked using `uv`.
Never use `pip`, `pip-tools`, or `poetry` directly for dependency management.
## Dependency Management Commands
For standard projects:
```bash
uv add <package>
uv remove <package>
uv sync
```
## Script Management
Execute scripts with proper dependency handling:
```bash
uv run script.py
```
### Manual Inline Metadata Configuration
Scripts can specify dependencies via comment blocks:
```python
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "torch",
# "torchvision",
# "opencv-python",
# "numpy",
# "matplotlib",
# "Pillow",
# "timm",
# ]
# ///
print("some python code")
```
### CLI-Based Script Dependencies
```bash
uv add package-name --script script.py
uv remove package-name --script script.py
uv sync --script script.py
```
## Key Principles
1. Always use `uv` for all package operations
2. Prefer inline script metadata for standalone scripts
3. Use `uv run` to execute scripts with their dependencies
4. Keep dependencies locked and synchronized across environments
5. Never fall back to pip or other package managers
© Mindrally · Apache-2.0 · Mindrally/skills