code-quality

A code-health setup for Python projects using Ruff for linting and formatting, pre-commit for local checks, and Markdown and file-sanity checks.

In plain words
What is it for?
Use it when adding or simplifying Python linting, formatting, pre-commit hooks, Markdown checks, or repository hygiene.
Why use it?
It helps teams reduce overlapping tools and catch code and documentation problems early. It supports both new repositories and existing ones with current constraints.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/robhowley/py-pit-skills/code-quality
Any agent
npx skills add robhowley/py-pit-skills --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/robhowley/py-pit-skills

Made for: Claude Code, Codex.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,044 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.02044
Opus 5 $0.00026 $0.01022
Sonnet 5 $0.00010 $0.00409
Haiku 4.5 $0.00005 $0.00204

Measured 2d ago against content hash 693e1efcc565, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code-quality/SKILL.md · 300 lines

How it starts

The opening of the file, as written. The whole thing — 300 lines — stays where its author put it; the contents beside it link to each section on GitHub.

code-quality

Opinionated guidance for adopting a small, high-signal code health stack in Python repositories.

This skill standardizes on:

  • Ruff for Python linting and formatting
  • pre-commit for local enforcement
  • Markdown linting for docs quality
  • a small set of file-sanity hooks

This skill is intentionally opinionated. It favors consolidation, low redundancy, fast feedback, and easy adoption.

It is designed for both:

  • new repos that need a clean default stack
  • existing repos that want to add, simplify, or migrate code-quality tooling

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

Apply this skill when the user:

  • asks to add linting, formatting, hooks, or repo hygiene
  • wants to standardize or simplify Python quality tooling
  • wants to add or improve pre-commit
  • wants to move to Ruff
  • wants to reduce overlapping tools such as Black + isort + Flake8
  • wants docs quality checks such as Markdown linting
  • asks what local and CI checks a Python repo should run

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:

  • the task is unrelated to repo tooling or code health
  • the user explicitly wants a different stack
  • the repo is constrained by external rules the user wants preserved

Mission

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.


Hard Rules

MUST:

  • Prefer a small number of high-leverage tools over overlapping tool chains.
  • Use Ruff as the preferred Python lint + format target unless the user explicitly wants something else.
  • Keep the quality contract easy to run locally and easy to mirror in CI.
  • Prefer incremental adoption in existing repos when a big-bang migration is unnecessary.
  • Keep configuration centralized where practical, preferably in pyproject.toml.
  • Prefer narrow rule-level ignores over broad file-level ignores. Document non-obvious ignores briefly. A large ignore list signals stack drift.

Read the full file on GitHub · 300 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 300 lines · 51 tokens per session scan A 693e1efcc565

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository robhowley/py-pit-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 2,044 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

database

Relational database authority — PostgreSQL, async ORM (SQLAlchemy 2 / asyncpg), Alembic schema migrations, Supabase Python and JS clients, query optimisation, index strategy, connection pooling, transaction patterns, and bulk operations across Python and Node stacks.

LuuOW/meridian-mcp · 54 tokens

crudauth

Use when building or modifying authentication in a FastAPI app with crudauth (the crudauth PyPI package) — covers CRUDAuth, the AuthUserMixin / makeauthidentity user model, IdentityConfig, currentuser(...) gates, session + bearer transports, OAuth (Google/GitHub), email verification / password reset / change, custom…

benavlabs/crudauth · 188 tokens

FastAPI Customer Support Tech Enablement

Comprehensive FastAPI skill for building modern Python web APIs with focus on customer support systems, ticket management, real-time chat, and backend operations.

manutej/luxor-claude-marketplace · 36 tokens

alembic

Comprehensive Alembic database migration management for customer support systems.

manutej/luxor-claude-marketplace · 16 tokens

SQLAlchemy ORM Expert

Comprehensive SQLAlchemy skill for customer support tech enablement, covering ORM patterns, session management, query optimization, async operations, and PostgreSQL integration.

manutej/luxor-claude-marketplace · 34 tokens

fastapi-endpoint

Plan and build production-ready FastAPI endpoints with async SQLAlchemy, Pydantic v2 models, dependency injection for auth, and pytest tests. Uses interview-driven planning to clarify data models, authentication method, pagination strategy, and caching before writing any code.

alirezaebrahimi5/ai-senior-engineer-template · 56 tokens