Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill python-uv -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/python-uv/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/python-uv/

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

Similar skills

All skills for Programming languages →

From the same set168

internationalization-i18n This skill gives the agent a rulebook for internationalization: translations, locale-aware dates and numbers, RTL layout. Useful when an app ships in more than one language. CX Codex +1 978installs java A skill that tells the agent how to write Java: layered structure, Spring Boot 3.x, JUnit and Mockito tests. Useful when a Java codebase needs one consistent style. CX Codex +1 966installs zustand-state-management Enforces Zustand store best practices in React and TypeScript apps, covering store slices, SSR, and testing. It helps eliminate selector re-renders and hydration bugs. CX Codex +1 959installs typescript Enforces strict TypeScript standards and functional code patterns in your AI assistant. It bans any, replaces enums with maps, and caps function length at 20 lines. CX Codex +1 955installs pixi-js A skill that steers your coding agent toward performant Pixi.js games in TypeScript, with mobile and rendering advice baked in. CX Codex +1 948installs deep-learning Gives your agent a rulebook for neural network work: layer design, optimizers, mixed precision, memory. Useful when you write or refactor model code. CX Codex +1 946installs react This skill gives your agent a fixed React style: hooks, Server Components, Tailwind, TypeScript. Useful when several people or agents touch the same codebase. CX Codex +1 944installs sequelize A skill that gives your agent rules for writing Sequelize code: models, associations, migrations and queries. Useful for Node.js projects on a relational database. CX Codex +1 942installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor