modern-python

modern-python is a skill for Claude Code, Codex from marduk191/qwen3_mcp. It costs 39 tokens per session (2,658 once invoked), scanned A, original, MIT.

A guide for setting up Python projects with uv, ruff, and ty. These are tools for managing packages and environments, formatting and checking code, and checking Python types.

In plain words
What is it for?
Use it to create Python projects, configure pyproject.toml, set up linting and testing tools, write scripts with dependencies, or migrate from pip, Poetry, mypy, or black.
Why use it?
It gives new and existing Python projects a consistent modern setup and helps replace older tooling when migration is requested.

Skill for Claude CodeCodex

Part of the modern-python plugin — 1 skill, 1 hook shipped together

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.

agentmods
npx agentmods add skills/marduk191/qwen3_mcp/modern-python
Any agent
npx skills add marduk191/qwen3_mcp --skill modern-python
Clone the repo
git clone --depth 1 https://github.com/marduk191/qwen3_mcp

Made for: Claude Code, Codex.

Or install modern-python, the plugin that ships this one along with the rest of its 1 skill, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/marduk191/qwen3_mcp/modern-python.svg)](https://agentmods.dev/skills/marduk191/qwen3_mcp/modern-python)
Your own site
<a href="https://agentmods.dev/skills/marduk191/qwen3_mcp/modern-python"><img src="https://agentmods.dev/badge/skills/marduk191/qwen3_mcp/modern-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,658 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00039 $0.02658
Opus 5 $0.00019 $0.01329
Sonnet 5 $0.00008 $0.00532
Haiku 4.5 $0.00004 $0.00266

Measured 4d ago against content hash ef774b925eb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

modern-python scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

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

uv run --with requests python -c "import requests; print(requests.get('https://httpbin.org/ip').json())"
skills/modern-python/skills/modern-python/SKILL.md · 334 lines

How it starts

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

Modern Python

Guide for modern Python tooling and best practices, based on trailofbits/cookiecutter-python.

When to Use This Skill

  • Creating a new Python project or package
  • Setting up pyproject.toml configuration
  • Configuring development tools (linting, formatting, testing)
  • Writing Python scripts with external dependencies
  • Migrating from legacy tools (when user requests it)

When NOT to Use This Skill

  • User wants to keep legacy tooling: Respect existing workflows if explicitly requested
  • Python < 3.11 required: These tools target modern Python
  • Non-Python projects: Mixed codebases where Python isn't primary

Anti-Patterns to Avoid

Avoid Use Instead
[tool.ty] python-version [tool.ty.environment] python-version
uv pip install uv add and uv sync
Editing pyproject.toml manually to add deps uv add <pkg> / uv remove <pkg>
hatchling build backend uv_build (simpler, sufficient for most cases)
Poetry uv (faster, simpler, better ecosystem integration)
requirements.txt PEP 723 for scripts, pyproject.toml for projects
mypy / pyright ty (faster, from Astral team)
[project.optional-dependencies] for dev tools [dependency-groups] (PEP 735)
Manual virtualenv activation (source .venv/bin/activate) uv run <cmd>
pre-commit prek (faster, no Python runtime needed)

Key principles:

  • Always use uv add and uv remove to manage dependencies
  • Never manually activate or manage virtual environments—use uv run for all commands
  • Use [dependency-groups] for dev/test/docs dependencies, not [project.optional-dependencies]

Decision Tree

What are you doing?
│
├─ Single-file script with dependencies?
│   └─ Use PEP 723 inline metadata (./references/pep723-scripts.md)
│
├─ New multi-file project (not distributed)?
│   └─ Minimal uv setup (see Quick Start below)
│
├─ New reusable package/library?
│   └─ Full project setup (see Full Setup below)
│
└─ Migrating existing project?
    └─ See Migration Guide below

Read the full file on GitHub · 334 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. 4d ago First seen · 334 lines · 39 tokens per session scan A ef774b925eb1

Subscribe to this mod's changes

modern-python is a skill published in the GitHub repository marduk191/qwen3_mcp (12 stars, last pushed 6mo ago), licensed MIT. It adds 39 tokens to every session and 2,658 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (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

bump-dependency

Bumps a Python package dependency across Home Assistant Core integrations, regenerates core requirement files, runs verification tests and prek lint, and prepares a pull request with proper release/compare links.

home-assistant/core · 42 tokens

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

complete-partial-pr

Evaluate and complete an issue or PR where the submitted patch fixes only a narrow symptom of the reported pain point. Use when a contribution may miss adjacent integration surfaces, provider/spec semantics, roundtrip behavior, tests, docs, or historical maintainer decisions.

pydantic/pydantic-ai · 55 tokens

analyze-market

Perform a market analysis for a product category or segment. Trigger on: market analysis, market size, TAM SAM SOM, market opportunity, industry analysis.

langchain-ai/deepagents · 34 tokens