This skill should be used when working with Python projects that use uv for package and project management. Use this skill for running Python scripts and CLI tools with `uv run`, managing dependencies, creating projects, handling virtual environments, and executing commands within isolated project environments. Essential for projects with pyproject.toml files.
ALWAYS use uv run instead of bare python in uv-managed projects.
uv run automatically:
# Run Python scripts
uv run script.py
# Run CLI tools
uv run pytest
uv run ruff check .
# Run Python modules
uv run python -m mymodule
| Task | Command |
|------|---------|
| Run script | uv run script.py |
| Run CLI tool | uv run pytest |
| Add dependency | uv add requests |
| Add dev dependency | uv add --dev pytest |
| Remove dependency | uv remove requests |
| Sync environment | uv sync |
| Update dependencies | uv lock --upgrade |
| Create project | uv init my-project |
| Need to... | Use |
|------------|-----|
| Run code in project | uv run <command> |
| Add package to project | uv add <package> |
| Run tool once without installing | uvx <tool> |
| Create new project | uv init [name] |
| Update all dependencies | uv lock --upgrade |
| Sync after pulling changes | uv sync |
| Install Python version | uv python install <version> |
uv init my-project # Application
uv init --lib my-library # Library
uv init # In current directory
uv init --python 3.12 # Specify Python version
Creates: pyproject.toml, .python-version, README.md, src/
uv add requests # Runtime
uv add 'httpx>=0.25,<0.27' # With constraints
uv add --dev pytest pytest-cov # Development
uv add --optional docs sphinx # Optional group
uv run pytest
uv run pytest --cov
uv run ruff check .
uv run mypy src/
uv lock --upgrade # Upgrade all
uv lock --upgrade-package numpy # Upgrade one
uv sync # Apply changes
uv build # Build package
uv publish # Publish to PyPI
| Type | Command |
|------|---------|
| Runtime | uv add requests |
| Development | uv add --dev pytest |
| Optional group | uv add --optional docs sphinx |
| With constraints | uv add 'numpy>=1.20,<2.0' |
Use --with for one-off operations without modifying pyproject.toml:
uv run --with httpx python -c "import httpx"
uv run --with rich --with httpx script.py
uv sync # Sync all
uv sync --no-dev # Without dev deps
uv sync --all-extras # Include optional groups
uv python install 3.12 # Install version
uv python list # List available
uv python pin 3.12 # Pin for project
uv python find # Find installations
Scripts can declare their own dependencies, isolated from the project:
# /// script
# dependencies = [
# "requests<3",
# "rich",
# ]
# requires-python = ">=3.12"
# ///
import requests
import rich
uv init --script analyze.py --python 3.12 # Create script
uv add --script analyze.py pandas # Add dependency
uv run analyze.py # Run (uses inline deps)
uv lock --script analyze.py # Lock dependencies
Note: Scripts with inline metadata ignore project dependencies.
uvx ruff check . # Run tool ephemerally
uvx black --check .
uv tool install ruff # Install globally
uv tool list # List installed tools
uv addProblem: Added package with CLI, but command doesn't work.
Solution: Use uv run:
uv add ruff
uv run ruff check . # Not just "ruff check ."
Problem: Dependencies changed but environment hasn't updated.
Solution:
uv sync
Problem: Project requires different Python.
Solution:
uv python install 3.12
uv python pin 3.12
Problem: Script with inline metadata doesn't use project packages.
Solution: This is intentional. Either:
uv run - Don't manually activate venvsuv.lock - Ensures reproducible buildsuv python pin--with for experiments - Test deps without modifying pyproject.tomluvx for one-off tools - Don't pollute project depsSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer