agentleFS
tuvatechvalleytuvatechvalley/fastapi-prod-ready/skills/backend-review/SKILL.md

backend-review

Skill2 starsChanged 3 days agoMITView on GitHub

Read-only pre-production audit of a FastAPI + PostgreSQL + SQLAlchemy 2.0 (async) + Alembic backend. Runs zero-dependency Python AST, migration, and security scans followed by mandatory semantic code verification and writes BACKEND_REPORT.md and findings.json with a clear verdict (NOT READY / ALMOST READY / READY). Use when asked to review, audit, or check if a FastAPI backend is ready for production.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only: Do not modify, add, format, or delete any project code, config, or dependencies.

    line 10
  2. Very specific:

    Follow-ups belong to sibling skills: fixing findings -> fastapi-prod-ready.

    line 14
  3. Very specific:

    Write to <project>/reports/backend-review/ when reports/ is git-ignored (or if the user specifies a folder).

    line 18
  4. Very specific:

    Update <report_dir>/BACKEND_REPORT.md following <kit>/AUDIT-AND-REPORTING.md:

    line 41
  5. Distinctive:

    Never print secret values, tokens, passwords, or database credentials in the report.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Backend review (read-only)

Goal: give the user an evidence-backed pre-production verdict (❌ NOT READY / ⚠️ ALMOST READY / ✅ READY) with exact file:line references, explaining what will break under multi-user load, lock PostgreSQL during deploy, or leak user data. Talk to the user in their language; write the report in English.

Read-only. Do not modify, add, format, or delete any project code, config, or dependencies. Write only the report files.

This skill uses the scripts and guides in fastapi-prod-ready installed next to this folder: <kit> = <this skill's folder>/../fastapi-prod-ready. If <kit> is missing, instruct the user to install the full repository (all four skills) and stop.

Follow-ups belong to sibling skills: fixing findings -> fastapi-prod-ready; deep live concurrency proof -> concurrency-check; migration-only review -> migration-review.

Where the report goes

Write to <project>/reports/backend-review/ when reports/ is git-ignored (or if the user specifies a folder). Otherwise write to a sibling folder outside the project (e.g., ../backend-review-<project>) and report its exact path.

1. Run the automated AST + migration + security scan

python <kit>/scripts/backend_report.py <project> --out <report_dir> --no-fail

This runs ast_audit.py, migration_audit.py, and check_forbidden.py using Python 3.11+ stdlib only and writes BACKEND_REPORT.md, findings.json, and MIGRATION_REPORT.md.

2. Mandatory semantic code verification

AST checks eliminate string/comment noise, but business intent still requires reading the cited code. Inspect in order:

  1. Every ❌ blocking finding — open file:line; confirm it, re-grade it, or drop false alarms with a one-line reason.
  2. Concurrency & data integrity (<kit>/CONCURRENCY-AND-ASYNC.md) — check balance/stock/booking/coupon updates for missing row locks or atomic updates, and critical POST endpoints for double-click idempotency.
  3. Authorization / IDOR (<kit>/SECURITY-AND-OPS.md) — inspect every /{id} route to confirm the caller cannot read or mutate another user's or tenant's records.
  4. Async SQLAlchemy & transaction scope (<kit>/SQLALCHEMY-AND-POSTGRES.md) — verify session boundaries, expire_on_commit=False, lazy="raise", eager loading on list endpoints, and no external HTTP calls inside DB transactions.
  5. Migrations (<kit>/MIGRATIONS-ZERO-DOWNTIME.md) — inspect recent alembic/versions/*.py for table locks, missing timeouts, and reversible downgrade().
  6. Secrets & operations — confirm no hardcoded credentials, safe error handlers, explicit HTTP timeouts, non-root Dockerfile, and /healthz vs DB-checked /readyz.

3. Write the reviewed report

Update <report_dir>/BACKEND_REPORT.md following <kit>/AUDIT-AND-REPORTING.md:

  1. Verdict first: ❌ NOT READY / ⚠️ ALMOST READY / ✅ READY.
  2. Every finding: what is wrong, exact file:line, why it fails in production, and concrete fix.
  3. "Changes to automated findings" section: list every automated finding dropped or re-graded (with reason) plus manual findings discovered by reading code.
  4. Never print secret values, tokens, passwords, or database credentials in the report.

In chat, reply in the user's language in 3–6 lines: verdict, top blockers, single next step, and report path.

Never

  • Edit project files, install dependencies, or run database migrations.
  • Present an automated finding as confirmed without opening the cited file.
  • Claim tests or live probes passed if they were not executed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.