uv-package
Skill14 starsChanged 37 days agoMITView on GitHub
Utilize uv package manager. Manage dependencies, virtual environments, project initialization, and lock files.
- Deletes or force-pushes
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adaptSkill
- animateSkill
- auditSkill
- bolderSkill
- brainstormSkill
- build-fixSkill
- business-panelSkill
- checkpointSkill
- clarifySkill
- colorizeSkill
- composition-patternsSkill
- confidence-checkSkill
- config-doctorSkill
- critiqueSkill
- delightSkill
- design-auditSkill
- devils-advocateSkill
- distillSkill
- eval-harnessSkill
- feature-plannerSkill
- fix-prSkill
- frontend-designSkill
- gap-analysisSkill
- grill-with-docsSkill
- hardenSkill
- impeccableSkill
- layoutSkill
- learnSkill
- optimizeSkill
- overdriveSkill
- polishSkill
- pytest-runnerSkill
- python-best-practicesSkill
- quieterSkill
- react-best-practicesSkill
- sc-helpSkill
- security-auditSkill
- shapeSkill
- tddSkill
- typesetSkill
- ui-ux-pro-maxSkill
- verifySkill
- web-design-guidelinesSkill
The file
Files
uv Package Manager Skill
Overview
Support Python package management and project setup using uv.
uv: Ultra-fast Python package and project manager written in Rust (by Astral)
Basic Commands
Project Initialization
# Create new project
uv init my-project
# Add uv to existing project
uv init
# Install dependencies
uv sync
# Create virtual environment (automatically managed)
uv venvDependency Management
# Add package
uv add fastapi
# Add development dependency
uv add --dev pytest mypy ruff
# Add version constraint
uv add "fastapi>=0.100.0,<1.0.0"
# Remove package
uv remove requests
# Upgrade all dependencies
uv lock --upgrade
# Upgrade specific package only
uv lock --upgrade-package fastapiLock File Management
# Create/update lock file
uv lock
# Install based on lock file (reproducible)
uv sync --frozen
# Verify lock file
uv lock --checkVirtual Environment Management
# Environment information
uv venv
# Use specific Python version
uv venv --python 3.11
# Install Python version
uv python install 3.11Output Format
On Dependency Addition
📦 Package Management
─────────────────────
✅ Added: fastapi (>=0.115.0)
📝 Updated: pyproject.toml
🔒 Lock File: uv.lock (updated)
Next: uv syncConflict Resolution
⚠️ Dependency Conflict
─────────────────────
Package: urllib3
Required by:
- requests (>=1.26.18,<2.0)
- boto3 (>=1.26.0)
Resolution Options:
1. uv add "urllib3>=1.26.18,<2.0"
2. uv add "requests>=2.32.0" (urllib3 2.x support)
Recommended:
uv add "urllib3>=1.26.18,<2.0" --lockedpyproject.toml Templates
pyproject.toml (FastAPI)
[project]
name = "my-api"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.115.0",
"uvicorn[standard]>=0.30.0",
"sqlalchemy>=2.0",
"alembic>=1.13",
"pydantic>=2.0",
"httpx>=0.27.0",
]
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.24",
"mypy>=1.8",
"ruff>=0.8",
"coverage>=7.4",
]pyproject.toml (Django)
[project]
name = "my-webapp"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"django>=5.0",
"django-rest-framework>=3.15",
"psycopg[binary]>=3.1",
"django-cors-headers>=4.3",
"celery>=5.3",
"redis>=5.0",
]
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-django>=4.8",
"mypy>=1.8",
"ruff>=0.8",
"django-stubs>=5.0",
]pyproject.toml Integrated Configuration
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
[tool.mypy]
python_version = "3.11"
strict = true
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"Workflows
General Development Flow
# 1. Install dependencies
uv sync
# 2. Run code
uv run python main.py
# 3. Run tests
uv run pytest
uv run mypy src/
uv run ruff check src/
# 4. Commit after adding package
uv add new-package
git add pyproject.toml uv.lock
git commit -m "deps: add new-package"CI/CD (GitHub Actions)
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install dependencies
run: uv sync --frozen
- name: Run tests
run: uv run pytest --cov
- name: Type check
run: uv run mypy src/Docker
FROM python:3.11-slim
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
# Install dependencies
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
# Copy source
COPY . .
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0"]Troubleshooting
Frequently Used Diagnostic Commands
# Check dependency tree
uv tree
# Clean cache
uv cache clean
# Regenerate lock file
rm uv.lock && uv lock
# Recreate virtual environment
rm -rf .venv && uv sync
# Verify lock file sync
uv lock --checkDependency Groups
[dependency-groups]
dev = ["pytest>=8.0", "mypy>=1.8"] # Development
test = ["pytest>=8.0", "coverage>=7"] # Testing
docs = ["sphinx>=7.0", "furo>=2024"] # DocumentationQuick Reference
| Command | Description |
uv init | Initialize project |
uv add [pkg] | Add package |
uv sync | Install dependencies |
uv lock --upgrade | Update dependencies |
uv tree | Dependency tree |
uv lock --check | Validate configuration |
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.

