Migrate Python projects from Poetry, pipx, or pip/requirements.txt to uv. Converts pyproject.toml from Poetry format to PEP 621 standard, handles dependency groups, scripts, extras, build backends, and generates uv.lock. Use when user asks to: (1) migrate/convert from Poetry to uv, (2) replace pipx with uv tool, (3) modernize Python project packaging, (4) convert requirements.txt to uv, (5) switch to uv, or mentions "poetry to uv" or "migrate to uv".
View on GitHubfprochazka/claude-code-plugins
migrate-to-uv
February 3, 2026
Select agents to install to:
npx add-skill https://github.com/fprochazka/claude-code-plugins/blob/main/plugins/migrate-to-uv/skills/migrate-to-uv/SKILL.md -a claude-code --skill migrate-to-uvInstallation paths:
.claude/skills/migrate-to-uv/# Migrate to uv
Convert Python projects from Poetry/pipx/pip to uv.
## Quick Start: Automated Migration
For most Poetry projects, use the `migrate-to-uv` tool:
```bash
uvx migrate-to-uv
```
**What it does:**
- Parses `[tool.poetry]` sections and converts to PEP 621 `[project]` format
- Converts Poetry version specifiers (`^`, `~`) to PEP 440 format (`>=`, `<`)
- Moves `[tool.poetry.group.*.dependencies]` to `[dependency-groups]`
- Converts `[tool.poetry.scripts]` to `[project.scripts]`
- Converts `[tool.poetry.extras]` to `[project.optional-dependencies]`
- Handles git/path/url dependencies → `[tool.uv.sources]`
- Preserves exact versions from `poetry.lock` when generating `uv.lock`
- Deletes `poetry.lock` after successful conversion
**After running, verify and test:**
```bash
rm -rf .venv
uv sync
uv run pytest
```
**Note:** The tool does NOT change the build backend. You may need to manually update `[build-system]` from `poetry-core` to `hatchling` (see step 6 below).
## Manual Migration Steps
Use manual migration for complex projects or when automated tool fails.
### 1. Convert Metadata
**Poetry → PEP 621:**
```toml
# BEFORE: [tool.poetry]
[tool.poetry]
name = "myapp"
version = "1.0.0"
description = "My app"
authors = ["John Doe <john@example.com>"]
license = "MIT"
readme = "README.md"
# AFTER: [project]
[project]
name = "myapp"
version = "1.0.0"
description = "My app"
authors = [{name = "John Doe", email = "john@example.com"}]
license = {text = "MIT"}
readme = "README.md"
```
### 2. Convert Dependencies
**Version specifier conversions:**
- `^1.2.3` → `>=1.2.3,<2.0.0` (caret = compatible)
- `~1.2.3` → `>=1.2.3,<1.3.0` (tilde = patch only)
- `python = "^3.10"` → `requires-python = ">=3.10,<4.0"`
```toml
# BEFORE
[tool.poetry.dependencies]
python = "^3.10"
requests = "^2.26.0"
pandas = {version = "^2.0", extras = ["excel"]}
# AFTER
[project]
requires-python = ">=3.10,<4.0"
dependencies = [
"requests>=2.26.0,<3.0.0",
"pandas[excel]>=2.0,<3.0