Skip to main content
skill CX Codex

uv-advanced-dependencies — Claude Code skill: Git deps, path packages

uv-advanced-dependencies is a skill for managing non-standard dependency sources in uv, including GitHub repositories, editable local packages, and private indexes. It covers projects that need Git, local path, or custom index dependencies.

MIT 332 installs ★ 60 updated 2026-11-16

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

What uv-advanced-dependencies does

This skill provides commands for git-sourced dependencies (branches, tags, commits), local paths, editable installs, and grouped dependencies. It covers configuration patterns in pyproject.toml: declaring sources via [tool.uv.sources], organizing dependencies in [dependency-groups], setting up extra indexes, and handling authentication tokens.

Includes bash commands for quick operations (uv add git+https://...), monorepo patterns with local packages, version resolution strategies, and private index examples with environment variables. The skill bridges the gap between PyPI's convenience and scenarios that demand more flexible, distributed sources.

What it helps with

  • Pin a dependency to a Git repository at a specific branch or tag
  • Set up a local package in editable mode for active development
  • Organize dependencies into groups (dev, test, docs) within a single project
  • Connect a private package index with authentication tokens
  • Mix multiple sources—PyPI, Git, local paths—in one pyproject.toml

Example prompts for the agent

  • Add a Git dependency: uv add git+https://github.com/pallets/flask@main
  • Link a local package for editing: uv add --editable ../my-local-package
  • Install all dependency groups: uv sync --all-groups

How to install uv-advanced-dependencies

1Skills CLI (Vercel)

npx skills add laurigates/claude-plugins --skill uv-advanced-dependencies -a claude-code

2Manually: put the files in place

~/.claude/skills/uv-advanced-dependencies/SKILL.md

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about uv-advanced-dependencies

How do I install uv-advanced-dependencies in Claude Code?

Run npx skills add laurigates/claude-plugins --skill uv-advanced-dependencies -a claude-code, then open ~/.claude/skills/uv-advanced-dependencies/SKILL.md.

What does uv-advanced-dependencies do?

It provides commands and configuration patterns for Git dependencies, local packages, custom indexes, dependency groups, and other advanced uv features beyond standard PyPI package management.

When should I use this instead of uv-project-management?

Use this skill when you need git+https URLs, editable installations, or custom indexes. For straightforward PyPI package additions, uv-project-management is simpler.

Source text

SKILL.md · MIT
---
created: 2025-12-16
modified: 2026-11-14
reviewed: 2026-04-25
name: uv-advanced-dependencies
description: "Advanced uv dependencies: Git deps, path deps, editable installs, groups, extras, custom indexes. Use when the user mentions git+https deps, editable installs, or private indexes."
user-invocable: false
allowed-tools: Bash(uv add *), Bash(uv sync *), Bash(uv pip compile *), Read, Grep, Glob
---

# UV Advanced Dependencies

Quick reference for advanced dependency scenarios in UV projects.

## When to Use This Skill

| Use this skill when... | Use a focused sibling instead when... |
|---|---|
| Pinning a dependency to a git URL, branch, or tag, or installing in editable mode | Adding a normal PyPI dependency — use uv-project-management |
| Configuring `[tool.uv.sources]`, dependency groups, extras, or custom indexes | Sharing source declarations across workspace members — use uv-workspaces |
| Setting up private package indexes or build-time constraints | Running an ephemeral script with `--with` deps — use uv-run |

## When This Skill Applies

- Git repository dependencies
- Local path dependencies
- Editable installations
- Dependency constraints
- Custom package indexes
- Dependency groups and extras
- Build dependencies

## Quick Reference

### Git Dependencies

```bash
# Add from Git repository
uv add git+https://github.com/psf/requests
uv add git+https://github.com/pallets/flask@main
uv add git+ssh://[email protected]/user/[email protected]

# Specific branch, tag, or commit
uv add git+https://github.com/user/repo@feature-branch
uv add git+https://github.com/user/[email protected]
uv add git+https://github.com/user/repo@abc123
```

### Path Dependencies

```bash
# Add from local path
uv add --editable ./local-package
uv add ../another-project
uv add /absolute/path/to/package

# Non-editable path
uv add --no-editable ./local-package
```

### Dependency Groups

```bash
# Add to named group
uv add --group docs sphinx mkdocs
uv add --group test pytest pytest-cov

# Install specific groups
uv sync --group docs
uv sync --group test --group docs

# Install all groups
uv sync --all-groups
```

### Extras (Optional Dependencies)

```bash
# Install package with extras
uv add 'fastapi[all]'
uv add 'sqlalchemy[postgresql,mypy]'

# Define extras in pyproject.toml
[project.optional-dependencies]
dev = ["pytest", "ruff"]
docs = ["mkdocs", "mkdocs-material"]
```

### Constraint Files

```bash
# Apply version constraints
uv pip compile requirements.in --constraint constraints.txt

# constraints.txt example:
# numpy<2.0
# pandas==2.0.3
```

### Custom Indexes

```toml
[tool.uv]
index-url = "https://pypi.org/simple"
extra-index-url = [
    "https://custom.pypi.org/simple",
]
```

## Git Dependencies in pyproject.toml

```toml
[project]
dependencies = [
    "my-package",
]

[tool.uv.sources]
my-package = { git = "https://github.com/user/my-package" }

# With branch
my-package = { git = "https://github.com/user/my-package", branch = "main" }

# With tag
my-package = { git = "https://github.com/user/my-package", tag = "v1.0.0" }

# With commit
my-package = { git = "https://github.com/user/my-package", rev = "abc123" }
```

## Path Dependencies in pyproject.toml

```toml
[project]
dependencies = [
    "my-local-package",
]

[tool.uv.sources]
my-local-package = { path = "../my-local-package" }

# Editable (default for paths)
my-local-package = { path = "../my-local-package", editable = true }

# Non-editable
my-local-package = { path = "../my-local-package", editable = false }
```

## Dependency Groups

```toml
[dependency-groups]
dev = [
    "pytest>=7.0",
    "pytest-cov>=4.0",
    "ruff>=0.1.0",
]
docs = [
    "mkdocs-material>=9.0",
    "mkdocstrings[python]>=0.24",
]
test = [
    "pytest-asyncio>=0.21",
    "pytest-mock>=3.12",
]
```

## URL Dependencies

```bash
# Add from direct URL
uv add https://files.pythonhosted.org/packages/.../requests-2.31.0.tar.gz

# In pyproject.toml
[tool.uv.sources]
my-package = { url = "https://example.com/my-package-1.0.tar.gz" }
```

## Private Package Indexes

```toml
[tool.uv]
# Primary index
index-url = "https://pypi.org/simple"

# Additional indexes
extra-index-url = [
    "https://${PRIVATE_TOKEN}@private.pypi.org/simple",
]

# Find links
find-links = [
    "https://download.pytorch.org/whl/cu118",
]
```

```bash
# Set token via environment
export PRIVATE_TOKEN="secret"
uv sync
```

## Build Dependencies

```toml
[build-system]
requires = [
    "setuptools>=68",
    "wheel",
    "Cython>=3.0",
]
build-backend = "setuptools.build_meta"
```

## Common Patterns

### Development from Local Checkout

```bash
# Clone dependency
git clone https://github.com/user/lib.git ../lib

# Add as editable
cd my-project
uv add --editable ../lib
```

### Monorepo Path Dependencies

```toml
[tool.uv.sources]
my-core = { path = "packages/core" }
my-utils = { path = "packages/utils" }
```

### Mixed Sources

```toml
[project]
dependencies = [
    "fastapi",          # PyPI
    "my-lib",           # Git
    "my-local",         # Path
]

[tool.uv.sources]
my-lib = { git = "https://github.com/user/my-lib" }
my-local = { path = "../my-local" }
```

## Resolution Strategies

```toml
[tool.uv]
# Highest compatible (default)
resolution = "highest"

# Lowest compatible
resolution = "lowest"

# Lowest direct, highest transitive
resolution = "lowest-direct"
```

## See Also

- `uv-project-management` - Basic dependency management
- `uv-workspaces` - Workspace member dependencies
- `python-packaging` - Build system configuration

## References

- Official docs: https://docs.astral.sh/uv/concepts/dependencies/
- Detailed guide: See REFERENCE.md in this skill directory

© laurigates · MIT · laurigates/claude-plugins

Similar skills

All skills for Backend and APIs →

From the same set27

The whole set →
uv-workspaces A skill for multi-package Python projects on uv: workspace setup, a shared lockfile, and dependencies between members. CX Codex +1 356installs uv-run uv-run teaches your AI assistant to execute Python scripts via uv and embed dependencies with PEP 723 without manual virtual environment activation. CX Codex +1 342installs python-packaging python-packaging guides the agent through building wheels and sdists with uv, configuring pyproject.toml, and uploading packages to PyPI or Test PyPI. CX Codex +1 336installs uv-python-versions uv-python-versions is a Claude Code skill for managing CPython and PyPy with uv. Install interpreters, pin a project version, or switch versions for testing. CX Codex +1 332installs uv-tool-management uv-tool-management is a Claude Code skill for managing global Python CLI tools with uv and running them temporarily with uvx, including as an alternative to pipx. CX Codex +1 328installs imagemagick-conversion imagemagick-conversion — a skill for converting, resizing and optimizing images via ImageMagick command-line. Useful for bulk format conversion, thumbnail generation, and large-scale image processing workflows. CX Codex +1 260installs jq-json-processing jq-json-processing — a skill for parsing, filtering and transforming JSON with jq. Extracts fields, filters arrays, reshapes objects and validates syntax. CX Codex +1 245installs python-development python-development gives your agent Python 3.10+ idioms: type hints, pattern matching, asyncio. Handy for library code and refactors. CX Codex +1 192installs

Project sponsors

Companies that keep this analytics open