Instant — no point type-checking badly formatted code
ruff check
Fast Rust linter — catches style and logic issues cheaply
bandit
Fast fixed-rule security scan — pure AST analysis
semgrep
Slower than bandit (fetches registry rules); runs after fast checks
basedpyright
Needs full import graph resolved — slower, but before tests
pytest
Most expensive — only run when everything above passes
When to load references
If the task involves…
Load
Configuring or debugging ruff
references/ruff.md
Setting up or fixing pre-commit hooks
references/pre-commit.md
Type errors or basedpyright config
references/basedpyright.md
Security scan findings (bandit)
references/bandit.md
Custom semgrep rules
references/semgrep.md
Complete config file examples
references/complete-configs.md
Running just lint/just fix (default)
No reference needed — use inline
Quick reference: where to go deeper
Read the relevant reference file for configuration details, error code explanations,
or CI integration specifics:
Topic
Reference file
ruff (lint + format)
references/ruff.md
pre-commit hooks
references/pre-commit.md
basedpyright (type checking)
references/basedpyright.md
bandit (security linting)
references/bandit.md
semgrep (pattern scanning)
references/semgrep.md
Complete config files
references/complete-configs.md
Efficiency: batch edits and parallel calls
Parallel calls: Run independent checks (ruff check, basedpyright,
bandit) in parallel as separate tool calls in a single message.
Batch edits: When fixing multiple lint violations in the same file, combine
all fixes into a single Edit tool call.
CI ordering: Follow the fast-fail order (format → lint → bandit → semgrep →
type → test) but run independent stages in parallel where possible.
Adding a new tool
Create references/<toolname>.md using the template below.
Add a row to the tools table at the top of this file.
Add the tool's hook to .pre-commit-config.yaml (see references/pre-commit.md).
Add the tool's pyproject.toml section to references/complete-configs.md.
Insert the tool into the CI ordering table above with a rationale for placement.
New tool reference template
# <ToolName>
## What it does
## Installation
## pyproject.toml config (annotated)
## Common error codes and fixes
## Running <toolname>
## CI step
## Pre-commit hook entry
## Gotchas
1---2name: buddingengineers12345-python-project-template-python-code-qu3description: Python Code Quality Skill4---56# Python Code Quality Skill78This project enforces code quality through five tools:910| Tool | Role | Config location |11|---|---|---|12| **ruff** | Lint + format (replaces flake8 / isort / black) | `[tool.ruff]` in `pyproject.toml` |13| **pre-commit** | Git hook runner — gates every commit | `.pre-commit-config.yaml` |14| **basedpyright** | Static type checker (strict pyright fork) | `[tool.basedpyright]` in `pyproject.toml` |15| **bandit** | Security linter — fixed Python vulnerability patterns | `[tool.bandit]` in `pyproject.toml` |16| **semgrep** | Pattern-based scanner + custom rules | `.semgrep.yml` |1718---1920## Quick reference2122### Run everything locally2324```bash25pre-commit run --all-files # run all hooks on every file (recommended)2627# Or run each tool individually:28ruff format . # auto-format29ruff check --fix . # lint + auto-fix safe issues30basedpyright # type-check31bandit -c pyproject.toml -r src/ # security lint32semgrep --config .semgrep.yml src/ # pattern scan33```3435### Common failures and fast fixes3637| Symptom | Likely cause | Fix |38|---|---|---|39| `ruff` fails on unused import | `F401` rule | Remove import or `# noqa: F401` for intentional re-exports |40| `ruff format` changes file | File not formatted | Run `ruff format .` and re-stage |41| pre-commit hook not running | Hook not installed | Run `pre-commit install` |42| pre-commit passes locally, fails in CI | Staged-only vs all-files mismatch | Run `pre-commit run --all-files` before pushing |43| basedpyright `reportUnknownVariableType` | Missing annotation | Add type annotation; see `references/basedpyright.md` |44| basedpyright `reportMissingImports` | Package not in venv | Install package or add stub; see `references/basedpyright.md` |45| bandit `B[code]` finding | Security anti-pattern | Fix or add `# nosec B<code>` with explanation |46| semgrep finding | Code matches security pattern | Fix or add `# nosemgrep: <rule-id>` inline |4748### CI ordering (fast-fail principle)4950Run cheapest checks first so failures surface quickly without wasting time on later stages:5152```53ruff format --check → ruff check → bandit → semgrep → basedpyright → pytest54```5556| Stage | Why here |57|---|---|58| `ruff format --check` | Instant — no point type-checking badly formatted code |59| `ruff check` | Fast Rust linter — catches style and logic issues cheaply |60| `bandit` | Fast fixed-rule security scan — pure AST analysis |61| `semgrep` | Slower than bandit (fetches registry rules); runs after fast checks |62| `basedpyright` | Needs full import graph resolved — slower, but before tests |63| `pytest` | Most expensive — only run when everything above passes |6465---6667## When to load references6869| If the task involves… | Load |70|----------------------------------------|-----------------------------------|71| Configuring or debugging ruff | `references/ruff.md` |72| Setting up or fixing pre-commit hooks | `references/pre-commit.md` |73| Type errors or basedpyright config | `references/basedpyright.md` |74| Security scan findings (bandit) | `references/bandit.md` |75| Custom semgrep rules | `references/semgrep.md` |76| Complete config file examples | `references/complete-configs.md` |77| Running `just lint`/`just fix` (default) | No reference needed — use inline |7879## Quick reference: where to go deeper8081Read the relevant reference file for configuration details, error code explanations,82or CI integration specifics:8384| Topic | Reference file |85|---------------------------------|----------------------------------------------------------------------|86| ruff (lint + format) | [references/ruff.md](references/ruff.md) |87| pre-commit hooks | [references/pre-commit.md](references/pre-commit.md) |88| basedpyright (type checking) | [references/basedpyright.md](references/basedpyright.md) |89| bandit (security linting) | [references/bandit.md](references/bandit.md) |90| semgrep (pattern scanning) | [references/semgrep.md](references/semgrep.md) |91| Complete config files | [references/complete-configs.md](references/complete-configs.md) |9293---9495## Efficiency: batch edits and parallel calls9697- **Parallel calls:** Run independent checks (`ruff check`, `basedpyright`,98 `bandit`) in parallel as separate tool calls in a single message.99- **Batch edits:** When fixing multiple lint violations in the same file, combine100 all fixes into a single Edit tool call.101- **CI ordering:** Follow the fast-fail order (format → lint → bandit → semgrep →102 type → test) but run independent stages in parallel where possible.103104## Adding a new tool1051061. Create `references/<toolname>.md` using the template below.1072. Add a row to the tools table at the top of this file.1083. Add the tool's hook to `.pre-commit-config.yaml` (see `references/pre-commit.md`).1094. Add the tool's `pyproject.toml` section to `references/complete-configs.md`.1105. Insert the tool into the CI ordering table above with a rationale for placement.111112### New tool reference template113114```markdown115# <ToolName>116117## What it does118## Installation119## pyproject.toml config (annotated)120## Common error codes and fixes121## Running <toolname>122## CI step123## Pre-commit hook entry124## Gotchas125```126127---128> Source: [buddingengineers12345/python_project_template](https://github.com/buddingengineers12345/python_project_template) — distributed by [TomeVault](https://tomevault.io).129<!-- tomevault:4.0:skill_md:2026-06-15 -->
Run npx skillmds@latest add tomevault-io/buddingengineers12345-python-project-template-python-code-qu in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Python Code Quality Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.