agentleFS
alexderzalexderz/agentic-toolbox/skills/modern-python/SKILL.md

modern-python

Skill5 starsChanged 46 days agoMITView on GitHub

use this when creating, configuring, or migrating a Python project or standalone script — uv, ruff, ty, pytest; do not reach for pip, Poetry, mypy, or black unless the operator keeps legacy.

  • Installs packages

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use grill-me.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not a vendor paste. Tool facts from the public uv, ruff, ty, and pytest docs.

    line 9
  2. Distinctive:

    Keep pip / Poetry / mypy / black only when the operator says so.

    line 19
  3. Very specific:

    No lockfile. If the code spans more than one file, use pyproject.toml.

    line 123
  4. Very specific:

    Use uv run --with pkg only as a one-off probe.

    line 124
  5. Distinctive:

    If a requirement has odd markers or is a VCS dep, stop and do it by hand.

    line 137
  6. Distinctive:

    Never import a lock you have not read.

    line 138
  7. Distinctive:

    Stop. Use uv. Or Ask first.

    line 178

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Modern Python

First-party. MIT. Id: modern-python. SKILL.md only. No scripts/. Not a vendor paste. Tool facts from the public uv, ruff, ty, and pytest docs.

Load-with list and lang-python pointer: language-router Load-with list, Map.

Iron law

uv add / uv remove change dependencies. uv run runs tools. Do not activate a venv or hand-edit dependency lists.

On new work, use Python 3.12+, uv, ruff (lint and format), ty, pytest. Keep pip / Poetry / mypy / black only when the operator says so.

Always

RuleWhy
uv add / uv remove / uv syncuv.lock is the install truth
uv run <cmd>Project env without source .venv/bin/activate
Commit uv.lockReproducible installs
ruff for lint and formatOne tool, not flake8 + black + isort
ty for typesReplaces mypy / pyright on new work
pytest for testsNot unittest as the default
PEP 723 metadata for a one-file scriptNo requirements.txt for a script
Pair with security-hardening on untrusted inputeval, pickle, yaml.load, shell=True

Ask first

TopicWhy
Keep pip / Poetry / mypy / black / pyrightThey may own that workflow
Python older than 3.12 on new workPin is 3.12+
Migrate a shipping treeConfirm before deleting requirements.txt / setup.py
uv pip installBypasses the lockfile
Publish, extra indexes, private registriesTrust and credentials
pre-commit / hook installerstester owns CI; do not add hook packs here

Never

NeverInsteadWhy
Marketplace npx skills add / plugin installFollow INTAKE.mdIntake owns third-party skills
scripts/ in this skill dirKeep this skill SKILL.md onlyIntake quarantine
Hand-edit pyproject.toml to add/remove depsuv add / uv removeuv.lock is the install truth
Secrets in pyproject.toml, scripts, or lockfilesLeave them out; see security-hardeningHistory is forever
Live network in tests unless markedMark each test that needs the networkDefault tests stay offline

Decision

DoingPath
One file + depsPEP 723 script
App, not publisheduv init then groups
Importable packageuv init --package
Existing treeMigrate; if it already ships, Ask first

Tools

ToolPurposeReplaces
uvDeps, venv, run, lock, buildpip, virtualenv, pip-tools, pipx, Poetry
ruffLint + formatflake8, black, isort, pyupgrade
tyTypesmypy, pyright
pytestTestsunittest as the default

Scanners and CI hooks are tester / security, not this skill.

New project

uv init myproject
cd myproject
uv add httpx
uv add --dev pytest ruff ty
uv sync
uv run pytest
uv run ruff check .
uv run ruff format --check
uv run ty check .

Package:

uv init --package myproject
cd myproject
uv sync
uv build

uv add owns [project].dependencies and the dev group. Never type packages into pyproject.toml by hand; run uv add.

PEP 723 scripts

#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
#     "httpx",
# ]
# ///

import httpx

print(httpx.get("https://example.com").status_code)
uv init --script myscript.py
uv add --script myscript.py httpx
uv run myscript.py

No lockfile. If the code spans more than one file, use pyproject.toml. Use uv run --with pkg only as a one-off probe; add project deps with uv add.

Migration

Migrate only when asked.

FromDoThen delete
requirements.txt + pipuv init; uv add each reviewed packagerequirements*.txt, old venv/; commit uv.lock
setup.py / setup.cfguv init; uv add from install_requires; copy name/version into [project]setup.py, setup.cfg
flake8 + black + isortuv remove them; drop their config; uv add --dev ruff.flake8, [tool.black], [tool.isort]
mypy / pyrightuv remove; uv add --dev tymypy.ini, pyrightconfig.json, [tool.mypy]

If a requirement has odd markers or is a VCS dep, stop and do it by hand. Never import a lock you have not read; read it first.

uv (short)

CommandUse
uv init / uv init --packageApp vs package
uv add <pkg> / uv add --dev <pkg>Deps
uv remove <pkg>Drop a dep
uv syncInstall from the lock
uv run <cmd>Run in the project env
uv run --with <pkg>Temporary extra
uv buildWheel/sdist; publish is Ask first

Verify

uv run pytest
uv run ruff check .
uv run ruff format --check
uv run ty check .

Roles

RoleOwnsDoes not own
builderThis toolchain on product workAdding scripts/ to this skill
testerruff/fmt hooks when .py appearsA second Python skill
securityIntakeDay-to-day uv add
managerAfter-actBlessing a marketplace Python pack

Red flags

  • “I’ll pip install just this once”
  • “source the venv”
  • “hand-edit pyproject to add the package”
  • “keep requirements.txt and uv”
  • “copy a vendor Python skill pack”

Stop. Use uv. Or Ask first.

License

MIT. First-party. See repo LICENSE and SOURCES.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.