# Modern Python Setup: uv, ruff, pyright & CI

> Standardize Python projects with uv, ruff, pyright, and modern pyproject.toml conventions.

Modern Python Setup: uv, ruff, pyright & CI is a free AI agent skill on Agensi by Ignasi, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ignasi](https://www.agensi.io/creators/ignasi)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Uses: 1
- Version: 1.0
- Last updated: 2026-11-23
- Security: scan passed (2026-11-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/modern-python-setup-uv-ruff-pyright-ci
- Tags: api, python, uv, ruff, pyright, devops

## 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 `uv` for lightning-fast installs and lockfile management.
- **Consolidated linting** swaps black, isort, and flake8 for `ruff` to handle formatting and linting in a single pass.
- **Strict type checking** configures `pyright` or `mypy` to enforce type safety across the codebase.
- **Project modernization** implements the `src` layout and standardizes configuration within a single `pyproject.toml`.
- **Automated CI/CD** generates GitHub Actions workflows using `setup-uv` for cached, multi-version testing and linting.

### How it works
1. **Detect** existing configuration files like `requirements.txt`, `setup.py`, or `.flake8` to map the migration path.
2. **Initialize** the environment using `uv` and migrate dependencies into PEP 621 compliant blocks.
3. **Configure** tool settings for Ruff, Pyright, and Pytest directly within the `pyproject.toml`.
4. **Refactor** legacy patterns by applying modern conventions like `pathlib`, f-strings, and Pydantic settings.
5. **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.txt` project to a modern `uv` workflow.
- Bootstrapping a new Pydantic-based microservice with strict typing and `src` layout.
- 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.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Modern Python Setup: uv, ruff, pyright & CI skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill differ from manually setting up a Python project?

This skill automates the migration of legacy projects (using pip, Poetry, or Pipenv) to a high-performance Rust-based stack including uv and Ruff, while implementing modern PEP 621 standards and the 'src' layout.

### What are the minimum Python version and agent requirements?

This skill is optimized for Python 3.12 and newer to leverage modern syntax; it is compatible with any AI agent capable of file system operations and terminal execution, such as those within VS Code or terminal-based IDEs.

### Will this migration break my existing dependencies?

The skill maps your existing dependencies from files like requirements.txt or setup.py directly into a unified pyproject.toml, ensuring your environment remains identical but manages packages significantly faster.

### Does this include CI/CD configuration for GitHub Actions?

Yes, the skill automatically generates optimized GitHub Actions workflows featuring setup-uv and intelligent caching to ensure your linting and testing pipeline is as fast as your local development.

### Does the skill automatically delete my old configuration files?

By default, the skill leaves legacy configuration files (like .flake8 or requirements.txt) intact until the new uv and Ruff setup is verified, allowing you to manually delete them once you are satisfied with the migration.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
