[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CH9NFT6CP2D9BHDD2RDJ8Z":3,"skill-same:01M7CH9NFT6CP2D9BHDD2RDJ8Z":100},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7CH9NFT6CP2D9BHDD2RDJ8Z","modern-python",null,"Configures Python projects with modern tooling (uv, ruff, ty). Use when creating projects, writing standalone scripts, or migrating from pip\u002FPoetry\u002Fmypy\u002Fblack.","bongkage\u002Ftrailofbits-skills","bongkage","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F101378796?v=4","01M7CH419QTJ16DNJ33P0WCWBE","01M7CH41A9NWK8D2JBRK9F0M2C",1,"CC-BY-SA-4.0","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: modern-python\ndescription: Configures Python projects with modern tooling (uv, ruff, ty). Use when creating projects, writing standalone scripts, or migrating from pip\u002FPoetry\u002Fmypy\u002Fblack.\n---\n\n# Modern Python\n\nGuide for modern Python tooling and best practices, based on [trailofbits\u002Fcookiecutter-python](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fcookiecutter-python).\n\n## When to Use This Skill\n\n- Creating a new Python project or package\n- Setting up `pyproject.toml` configuration\n- Configuring development tools (linting, formatting, testing)\n- Writing Python scripts with external dependencies\n- Migrating from legacy tools (when user requests it)\n\n## When NOT to Use This Skill\n\n- **User wants to keep legacy tooling**: Respect existing workflows if explicitly requested\n- **Python \u003C 3.11 required**: These tools target modern Python\n- **Non-Python projects**: Mixed codebases where Python isn't primary\n\n## Anti-Patterns to Avoid\n\n| Avoid | Use Instead |\n|-------|-------------|\n| `[tool.ty]` python-version | `[tool.ty.environment]` python-version |\n| `uv pip install` | `uv add` and `uv sync` |\n| Editing pyproject.toml manually to add deps | `uv add \u003Cpkg>` \u002F `uv remove \u003Cpkg>` |\n| `hatchling` build backend | `uv_build` (simpler, sufficient for most cases) |\n| Poetry | uv (faster, simpler, better ecosystem integration) |\n| requirements.txt | PEP 723 for scripts, pyproject.toml for projects |\n| mypy \u002F pyright | ty (faster, from Astral team) |\n| `[project.optional-dependencies]` for dev tools | `[dependency-groups]` (PEP 735) |\n| Manual virtualenv activation (`source .venv\u002Fbin\u002Factivate`) | `uv run \u003Ccmd>` |\n| pre-commit | prek (faster, no Python runtime needed) |\n\n**Key principles:**\n- Always use `uv add` and `uv remove` to manage dependencies\n- Never manually activate or manage virtual environments—use `uv run` for all commands\n- Use `[dependency-groups]` for dev\u002Ftest\u002Fdocs dependencies, not `[project.optional-dependencies]`\n\n## Decision Tree\n\n```\nWhat are you doing?\n│\n├─ Single-file script with dependencies?\n│   └─ Use PEP 723 inline metadata (.\u002Freferences\u002Fpep723-scripts.md)\n│\n├─ New multi-file project (not distributed)?\n│   └─ Minimal uv setup (see Quick Start below)\n│\n├─ New reusable package\u002Flibrary?\n│   └─ Full project setup (see Full Setup below)\n│\n└─ Migrating existing project?\n    └─ See Migration Guide below\n```\n\n## Tool Overview\n\n| Tool | Purpose | Replaces |\n|------|---------|----------|\n| **uv** | Package\u002Fdependency management | pip, virtualenv, pip-tools, pipx, pyenv |\n| **ruff** | Linting AND formatting | flake8, black, isort, pyupgrade, pydocstyle |\n| **ty** | Type checking | mypy, pyright (faster alternative) |\n| **pytest** | Testing with coverage | unittest |\n| **prek** | Pre-commit hooks ([setup](.\u002Freferences\u002Fprek.md)) | pre-commit (faster, Rust-native) |\n\n### Security Tools\n\n| Tool | Purpose | When It Runs |\n|------|---------|--------------|\n| **shellcheck** | Shell script linting | pre-commit |\n| **detect-secrets** | Secret detection | pre-commit |\n| **actionlint** | Workflow syntax validation | pre-commit, CI |\n| **zizmor** | Workflow security audit | pre-commit, CI |\n| **pip-audit** | Dependency vulnerability scanning | CI, manual |\n| **Dependabot** | Automated dependency updates | scheduled |\n\nSee [security-setup.md](.\u002Freferences\u002Fsecurity-setup.md) for configuration and usage.\n\n## Quick Start: Minimal Project\n\nFor simple multi-file projects not intended for distribution:\n\n```bash\n# Create project with uv\nuv init myproject\ncd myproject\n\n# Add dependencies\nuv add requests rich\n\n# Add dev dependencies\nuv add --group dev pytest ruff ty\n\n# Run code\nuv run python src\u002Fmyproject\u002Fmain.py\n\n# Run tools\nuv run pytest\nuv run ruff check .\n```\n\n## Full Project Setup\nIf starting from scratch, ask the user if they prefer to use the Trail of Bits cookiecutter template to bootstrap a complete project with already preconfigured tooling.\n\n```bash\nuvx cookiecutter gh:trailofbits\u002Fcookiecutter-python\n```\n\n### 1. Create Project Structure\n\n```bash\nuv init --package myproject\ncd myproject\n```\n\nThis creates:\n```\nmyproject\u002F\n├── pyproject.toml\n├── README.md\n├── src\u002F\n│   └── myproject\u002F\n│       └── __init__.py\n└── .python-version\n```\n\n### 2. Configure pyproject.toml\n\nSee [pyproject.md](.\u002Freferences\u002Fpyproject.md) for complete configuration reference.\n\nKey sections:\n```toml\n[project]\nname = \"myproject\"\nversion = \"0.1.0\"\nrequires-python = \">=3.11\"\ndependencies = []\n\n[dependency-groups]\ndev = [{include-group = \"lint\"}, {include-group = \"test\"}, {include-group = \"audit\"}]\nlint = [\"ruff\", \"ty\"]\ntest = [\"pytest\", \"pytest-cov\"]\naudit = [\"pip-audit\"]\n\n[tool.ruff]\nline-length = 100\ntarget-version = \"py311\"\n\n[tool.ruff.lint]\nselect = [\"ALL\"]\nignore = [\"D\", \"COM812\", \"ISC001\"]\n\n[tool.pytest]\naddopts = [\"--cov=myproject\", \"--cov-fail-under=80\"]\n\n[tool.ty.terminal]\nerror-on-warning = true\n\n[tool.ty.environment]\npython-version = \"3.11\"\n\n[tool.ty.rules]\n# Strict from day 1 for new projects\npossibly-unresolved-reference = \"error\"\nunused-ignore-comment = \"warn\"\n```\n\n### 3. Install Dependencies\n\n```bash\n# Install all dependency groups\nuv sync --all-groups\n\n# Or install specific groups\nuv sync --group dev\n```\n\n### 4. Add Makefile\n\n```makefile\n.PHONY: dev lint format test build\n\ndev:\n\tuv sync --all-groups\n\nlint:\n\tuv run ruff format --check && uv run ruff check && uv run ty check src\u002F\n\nformat:\n\tuv run ruff format .\n\ntest:\n\tuv run pytest\n\nbuild:\n\tuv build\n```\n\n## Migration Guide\n\nWhen a user requests migration from legacy tooling:\n\n### From requirements.txt + pip\n\nFirst, determine the nature of the code:\n\n**For standalone scripts**: Convert to PEP 723 inline metadata (see [pep723-scripts.md](.\u002Freferences\u002Fpep723-scripts.md))\n\n**For projects**:\n```bash\n# Initialize uv in existing project\nuv init --bare\n\n# Add dependencies using uv (not by editing pyproject.toml)\nuv add requests rich  # add each package\n\n# Or import from requirements.txt (review each package before adding)\n# Note: Complex version specifiers may need manual handling\ngrep -v '^#' requirements.txt | grep -v '^-' | grep -v '^\\s*$' | while read -r pkg; do\n    uv add \"$pkg\" || echo \"Failed to add: $pkg\"\ndone\n\nuv sync\n```\n\nThen:\n1. Delete `requirements.txt`, `requirements-dev.txt`\n2. Delete virtual environment (`venv\u002F`, `.venv\u002F`)\n3. Add `uv.lock` to version control\n\n### From setup.py \u002F setup.cfg\n\n1. Run `uv init --bare` to create pyproject.toml\n2. Use `uv add` to add each dependency from `install_requires`\n3. Use `uv add --group dev` for dev dependencies\n4. Copy non-dependency metadata (name, version, description, etc.) to `[project]`\n5. Delete `setup.py`, `setup.cfg`, `MANIFEST.in`\n\n### From flake8 + black + isort\n\n1. Remove flake8, black, isort via `uv remove`\n2. Delete `.flake8`, `pyproject.toml [tool.black]`, `[tool.isort]` configs\n3. Add ruff: `uv add --group dev ruff`\n4. Add ruff configuration (see [ruff-config.md](.\u002Freferences\u002Fruff-config.md))\n5. Run `uv run ruff check --fix .` to apply fixes\n6. Run `uv run ruff format .` to format\n\n### From mypy \u002F pyright\n\n1. Remove mypy\u002Fpyright via `uv remove`\n2. Delete `mypy.ini`, `pyrightconfig.json`, or `[tool.mypy]`\u002F`[tool.pyright]` sections\n3. Add ty: `uv add --group dev ty`\n4. Run `uv run ty check src\u002F`\n\n## Quick Reference: uv Commands\n\n| Command | Description |\n|---------|-------------|\n| `uv init` | Create new project |\n| `uv init --package` | Create distributable package |\n| `uv add \u003Cpkg>` | Add dependency |\n| `uv add --group dev \u003Cpkg>` | Add to dependency group |\n| `uv remove \u003Cpkg>` | Remove dependency |\n| `uv sync` | Install dependencies |\n| `uv sync --all-groups` | Install all dependency groups |\n| `uv run \u003Ccmd>` | Run command in venv |\n| `uv run --with \u003Cpkg> \u003Ccmd>` | Run with temporary dependency |\n| `uv build` | Build package |\n| `uv publish` | Publish to PyPI |\n\n### Ad-hoc Dependencies with `--with`\n\nUse `uv run --with` for one-off commands that need packages not in your project:\n\n```bash\n# Run Python with a temporary package\nuv run --with requests python -c \"import requests; print(requests.get('https:\u002F\u002Fhttpbin.org\u002Fip').json())\"\n\n# Run a module with temporary deps\nuv run --with rich python -m rich.progress\n\n# Multiple packages\nuv run --with requests --with rich python script.py\n\n# Combine with project deps (adds to existing venv)\nuv run --with httpx pytest  # project deps + httpx\n```\n\n**When to use `--with` vs `uv add`:**\n- `uv add`: Package is a project dependency (goes in pyproject.toml\u002Fuv.lock)\n- `--with`: One-off usage, testing, or scripts outside a project context\n\nSee [uv-commands.md](.\u002Freferences\u002Fuv-commands.md) for complete reference.\n\n## Quick Reference: Dependency Groups\n\n```toml\n[dependency-groups]\ndev = [\"ruff\", \"ty\"]\ntest = [\"pytest\", \"pytest-cov\", \"hypothesis\"]\ndocs = [\"sphinx\", \"myst-parser\"]\n```\n\nInstall with: `uv sync --group dev --group test`\n\n## Best Practices Checklist\n\n- [ ] Use `src\u002F` layout for packages\n- [ ] Set `requires-python = \">=3.11\"`\n- [ ] Configure ruff with `select = [\"ALL\"]` and explicit ignores\n- [ ] Use ty for type checking\n- [ ] Enforce test coverage minimum (80%+)\n- [ ] Use dependency groups instead of extras for dev tools\n- [ ] Add `uv.lock` to version control\n- [ ] Use PEP 723 for standalone scripts\n\n## Read Next\n\n- [migration-checklist.md](.\u002Freferences\u002Fmigration-checklist.md) - Step-by-step migration cleanup\n- [pyproject.md](.\u002Freferences\u002Fpyproject.md) - Complete pyproject.toml reference\n- [uv-commands.md](.\u002Freferences\u002Fuv-commands.md) - uv command reference\n- [ruff-config.md](.\u002Freferences\u002Fruff-config.md) - Ruff linting\u002Fformatting configuration\n- [testing.md](.\u002Freferences\u002Ftesting.md) - pytest and coverage setup\n- [pep723-scripts.md](.\u002Freferences\u002Fpep723-scripts.md) - PEP 723 inline script metadata\n- [prek.md](.\u002Freferences\u002Fprek.md) - Fast pre-commit hooks with prek\n- [security-setup.md](.\u002Freferences\u002Fsecurity-setup.md) - Security hooks and dependency scanning\n- [dependabot.md](.\u002Freferences\u002Fdependabot.md) - Automated dependency updates\n","# Modern Python\n\nGuide for modern Python tooling and best practices, based on [trailofbits\u002Fcookiecutter-python](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fcookiecutter-python).\n\n## When to Use This Skill\n\n- Creating a new Python project or package\n- Setting up `pyproject.toml` configuration\n- Configuring development tools (linting, formatting, testing)\n- Writing Python scripts with external dependencies\n- Migrating from legacy tools (when user requests it)\n\n## When NOT to Use This Skill\n\n- **User wants to keep legacy tooling**: Respect existing workflows if explicitly requested\n- **Python \u003C 3.11 required**: These tools target modern Python\n- **Non-Python projects**: Mixed codebases where Python isn't primary\n\n## Anti-Patterns to Avoid\n\n| Avoid | Use Instead |\n|-------|-------------|\n| `[tool.ty]` python-version | `[tool.ty.environment]` python-version |\n| `uv pip install` | `uv add` and `uv sync` |\n| Editing pyproject.toml manually to add deps | `uv add \u003Cpkg>` \u002F `uv remove \u003Cpkg>` |\n| `hatchling` build backend | `uv_build` (simpler, sufficient for most cases) |\n| Poetry | uv (faster, simpler, better ecosystem integration) |\n| requirements.txt | PEP 723 for scripts, pyproject.toml for projects |\n| mypy \u002F pyright | ty (faster, from Astral team) |\n| `[project.optional-dependencies]` for dev tools | `[dependency-groups]` (PEP 735) |\n| Manual virtualenv activation (`source .venv\u002Fbin\u002Factivate`) | `uv run \u003Ccmd>` |\n| pre-commit | prek (faster, no Python runtime needed) |\n\n**Key principles:**\n- Always use `uv add` and `uv remove` to manage dependencies\n- Never manually activate or manage virtual environments—use `uv run` for all commands\n- Use `[dependency-groups]` for dev\u002Ftest\u002Fdocs dependencies, not `[project.optional-dependencies]`\n\n## Decision Tree\n\n```\nWhat are you doing?\n│\n├─ Single-file script with dependencies?\n│   └─ Use PEP 723 inline metadata (.\u002Freferences\u002Fpep723-scripts.md)\n│\n├─ New multi-file project (not distributed)?\n│   └─ Minimal uv setup (see Quick Start below)\n│\n├─ New reusable package\u002Flibrary?\n│   └─ Full project setup (see Full Setup below)\n│\n└─ Migrating existing project?\n    └─ See Migration Guide below\n```\n\n## Tool Overview\n\n| Tool | Purpose | Replaces |\n|------|---------|----------|\n| **uv** | Package\u002Fdependency management | pip, virtualenv, pip-tools, pipx, pyenv |\n| **ruff** | Linting AND formatting | flake8, black, isort, pyupgrade, pydocstyle |\n| **ty** | Type checking | mypy, pyright (faster alternative) |\n| **pytest** | Testing with coverage | unittest |\n| **prek** | Pre-commit hooks ([setup](.\u002Freferences\u002Fprek.md)) | pre-commit (faster, Rust-native) |\n\n### Security Tools\n\n| Tool | Purpose | When It Runs |\n|------|---------|--------------|\n| **shellcheck** | Shell script linting | pre-commit |\n| **detect-secrets** | Secret detection | pre-commit |\n| **actionlint** | Workflow syntax validation | pre-commit, CI |\n| **zizmor** | Workflow security audit | pre-commit, CI |\n| **pip-audit** | Dependency vulnerability scanning | CI, manual |\n| **Dependabot** | Automated dependency updates | scheduled |\n\nSee [security-setup.md](.\u002Freferences\u002Fsecurity-setup.md) for configuration and usage.\n\n## Quick Start: Minimal Project\n\nFor simple multi-file projects not intended for distribution:\n\n```bash\n# Create project with uv\nuv init myproject\ncd myproject\n\n# Add dependencies\nuv add requests rich\n\n# Add dev dependencies\nuv add --group dev pytest ruff ty\n\n# Run code\nuv run python src\u002Fmyproject\u002Fmain.py\n\n# Run tools\nuv run pytest\nuv run ruff check .\n```\n\n## Full Project Setup\nIf starting from scratch, ask the user if they prefer to use the Trail of Bits cookiecutter template to bootstrap a complete project with already preconfigured tooling.\n\n```bash\nuvx cookiecutter gh:trailofbits\u002Fcookiecutter-python\n```\n\n### 1. Create Project Structure\n\n```bash\nuv init --package myproject\ncd myproject\n```\n\nThis creates:\n```\nmyproject\u002F\n├── pyproject.toml\n├── README.md\n├── src\u002F\n│   └── myproject\u002F\n│       └── __init__.py\n└── .python-version\n```\n\n### 2. Configure pyproject.toml\n\nSee [pyproject.md](.\u002Freferences\u002Fpyproject.md) for complete configuration reference.\n\nKey sections:\n```toml\n[project]\nname = \"myproject\"\nversion = \"0.1.0\"\nrequires-python = \">=3.11\"\ndependencies = []\n\n[dependency-groups]\ndev = [{include-group = \"lint\"}, {include-group = \"test\"}, {include-group = \"audit\"}]\nlint = [\"ruff\", \"ty\"]\ntest = [\"pytest\", \"pytest-cov\"]\naudit = [\"pip-audit\"]\n\n[tool.ruff]\nline-length = 100\ntarget-version = \"py311\"\n\n[tool.ruff.lint]\nselect = [\"ALL\"]\nignore = [\"D\", \"COM812\", \"ISC001\"]\n\n[tool.pytest]\naddopts = [\"--cov=myproject\", \"--cov-fail-under=80\"]\n\n[tool.ty.terminal]\nerror-on-warning = true\n\n[tool.ty.environment]\npython-version = \"3.11\"\n\n[tool.ty.rules]\n# Strict from day 1 for new projects\npossibly-unresolved-reference = \"error\"\nunused-ignore-comment = \"warn\"\n```\n\n### 3. Install Dependencies\n\n```bash\n# Install all dependency groups\nuv sync --all-groups\n\n# Or install specific groups\nuv sync --group dev\n```\n\n### 4. Add Makefile\n\n```makefile\n.PHONY: dev lint format test build\n\ndev:\n\tuv sync --all-groups\n\nlint:\n\tuv run ruff format --check && uv run ruff check && uv run ty check src\u002F\n\nformat:\n\tuv run ruff format .\n\ntest:\n\tuv run pytest\n\nbuild:\n\tuv build\n```\n\n## Migration Guide\n\nWhen a user requests migration from legacy tooling:\n\n### From requirements.txt + pip\n\nFirst, determine the nature of the code:\n\n**For standalone scripts**: Convert to PEP 723 inline metadata (see [pep723-scripts.md](.\u002Freferences\u002Fpep723-scripts.md))\n\n**For projects**:\n```bash\n# Initialize uv in existing project\nuv init --bare\n\n# Add dependencies using uv (not by editing pyproject.toml)\nuv add requests rich  # add each package\n\n# Or import from requirements.txt (review each package before adding)\n# Note: Complex version specifiers may need manual handling\ngrep -v '^#' requirements.txt | grep -v '^-' | grep -v '^\\s*$' | while read -r pkg; do\n    uv add \"$pkg\" || echo \"Failed to add: $pkg\"\ndone\n\nuv sync\n```\n\nThen:\n1. Delete `requirements.txt`, `requirements-dev.txt`\n2. Delete virtual environment (`venv\u002F`, `.venv\u002F`)\n3. Add `uv.lock` to version control\n\n### From setup.py \u002F setup.cfg\n\n1. Run `uv init --bare` to create pyproject.toml\n2. Use `uv add` to add each dependency from `install_requires`\n3. Use `uv add --group dev` for dev dependencies\n4. Copy non-dependency metadata (name, version, description, etc.) to `[project]`\n5. Delete `setup.py`, `setup.cfg`, `MANIFEST.in`\n\n### From flake8 + black + isort\n\n1. Remove flake8, black, isort via `uv remove`\n2. Delete `.flake8`, `pyproject.toml [tool.black]`, `[tool.isort]` configs\n3. Add ruff: `uv add --group dev ruff`\n4. Add ruff configuration (see [ruff-config.md](.\u002Freferences\u002Fruff-config.md))\n5. Run `uv run ruff check --fix .` to apply fixes\n6. Run `uv run ruff format .` to format\n\n### From mypy \u002F pyright\n\n1. Remove mypy\u002Fpyright via `uv remove`\n2. Delete `mypy.ini`, `pyrightconfig.json`, or `[tool.mypy]`\u002F`[tool.pyright]` sections\n3. Add ty: `uv add --group dev ty`\n4. Run `uv run ty check src\u002F`\n\n## Quick Reference: uv Commands\n\n| Command | Description |\n|---------|-------------|\n| `uv init` | Create new project |\n| `uv init --package` | Create distributable package |\n| `uv add \u003Cpkg>` | Add dependency |\n| `uv add --group dev \u003Cpkg>` | Add to dependency group |\n| `uv remove \u003Cpkg>` | Remove dependency |\n| `uv sync` | Install dependencies |\n| `uv sync --all-groups` | Install all dependency groups |\n| `uv run \u003Ccmd>` | Run command in venv |\n| `uv run --with \u003Cpkg> \u003Ccmd>` | Run with temporary dependency |\n| `uv build` | Build package |\n| `uv publish` | Publish to PyPI |\n\n### Ad-hoc Dependencies with `--with`\n\nUse `uv run --with` for one-off commands that need packages not in your project:\n\n```bash\n# Run Python with a temporary package\nuv run --with requests python -c \"import requests; print(requests.get('https:\u002F\u002Fhttpbin.org\u002Fip').json())\"\n\n# Run a module with temporary deps\nuv run --with rich python -m rich.progress\n\n# Multiple packages\nuv run --with requests --with rich python script.py\n\n# Combine with project deps (adds to existing venv)\nuv run --with httpx pytest  # project deps + httpx\n```\n\n**When to use `--with` vs `uv add`:**\n- `uv add`: Package is a project dependency (goes in pyproject.toml\u002Fuv.lock)\n- `--with`: One-off usage, testing, or scripts outside a project context\n\nSee [uv-commands.md](.\u002Freferences\u002Fuv-commands.md) for complete reference.\n\n## Quick Reference: Dependency Groups\n\n```toml\n[dependency-groups]\ndev = [\"ruff\", \"ty\"]\ntest = [\"pytest\", \"pytest-cov\", \"hypothesis\"]\ndocs = [\"sphinx\", \"myst-parser\"]\n```\n\nInstall with: `uv sync --group dev --group test`\n\n## Best Practices Checklist\n\n- [ ] Use `src\u002F` layout for packages\n- [ ] Set `requires-python = \">=3.11\"`\n- [ ] Configure ruff with `select = [\"ALL\"]` and explicit ignores\n- [ ] Use ty for type checking\n- [ ] Enforce test coverage minimum (80%+)\n- [ ] Use dependency groups instead of extras for dev tools\n- [ ] Add `uv.lock` to version control\n- [ ] Use PEP 723 for standalone scripts\n\n## Read Next\n\n- [migration-checklist.md](.\u002Freferences\u002Fmigration-checklist.md) - Step-by-step migration cleanup\n- [pyproject.md](.\u002Freferences\u002Fpyproject.md) - Complete pyproject.toml reference\n- [uv-commands.md](.\u002Freferences\u002Fuv-commands.md) - uv command reference\n- [ruff-config.md](.\u002Freferences\u002Fruff-config.md) - Ruff linting\u002Fformatting configuration\n- [testing.md](.\u002Freferences\u002Ftesting.md) - pytest and coverage setup\n- [pep723-scripts.md](.\u002Freferences\u002Fpep723-scripts.md) - PEP 723 inline script metadata\n- [prek.md](.\u002Freferences\u002Fprek.md) - Fast pre-commit hooks with prek\n- [security-setup.md](.\u002Freferences\u002Fsecurity-setup.md) - Security hooks and dependency scanning\n- [dependabot.md](.\u002Freferences\u002Fdependabot.md) - Automated dependency updates\n",{"name":5,"description":7},"main","321ccfe628eca0d314b0ee4eaffcdd8a05639aaf","plugins\u002Fmodern-python\u002Fskills\u002Fmodern-python",0,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills","https:\u002F\u002Fgithub.com\u002Fbongkage","2026-11-06 12:15:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add bongkage\u002Ftrailofbits-skills --skill modern-python",{"tool":36,"command":37},"bunx","bunx skills add bongkage\u002Ftrailofbits-skills --skill modern-python",{"tool":39,"command":40},"pnpm","pnpm dlx skills add bongkage\u002Ftrailofbits-skills --skill modern-python","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002FSKILL.md",true,[44,50,56,60,64,68,72,76,80,84,88,92,96],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",128,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Fagents\u002Fopenai.yaml",{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"assets\u002Ftrail-of-bits-mark.svg","ASSET","资产文件",3084,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Fassets\u002Ftrail-of-bits-mark.svg",{"path":57,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fdependabot.md",1800,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fdependabot.md",{"path":61,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fmigration-checklist.md",3071,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fmigration-checklist.md",{"path":65,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fpep723-scripts.md",5134,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fpep723-scripts.md",{"path":69,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fprek.md",5951,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fprek.md",{"path":73,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fpyproject.md",5694,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fpyproject.md",{"path":77,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fruff-config.md",5476,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fruff-config.md",{"path":81,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fsecurity-setup.md",6504,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fsecurity-setup.md",{"path":85,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Ftesting.md",5214,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Ftesting.md",{"path":89,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fuv-commands.md",4653,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Freferences\u002Fuv-commands.md",{"path":93,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":94,"sourceHtmlUrl":95},"templates\u002Fdependabot.yml",958,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Ftemplates\u002Fdependabot.yml",{"path":97,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":98,"sourceHtmlUrl":99},"templates\u002Fpre-commit-config.yaml",2259,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmodern-python\u002Fskills\u002Fmodern-python\u002Ftemplates\u002Fpre-commit-config.yaml",[101,108,115,122,129,136],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M7CHJAESZRWKJXFQG55BMNAA","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fzeroize-audit\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":18},"01M7CHJ543G42A9GQC3PJE4F4V","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fyara-authoring\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":18},"01M7CHHYVFS1AKDTH3YDS1Y4K4","writing-lean-proofs","Writes and reviews structured Lean 4 proofs and designs Lean libraries following Mathlib conventions. Use when proving theorems in Lean, formalizing mathematics or specifications in Lean 4, defining new types or definitions in a Lean library, reviewing Lean proofs for readability and maintainability, refactoring long tactic proofs into lemmas, filling in sorry placeholders in a Lean development, setting up CI or linters for a Lean project, diagnosing slow proofs or maxHeartbeats timeouts, or writing custom tactics, macros, or linters.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fwriting-lean-proofs\u002Fskills\u002Fwriting-lean-proofs\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":18},"01M7CHHQXA39M4965MV2RMM5YS","vulnerability-triage-brocards","This skill should be used when the user asks to \"triage a vulnerability report\", \"assess a CVE\", \"evaluate a bug bounty submission\", \"decide if a finding is valid\", \"review a security finding\", \"dismiss a vulnerability\", \"should we fix this CVE\", \"prioritize a vulnerability report\", or needs to determine whether an incoming vulnerability report warrants investigation. Applies 7 brocards (rules of thumb) to systematically accept, dismiss, or request more information on vulnerability reports, or needs to filter raw findings from agentic vulnerability discovery pipelines before human review.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fvulnerability-triage-brocards\u002Fskills\u002Fvulnerability-triage-brocards\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":18},"01M7CHHJVQC2ZG2M310GXT0T42","variant-analysis","Hunts for the other instances of a bug already found — the variants of one root cause across a codebase. Use immediately after a vulnerability, logic bug, or bad pattern turns up in a specific file and the question becomes where else it occurs, including the bare conversational form (\"are there others like this?\", \"is this the same bug?\"). Also for generalizing one known instance into a CodeQL or Semgrep query for its whole pattern family, and for triaging a set of look-alike candidates against a known root cause. Not for initial discovery with no bug in hand.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fvariant-analysis\u002Fskills\u002Fvariant-analysis\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":18},"01M7CHHC1GM5GH585ZWGP7D03P","vector-forge","Mutation-driven test vector generation. Finds implementations of a cryptographic algorithm or protocol, runs mutation testing to identify escaped mutants, then generates new test vectors that deliberately exercise the uncovered code paths. Compares before\u002Fafter mutation kill rates to prove vector effectiveness. Use when generating cryptographic test vectors, measuring Wycheproof coverage gaps, finding escaped mutants via mutation testing, creating cross-implementation test suites, or improving test vector coverage for crypto primitives.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Ftrailmark\u002Fskills\u002Fvector-forge\u002FSKILL.md",[],[]]