- Home
- Skills
- APIs & Backend
- Modern Python Setup: uv, ruff, pyright & CI
Modern Python Setup: uv, ruff, pyright & CI
by Ignasi
Standardize Python projects with uv, ruff, pyright, and modern pyproject.toml conventions.
Free
Modern Python Setup: uv, ruff, pyright & CI
Example session with this skill installed
Migrate this project from poetry to uv. Add ruff for linting and pyright for strict typing. Fix imports to use pathlib.
- Read your context and instructions
- Compiled the modern python setup
I have migrated the project from Poetry to the modern uv toolchain. I consolidated the dependencies into a PEP 621 compliant pyproject.toml, replaced the multi-tool linting setup with Ruff, and enabled strict mode for Pyright.
Modern Python Configuration
[project]
name = "data-processor"
version = "0.1.0"
description = "High-performance data transformation utility"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"httpx>=0.27.0",
"pydantic>=2.6.0",
"pydantic-settings>=2.2.0",
]
[dependency-groups]
dev = [
"ruff>=0.3.0",
"pyright>=1.1.350",
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"pre-commit>=3.6.0",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "RUF", "S", "PT", "C4", "DTZ", "PL"]
ignore = ["PLR2004"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101"]
[tool.pyright]
typeCheckingMode = "strict"
include = ["src"]
[tool.pytest.ini_options]
addopts = "-q --strict-markers --cov=src --cov-report=term-missing"
I have also refactored src/utils/file_ops.py to use pathlib.Path instead of os.path and applied ruff check --fix to the entire codebase.
Next steps
- Run
uv syncto install the new environment and generateuv.lock. - Execute
uv run pre-commit installto set up the git hooks. - Review the
ruffreport for 3 remaining manual fixes in thelegacy_parser.pymodule.
Connects securely to your tools. The creator never sees your data.
About this skill
Fragmented Python toolchains lead to slow environments and inconsistent code quality. This skill migrates legacy projects to a modern 2026 stack, replacing slow package managers and multiple linters with a unified, high-performance toolset.
What it does
- Unified package management replaces pip, poetry, or pipenv with
uvfor lightning-fast installs and lockfile management. - Consolidated linting swaps black, isort, and flake8 for
ruffto handle formatting and linting in a single pass. - Strict type checking configures
pyrightormypyto enforce type safety across the codebase. - Project modernization implements the
srclayout and standardizes configuration within a singlepyproject.toml. - Automated CI/CD generates GitHub Actions workflows using
setup-uvfor cached, multi-version testing and linting.
How it works
- Detect existing configuration files like
requirements.txt,setup.py, or.flake8to map the migration path. - Initialize the environment using
uvand migrate dependencies into PEP 621 compliant blocks. - Configure tool settings for Ruff, Pyright, and Pytest directly within the
pyproject.toml. - Refactor legacy patterns by applying modern conventions like
pathlib, f-strings, and Pydantic settings. - Verify the setup by running the full suite and reporting performance improvements or remaining type errors.
Frameworks & tools
This skill uses uv for environment orchestration, ruff for linting, pyright or mypy for typing, and pytest for testing. It targets Python 3.12+ and GitHub Actions for CI.
Why this beats prompting it yourself
Standardizing a Python project requires deep knowledge of PEP standards and evolving tool defaults. This skill ensures your configuration follows the 2026 best practices for pyproject.toml structure, CI caching, and linter rule selections without manual trial and error.
Use cases
- Migrating a legacy
requirements.txtproject to a modernuvworkflow. - Bootstrapping a new Pydantic-based microservice with strict typing and
srclayout. - Replacing a slow Poetry/Black/Flake8 pipeline with high-performance Rust-based tools.
- Setting up a library for PyPI publishing using OIDC Trusted Publishing.
Known limitations
Does not delete old configuration files until the new setup is verified. Requires Python 3.12+ for certain modern syntax recommendations.
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 buying a skill.
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
1 use
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 11 days ago
- Free with an Agensi account
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.