python-backend-quality

A set of review and development rules for Python backends, including web services, command-line tools, libraries, and database code.

In plain words
What is it for?
Use it when reviewing or building Python projects with FastAPI, Django, Flask, pytest, databases, asynchronous code, or deployment setup.
Why use it?
It defines checks for packaging, input validation, type safety, tests, configuration, logging, and error handling so backend changes are easier to trust and maintain.

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/priyanshuchawda/codeaudit/python-backend-quality
Any agent
npx skills add priyanshuchawda/codeaudit --skill python-backend-quality
Clone the repo
git clone --depth 1 https://github.com/priyanshuchawda/codeaudit

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 431 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.00052 $0.00431
Opus 5 $0.00026 $0.00216
Sonnet 5 $0.00010 $0.00086
Haiku 4.5 $0.00005 $0.00043

Measured yesterday against content hash 57acbfbd95e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-backend-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 yesterday.

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/python-backend-quality/SKILL.md · 35 lines

What it actually says

Python Backend Quality

Core Standard

Python projects need explicit packaging, typed boundaries, fast tests, and predictable runtime configuration. Prefer boring structure over clever dynamic behavior.

Required Checks

  • Packaging: pyproject.toml, lockfile (uv.lock or equivalent), clear scripts, Python version pin, and no ad-hoc global installs.
  • Boundaries: Pydantic/dataclasses/TypedDicts for request, config, tool, API, database, and external-service inputs.
  • Types: meaningful annotations, mypy/pyright/basedpyright where practical, no broad Any at trust boundaries.
  • Tests: pytest or equivalent with unit tests for pure logic and integration tests for API/auth/database boundaries.
  • Quality tools: Ruff format/lint, deterministic imports, CI command that runs lint, typecheck, and tests.
  • Runtime: env validation, secret redaction, structured logging, graceful startup/shutdown, and clear error models.
  • Frameworks: FastAPI dependencies and routers stay thin; Django views/serializers/services are separated; Flask routes validate inputs before business logic.
  • Data: migrations are explicit, sessions/transactions are scoped, and database errors do not leak raw internals.

Output

For each finding, include the file evidence, risk, smallest practical fix, and tests to run. Do not claim production-ready Python unless packaging, tests, typing, env handling, and deployment checks are evidenced.

Common Mistakes

  • Treating requirements.txt alone as a full project contract.
  • Putting business logic directly in FastAPI route functions, Django views, or Flask handlers.
  • Swallowing exceptions with except Exception: pass or returning None without context.
  • Logging raw request bodies, tokens, connection strings, prompts, or provider errors.
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. yesterday First seen · 35 lines · 52 tokens per session scan A 57acbfbd95e0

Subscribe to this mod's changes

python-backend-quality is a skill published in the GitHub repository priyanshuchawda/codeaudit (1 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 431 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

auth-web-cloudbase

CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication solutions with multiple login methods and complete user management.

TencentCloudBase/CloudBase-AI-Toolkit · 38 tokens

browse-and-evaluate

Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

MoizIbnYousaf/Ai-Agent-Skills · 43 tokens

specflow-use

To connect Rosetta with Grid Dynamics SpecFlow MCP; only when SpecFlow is mentioned and the MCP is installed.

griddynamics/rosetta · 27 tokens

loop-engineering

Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).

huytieu/COG-second-brain · 63 tokens

telnyx-messaging-hosted-curl

Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.

team-telnyx/ai · 45 tokens

render-airdrop-carousel

Assemble a viral iOS "AirDrop" notification-carousel video ad (≈6–8s, 9:16) from a brand line plus 6–16 real product photos — a native AirDrop share-sheet card ("Brand would like to share a · Decline / Accept") springs up and its preview window CYCLES through the products, landing on a range/lineup payoff with an…

gooseworks-ai/goose-skills · 207 tokens