modern-python-toolchain

modern-python-toolchain is a skill for Claude Code, Codex from XiaomiMiMo/MiMo-Code. It costs 105 tokens per session (1,476 once invoked), scanned C, original, MIT.

A setup guide for modern Python projects using uv to manage the project and packages, Ruff to format and check code, and Pyright to check types.

In plain words
What is it for?
Use it when starting a Python project, choosing a Python version, installing dependencies, configuring uv, setting up Ruff, or adding Pyright type checking.
Why use it?
It gives a consistent project setup and catches formatting, style, and type problems early. This avoids assembling development tools and configuration from unrelated instructions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when starting a Python project, choosing a Python version, installing dependencies, configuring uv, setting up Ruff, or adding Pyright type checking.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaomimimo/mimo-code/modern-python-toolchain
About the project

MiMoCode is a terminal-based AI coding assistant that reads and writes code, runs commands, manages Git, and remembers project context across sessions. Developers use it to work with software projects through a command-line interface and connect it to language-model providers; the catalogue includes skills and instructions for it.

XiaomiMiMo/MiMo-Code · 13,664 stars · on GitHub · mimo.xiaomi.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add XiaomiMiMo/MiMo-Code --skill modern-python-toolchain
Clone the repo
git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modern-python-toolchain

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/modern-python-toolchain/github.svg)](https://agentmods.dev/skills/xiaomimimo/mimo-code/modern-python-toolchain)
Your own site
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/modern-python-toolchain"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/modern-python-toolchain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modern-python-toolchain

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/modern-python-toolchain"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/modern-python-toolchain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,476 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 16
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • medium MCP Rug Pull · line 65
    uvx/uv tool run commands without ==version create a rug-pull risk.
    Fix: Pin the version: uvx package-name==1.2.3
  • medium MCP Rug Pull · line 105
    uvx/uv tool run commands without ==version create a rug-pull risk.
    Fix: Pin the version: uvx package-name==1.2.3
  • low Supply Chain · line 16
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01476
Opus 5.5 $0.00042 $0.00590
Sonnet 5.5 $0.00021 $0.00295
Haiku 4.5 $0.00011 $0.00148

Measured 1mo ago against content hash 308966220356, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

modern-python-toolchain scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -LsSf https://astral.sh/uv/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -LsSf https://astral.sh/uv/install.sh | sh
packages/cli/src/skill/builtin/.bundle/modern-python-toolchain/SKILL.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Homebrew (macOS)
brew install uv

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. The recommended default is 3.12 (broadest ecosystem support — PyTorch, CUDA images, downstream libraries). Python 3.14 is the latest stable; prefer it for new projects unless you depend on packages that haven't added 3.14 support yet.

# pyproject.toml
requires-python = "==3.12.*"

Install Python via uv (no system Python needed):

uv python install 3.12

Creating a new project

uv init                       # Create new project with pyproject.toml
uv init -p 3.12               # Specify Python version

Common commands

uv add requests               # Add dependency
uv add --dev ruff "pyright[nodejs]"  # Add dev dependencies
uv remove requests            # Remove dependency
uv sync                       # Install from lockfile
uv run COMMAND                # Run command in project environment
uv run script.py              # Run a script
uv run python -c "..."        # Run Python one-liner
uvx TOOL ARGS                 # Run a tool without installing it

Rules

  • Never use pip in uv projects — always uv add for packages.
  • Never run python script.py directly — always uv run script.py to ensure the correct environment. For one-liners use uv run python -c "...".
  • Don't manually manage environments with python -m venv or source .venv/bin/activate — uv handles this automatically.
  • uvx runs tools from PyPI by package name without installing them permanently.

Read the full file on GitHub · 203 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 203 lines · 105 tokens per session scan C 308966220356

Subscribe to this mod's changes

modern-python-toolchain is a skill published in the GitHub repository XiaomiMiMo/MiMo-Code (13,664 stars, last pushed yesterday), licensed MIT. It adds 105 tokens to every session and 1,476 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…

synthetic-sciences/openscience · 76 tokens

python-repl

Interactive Python REPL automation with common helpers and best practices.

gptme/gptme · 15 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

pyarrow-python

Use for writing, reviewing, debugging, testing, or optimizing Python code that uses PyArrow arrays, schemas, Tables, RecordBatches, RecordBatchReaders, compute kernels, Dataset scans, Parquet, or Arrow IPC and C data interfaces. Trigger on schema drift, null/type semantics, chunking, batch streaming, predicate…

skillmds/skillmd · 117 tokens

python

Use when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms, src/ layout + pyproject.toml with uv, ruff+mypy+pytest gate. NOT a FastAPI/ASGI service (that is fastapi), NOT a deep pytest suite (that is…

ericrisco/rsc-harness · 94 tokens