- Home
- Skills
- DevOps & Cloud
- Python uv Project Setup and Migration with Ruff and CI
Works with the AI Agents you already use
Python uv Project Setup and Migration with Ruff and CI
Set up or migrate a Python project to uv, pyproject.toml, ruff, pytest, pre-commit, GitHub Actions and Docker, then rate it MODERN, PARTIAL or LEGACY.
$5
Python uv Project Setup and Migration with Ruff and CI
Example session with this skill installed
Move our FastAPI service orders-api from requirements.txt and requirements-dev.txt to uv. We use flake8, isort and black, run on Python 3.11, and deploy with Docker. Keep the same dependency versions.
- Read your context and instructions
- Compiled the python uv project
Python toolchain report: orders-api (MIGRATE, APP)
Verdict: PARTIAL - uv, ruff and CI are in place, but one unpinned transitive package drifted and needs your sign-off before this is MODERN.
Before -> after
| Area | Before | After |
|---|---|---|
| Deps | requirements.txt (31 pins) | pyproject.toml + uv.lock |
| Dev deps | requirements-dev.txt | [dependency-groups] dev |
| Python | 3.11 (undeclared) | .python-version 3.11, requires-python = ">=3.11" |
| Lint/format | flake8 + isort + black | ruff check + ruff format |
| Types | none | mypy (non-strict) |
| CI | pip install, no cache | setup-uv v10, cache on, uv sync --locked |
| Docker | pip install -r | multi-stage uv sync |
Commands run
uv init --bare
uv python pin 3.11
uv add -r requirements.txt
sed '/^-r /d' requirements-dev.txt | uv add --dev -r -
uv add --dev ruff mypy
uv sync --locked && uv run pytest
Version diff
| Package | Before | After | Reason |
|---|---|---|---|
| fastapi | 0.115.0 | 0.115.0 | unchanged |
| anyio (transitive) | 4.4.0 | 4.6.2 | not pinned in requirements.txt; accept, or re-run uv add with -c before.txt |
| typing-extensions | 4.12.2 | 4.12.2 | unchanged |
| flake8, isort, black | present | removed | replaced by ruff |
The other 29 pinned packages resolved to the same versions. pytest: 142 passed before and after.
Files written or changed
- pyproject.toml - PEP 621 metadata, ruff, mypy, pytest config
- uv.lock - commit it (app)
- .pre-commit-config.yaml - ruff-check, ruff-format
- .github/workflows/ci.yml - setup-uv with cache
- Dockerfile - uv multi-stage build
- To delete after CI is green: requirements*.txt, .flake8, .isort.cfg
Remaining gaps
- Approve or constrain the anyio change.
- mypy reports 17 errors in
src/orders/db.py; gate CI onsrc/orders/apifirst.
Connects securely to your tools. The creator never sees your data.
About this skill
Moving a Python project to uv sounds like one command, but the details decide whether it works: keeping old pins, splitting dev dependencies, replacing flake8, isort and black without a noisy diff, caching uv in CI, and building a Docker image that does not reinstall everything on each change. This skill walks your coding agent through that work in a fixed order and checks that behavior did not change.
What it does:
- Audits the repo (requirements files, setup.py, Pipfile, poetry.lock, environment.yml, old lint configs, CI, Dockerfile)
- Creates a new project with uv init, or converts an existing one using uv add -r with constraints, or the migrate-to-uv tool for Poetry, Pipenv and pip-tools
- Writes PEP 621 pyproject.toml with dependency groups, SPDX license and a build backend choice
- Adds ruff lint and format config that matches your old line length and ignores, plus mypy, pyright or ty, and pytest settings
- Adds pre-commit hooks, a GitHub Actions job using the official setup-uv action with caching, and a multi-stage uv Dockerfile
- Compares a pip freeze from before and after, and asks for a reason for every version change
- Covers app vs library differences, including uv build and uv publish
- Ends with a MODERN, PARTIAL or LEGACY verdict and a list of remaining gaps
Who it's for: Python developers, maintainers and platform teams who want a repeatable, reviewable migration instead of a one-off chat answer.
Honesty note: tool versions in the reference file were checked against PyPI, docs.astral.sh, packaging.python.org and the setup-uv README in October 2026. The skill tells the agent to re-check them when it has web access and not to invent flags, versions or test results. It does not install uv by piping a script into a shell; it points to the official installer page and package managers.
Version numbers and flags were verified in October 2026 and can change; the agent should re-check them with web access. Conda-only dependencies, custom setup.py build steps and C extensions need manual review. The skill reports type errors and test failures but does not fix them for you.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 29 days ago
Requires