cilipep/ai-agent-with-tslab/modern-python-toolchain
- community
Checking that the SKILL.md file is still in the repository.
Modern Python project setup with uv, ruff, and pyright. Use when initializing a new Python project, configuring the Python environment, setting up linting/formatting, or when a project needs uv (the fast Python package manager). Trigger on: 'set up Python', 'new Python project', 'configure uv', 'install uv', 'ruff', 'pyright', 'Python linting', 'Python formatting', or when a task requires Python and no pyproject.toml exists yet.
Install
npx vskill@latest install cilipep/ai-agent-with-tslab/modern-python-toolchainSKILL.md
The same SKILL.md was published earlier as arborlogic/openzerocode/modern-python-toolchain.
Modern Python Toolchain
A guide for setting up Python projects with modern, fast tooling: uv (package/project manager), ruff (linter/formatter), and pyright (type checker).
Installing uv
uv is an extremely fast Python package and project manager. It replaces pip, pip-tools, pipx, pyenv, virtualenv, poetry, etc.
After installation, restart your shell or run source $HOME/.local/bin/env (the installer prints the exact command).
For detailed information: https://docs.astral.sh/uv/
uv basics
Python version
Pin a single Python minor version. As of 2025 the recommended version is 3.12:
Install Python via uv (no system Python needed):
Creating a new project
Common commands
Rules
- Never use `pip` in uv projects — always
uv addfor packages. - Never run `python script.py` directly — always
uv run script.pyto ensure the correct environment. For one-liners useuv run python -c "...". - Don't manually manage environments with
python -m venvorsource .venv/bin/activate— uv handles this automatically. uvxruns tools from PyPI by package name without installing them permanently.
Project types
For library projects, use the standard src layout with uv_build:
For application projects with an entry point:
If the project does not use src layout, just run uv run main.py.
ruff
Ruff is an extremely fast Python linter and code formatter. It replaces Flake8, isort, Black, pyupgrade, autoflake, and more.
For detailed information: https://docs.astral.sh/ruff/
When to use
Always use ruff for Python linting and formatting. Prefer uv run ruff when ruff is a dev dependency; otherwise fall back to uvx ruff.
Configuration
Add to pyproject.toml:
Post-edit workflow
After modifying Python code:
Use --diff to preview changes without applying.
pyright
Pyright is a fast type checker for Python. Only use it when the project lists it as a dev dependency or explicitly uses type checking.
Usually only check the files you modified. For broad changes (base classes, shared types), check the full tree.
Prerequisite: Pyright requires a node binary. If not available, skip and note it to the user.
Coding style
Type annotations
Use modern Python 3.12+ syntax:
Always annotate function parameters. Local variables can rely on inference unless the type is ambiguous:
String formatting
Always use f-strings. Do not use .format() or % formatting.
pydantic v2
Use the modern class-based API:
model_config = ConfigDict(...)at class body level, notclass Config.RootModelwithroot: SomeTypefor single-root schemas.
typer (CLI)
Recommended for CLI entry points over argparse:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.mimocode/skills/modern-python-toolchain/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cilipep/ai-agent-with-tslab/modern-python-toolchain)