uv-usage
Skill4 starsChanged 13 months agoApache-2.0View on GitHub
Provides concise guidance for using uv (Python package manager), including project workflows, pip-compatible commands, Python version management, and PEP 723 inline script dependencies. Use when users mention uv, uv run, inline dependencies, PEP 723, or Python dependency/project management.
- Installs packages
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- branch-surgery-pr-splitSkill
- browser-qaSkill
- create-mermaid-diagramsSkill
- create-pull-requestSkill
- git-commit-conventionalSkill
- mastra-apiSkill
- tilt-devSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use uv as a fast, unified tool for Python projects:
- Very specific: line 21
Use inline metadata so a script runs standalone with uv run <script-file>.
- Very specific: line 25
Add a # /// script block at the top of the file.
- Very specific: line 27
Run the script with uv run <script-file>.
- Very specific: line 28
Add or remove inline deps with uv add --script and uv remove --script.
- Distinctive: line 57
Use these for drop-in workflows or legacy projects:
- Very specific: line 95
Use uvx <tool> (alias for uv tool run) to run tools ephemerally without installing them globally.
- Very specific: line 96
Prefer project workflow (uv add, uv sync) for new work, and run uv lock when re-locking after manual pyproject.toml changes.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
uv Usage
Quick start
Use uv as a fast, unified tool for Python projects:
- Initialize a project:
uv init - Add deps:
uv add <package> - Sync env:
uv sync - Run commands:
uv run <cmd>
uv add updates uv.lock automatically; use uv lock when you need to re-lock after manual pyproject.toml edits.
Inline dependencies (PEP 723 scripts)
Use inline metadata so a script runs standalone with uv run <script-file>.
Steps
- Add a
# /// scriptblock at the top of the file. - Set
requires-pythonanddependencies. - Run the script with
uv run <script-file>. - Add or remove inline deps with
uv add --scriptanduv remove --script.
Template
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "requests>=2.31",
# "rich>=13.0",
# ]
# ///
import requests
from rich import print
print(requests.get("https://api.github.com/repos/astral-sh/uv").status_code)Commands
uv run script.py
uv add --script script.py beautifulsoup4
uv remove --script script.py richPip-compatible commands
Use these for drop-in workflows or legacy projects:
uv pip install <package>
uv pip install -r requirements.txt
uv pip compile requirements.in -o requirements.txt
uv pip sync requirements.txtPython versions and environments
uv python install 3.12
uv python pin 3.12
uv venv --python 3.12
uv run --python 3.12 -- python -VExamples
New project
uv init demo
cd demo
uv add ruff
uv run ruff check .Standalone script with inline deps
uv run script.pyNotes
- uv offers pip-compatible commands, but behavior can differ in edge cases.
- Use
uvx <tool>(alias foruv tool run) to run tools ephemerally without installing them globally. - Prefer project workflow (
uv add,uv sync) for new work, and runuv lockwhen re-locking after manualpyproject.tomlchanges.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

