MCPInstall

uv-workspaces

Manage multi-package Python projects with uv workspaces. Use when the user mentions uv workspaces, Python monorepo, shared lockfiles, or member dependencies.

Installs
321
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/laurigates/claude-plugins --skill uv-workspaces
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads uv-workspaces automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

UV Workspaces

Quick reference for managing monorepo and multi-package projects with UV workspaces.

When to Use This Skill

Use this skill when...Use another skill instead when...
Setting up a Python monorepo with shared depsManaging a single package (uv-project-management)
Configuring workspace members and inter-package depsAdding git/URL dependencies (uv-advanced-dependencies)
Using --package or --all-packages flagsBuilding/publishing to PyPI (python-packaging)
Creating virtual workspaces (root with no project)Managing Python versions (uv-python-versions)
Debugging workspace dependency resolutionRunning standalone scripts (uv-run)

Quick Reference

Workspace Structure

my-workspace/
├── pyproject.toml          # Root workspace config
├── uv.lock                 # Shared lockfile (all members)
├── packages/
│   ├── core/
│   │   ├── pyproject.toml
│   │   └── src/core/
│   ├── api/
│   │   ├── pyproject.toml
│   │   └── src/api/
│   └── cli/
│       ├── pyproject.toml
│       └── src/cli/
└── README.md

Root pyproject.toml

[project]
name = "my-workspace"
version = "0.1.0"
requires-python = ">=3.11"

[tool.uv.workspace]
members = ["packages/*"]

# Optional: exclude specific members
exclude = ["packages/experimental"]

Virtual Workspace (No Root Package)

When the root is purely organizational and not a package itself, omit the [project] table:

# Root pyproject.toml — virtual workspace (no [project] table)
[tool.uv.workspace]
members = ["packages/*"]
  • The root is not a workspace member
  • All members live in subdirectories
  • uv run and uv sync require --package or --all-packages (will error without them)

Member pyproject.toml

[project]
name = "my-api"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "my-core",       # Workspace member
    "fastapi",       # External (PyPI)
]

[tool.uv.sources]
my-core = { workspace = true }

Common Commands

OperationCommand
Sync workspace rootuv sync
Sync all membersuv sync --all-packages
Sync specific memberuv sync --package my-api
Run in member contextuv run --package my-api python script.py
Lock entire workspaceuv lock
Upgrade a dependencyuv lock --upgrade-package requests
Build specific packageuv build --package my-core
Add dep to membercd packages/api && uv add requests
Add workspace depcd packages/api && uv add ../core

Key Behaviors

Source Inheritance

Root tool.uv.sources apply to all members unless overridden.

Use case: Define workspace sources in root for all members, override only when a specific member needs a different version:

# Root pyproject.toml — applies to all members
[tool.uv.sources]
my-utils = { workspace = true }

# packages/legacy/pyproject.toml — needs pinned version
[tool.uv.sources]
my-utils = { path = "../utils-v1" }  # Overrides root entirely

Override is per-dependency and total — if a member defines a source for a dependency, the root source for that dependency is ignored completely.

requires-python Resolution

The workspace enforces the intersection of all members' requires-python:

# packages/core: requires-python = ">=3.10"
# packages/api:  requires-python = ">=3.11"
# Effective:     requires-python = ">=3.11"

All members must have compatible Python version requirements.

Editable Installations

Workspace member dependencies are always editable — source changes are immediately available without reinstallation.

Default Scope

CommandDefault scopeOverride
uv lockEntire workspace—
uv syncWorkspace root only--package, --all-packages
uv runWorkspace root only--package, --all-packages
uv buildAll members--package

Workspace vs Path Dependencies

Feature{ workspace = true }{ path = "../pkg" }
Shared lockfileYesNo
Always editableYesOptional
Must be workspace memberYesNo
--package flag worksYesNo
Conflicting deps allowedNoYes

Use path dependencies when members need conflicting requirements or separate virtual environments.

Docker Layer Caching

# Install deps first (cached layer)
COPY pyproject.toml uv.lock packages/*/pyproject.toml ./
RUN uv sync --frozen --no-install-workspace

# Then install project (changes frequently)
COPY . .
RUN uv sync --frozen
FlagEffect
--no-install-projectSkip current project, install deps only
--no-install-workspaceSkip all workspace members, install deps only
--no-install-package <name>Skip specific package(s)
--frozenSkip lockfile freshness check

Agentic Optimizations

ContextCommand
Sync all membersuv sync --all-packages
CI sync (frozen)uv sync --all-packages --frozen
Test specific memberuv run --package my-core pytest --dots --bail=1
Test all membersuv run --all-packages pytest --dots --bail=1
Lock with upgradeuv lock --upgrade-package <dep>
Build one packageuv build --package my-core
Docker deps layeruv sync --frozen --no-install-workspace

See Also

  • uv-project-management — Managing individual packages
  • uv-advanced-dependencies — Path and Git dependencies
  • python-packaging — Building and publishing workspace packages

For detailed workspace patterns (virtual workspaces, Docker integration, source inheritance, syncing strategies), CI/CD examples, and troubleshooting, see REFERENCE.md.

FAQ

What does the uv-workspaces skill do?

Manage multi-package Python projects with uv workspaces. Use when the user mentions uv workspaces, Python monorepo, shared lockfiles, or member dependencies.

How do I install uv-workspaces?

Run npx skills add https://github.com/laurigates/claude-plugins --skill uv-workspaces in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/uv-workspaces/ (personal) or .claude/skills/uv-workspaces/ (project).

Which AI agents can use uv-workspaces?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is uv-workspaces safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains uv-workspaces?

It is published by laurigates in laurigates/claude-plugins. It has 321 recorded installs.

More from laurigates/claude-plugins

View all →

python-code-quality

laurigates/claude-plugins

Python code quality with ruff and ty. Use when the user mentions ruff, ty, linting, formatting, type checking, or Python code style.

1K installs

ruff-linting

laurigates/claude-plugins

Open the skill to read its SKILL.md instructions.

465 installs

python-testing

laurigates/claude-plugins

Python testing with pytest, coverage, fixtures, and mocking. Use when the user mentions pytest, unit tests, coverage, fixtures, mocking, or writing Python tests.

Testing & QA428 installs

pytest-advanced

laurigates/claude-plugins

Advanced pytest: fixtures, markers, parametrization, parallel execution. Use when implementing test infrastructure, writing fixtures, or running with coverage.

Testing & QA352 installs

basedpyright-type-checking

laurigates/claude-plugins

Open the skill to read its SKILL.md instructions.

320 installs

uv-project-management

laurigates/claude-plugins

Python project setup, deps, and lockfiles with uv. Use when the user mentions uv, creating Python projects, managing dependencies, lockfiles, or pyproject.toml.

320 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs