Agent skill · Documentation

modern-python

Configures Python projects with modern tooling (uv, ruff, ty). Use when creating projects, writing standalone scripts, or migrating from pip/Poetry/mypy/black.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codeCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill modern-python --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 14
SKILL.md size: 10 KB
Bundled scripts: none
Path: plugins/modern-python/skills/modern-python/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Modern Python Guide for modern Python tooling and best practices, based on [trailofbits/cookiecutter-python](https://github.com/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

What's inside
Steps it walks through
  1. When to Use This Skill
  2. When NOT to Use This Skill
  3. Anti-Patterns to Avoid
  4. Decision Tree
  5. Tool Overview
  6. Security Tools
  7. Quick Start: Minimal Project
  8. Full Project Setup
  9. 1. Create Project Structure
  10. 2. Configure pyproject.toml
  11. 3. Install Dependencies
  12. 4. Add Makefile
  13. Migration Guide
  14. From requirements.txt + pip
Ships with 13 files
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • references/dependabot.md
  • references/migration-checklist.md
  • references/pep723-scripts.md
  • references/prek.md
  • references/pyproject.md
  • references/ruff-config.md
  • references/security-setup.md
  • references/testing.md
  • references/uv-commands.md
  • templates/dependabot.yml
  • templates/pre-commit-config.yaml
Commands it runs
Create project with uv
uv init myproject
cd myproject
Add dependencies
uv add requests rich
Add dev dependencies
uv add --group dev pytest ruff ty
Run code
uv run python src/myproject/main.py
Run tools
More from skills
All skills →
About this skill
What does the modern-python skill do?

Configures Python projects with modern tooling (uv, ruff, ty). Use when creating projects, writing standalone scripts, or migrating from pip/Poetry/mypy/black.

How do I install it?

Run `npx skills add trailofbits/skills --skill modern-python --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going