/py-pit:code-qualityfrom py-pit
Opinionated code health stack for Python repos using Ruff, pre-commit, and Markdown linting. Consolidates redundant tooling and provides a simple adoption path for new and existing projects.
Ships in py-pit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Opinionated guidance for adopting a small, high-signal code health stack in Python repositories.
This skill standardizes on:
This skill is intentionally opinionated. It favors consolidation, low redundancy, fast feedback, and easy adoption.
It is designed for both:
This skill does not assume the repo must be 0→1. It should be applied tactically in real repos with existing constraints.
Apply this skill when the user:
Trigger phrases: "my CI keeps failing on style checks", "can I replace Black and Flake8 with something simpler?", "what pre-commit hooks should I be using?", "how do I set up linting for a new Python project?", "our repo has no formatting enforcement, where do I start?"
Do not apply this skill when:
When this skill is active, the model's job is to assess the repo's current code health tooling, produce concrete ready-to-use config that installs the preferred stack or closes the gap from where the repo is, and leave the developer with exact commands to verify it works.
MUST:
pyproject.toml.MUST NOT:
The recommended default stack is:
This stack is preferred because it is:
.pre-commit-config.yaml,
pyproject.toml tool sections, existing linters/formatters, CI config.ruff, pre-commit, and
markdownlint commands to confirm the stack is working. CI quality steps
should mirror these: Ruff check, Ruff format check, Markdown lint, and
tests (if present).Use Ruff for:
Preferred commands:
ruff check .
ruff format .
Ruff is the preferred consolidation target for Python code health.
Use pre-commit to run:
Pre-commit should enforce the repo contract locally, not invent a second policy.
Use a Markdown linter for:
README.mdDocs are part of repo quality and must not be ignored.
Prefer a small set of high-signal hooks such as:
Keep this list short and boring.
Use these as the blessed starting point. Adapt rev pins and rule selections to the repo — the structure is the stable part.
.pre-commit-config.yamlNote: rev pins go stale — update to current stable versions before committing. The structure is the stable part.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
pyproject.toml Ruff blockNote: adjust
target-versionto match the repo's Python version.selectcovers errors, pyflakes, import sorting, and pyupgrade — a high-signal low-noise default. Expand only when there's a clear reason.
[tool.ruff]
line-length = 88
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "UP"]
This skill should be used opportunistically and tactically in existing repos.
General approach:
This skill should not read like a rigid if/else decision tree. It should behave like a practical engineer improving the repo from where it is.
Examples:
When proposing or applying this stack, end with exact commands such as:
ruff check .
ruff format --check .
pre-commit run --all-files
Include Markdown lint commands if configured, plus test commands if relevant.
pyproject.toml where possible.pre-commit-config.yaml uses the canonical structure as the baseApplying this skill should produce a repo with:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ruff, pre-commit, markdown-lint, python-linting, code-health
Generated from the plugin's indexed repository (robhowley/py-pit-skills) — no native marketplace selected
npx claudepluginhub p/robhowley-py-pit16 skills in this plugin
/alembic-migrationsProduction-safe Alembic migration workflows for SQLAlchemy 2.x projects. Use this skill when adding Alembic, generating migrations, reviewing autogenerate diffs, fixing broken migrations, or establishing a safe schema evolution workflow in a Python backend./background-jobs-boundariesGuardrails for background work in FastAPI and Python services. Prevent misuse of in-process background execution (e.g. FastAPI BackgroundTasks)./click-cliDesign, generate, and improve Python CLIs using the Click library. Focus on idiomatic architecture, command groups, modular layouts, CLI UX conventions, and avoiding common Click anti-patterns.Other plugins' skills for the same job