python-backend-quality
Skill1 starsChanged 6 months agoMITView on GitHub
Use when reviewing, creating, or improving Python services, CLIs, libraries, FastAPI, Django, Flask, pytest, uv, pyproject, typing, Pydantic, SQLAlchemy, async code, packaging, or deployment.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/llms.txtllms.txt
- ai-app-security-reviewSkill
- codeaudit-orchestratorSkill
- codeauditSkill
- docs-claims-evidence-reviewSkill
- enterprise-code-qualitySkill
- github-issue-pr-workflowSkill
- nextjs-security-reviewSkill
- official-docs-groundingSkill
- python-mcp-server-qualitySkill
- refactor-with-testsSkill
- skill-supply-chain-auditorSkill
The file
Files
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.lockor 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
Anyat 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.txtalone as a full project contract. - Putting business logic directly in FastAPI route functions, Django views, or Flask handlers.
- Swallowing exceptions with
except Exception: passor returningNonewithout context. - Logging raw request bodies, tokens, connection strings, prompts, or provider errors.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

