pr-review-database-api

Reviews pull requests touching FastAPI, SQLite, and React data contracts against a checklist.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/ragappv3 --skill pr-review-database-api-zaxbyhub
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-review-database-api
Source: https://github.com/ZaxbyHub/ragappv3/tree/main/.opencode/skills/generated/pr-review-database-api
Command: npx skills add https://github.com/ZaxbyHub/ragappv3 --skill pr-review-database-api-zaxbyhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing pull requests that span backend API models, SQL queries, and frontend TypeScript types often misses subtle defects like response fields absent from SELECT columns, type mismatches across the API boundary, or unsafe SQLite transactions. This Skill provides a structured checklist so reviewers catch these recurring defect classes consistently. ## Core Features & Use Cases - Response Model / SELECT Alignment: Verifies every Pydantic response field appears in the SQL SELECT list of all query paths, including separate list and get endpoints. - Frontend/Backend Type Boundary Checks: Confirms TypeScript interfaces in api.ts match backend models and that ID types are consistent across selection state and API responses. - SQLite Transaction & Migration Safety: Flags helpers that commit inside BEGIN IMMEDIATE blocks and enforces idempotent migrations with IF NOT EXISTS and PRAGMA table_info guards. - Use Case: When reviewing a PR that adds a new field to a document list endpoint, use this Skill to verify the column exists in every SELECT, the frontend interface matches, and no unbounded Promise.allSettled polling was introduced. ## Quick Start Review this pull request using the pr-review-database-api checklist and report any violations in response models, SQL queries, transactions, or frontend type contracts.

Frequently Asked Questions about pr-review-database-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a PR that changes FastAPI response models?▼

Check that every new or changed Pydantic field appears in the SQL SELECT list of every query path returning that model, including list and get endpoints separately. A field present in the model but absent from the query silently returns null through guard clauses.

How to check frontend and backend type alignment in a PR?▼

Compare the TypeScript interface in the frontend API client against the backend response model field by field. Do not assume backend int maps to frontend number, and verify selection state uses the same ID type as the API response.

What SQLite transaction issues should a code review catch?▼

Watch for helper functions that commit on a shared connection before a BEGIN IMMEDIATE block completes, and helpers that can raise before their internal commit. Prefer separate connections for cleanup and audit work versus atomic operations.

Why are correlated subqueries flagged in SQL code review?▼

Correlated subqueries for per-row aggregation are correct but scale poorly once tables grow beyond roughly 100 rows. The checklist recommends rewriting them as JOIN plus GROUP BY and verifying IN subqueries have supporting indexes.

When should this review checklist not be applied?▼

Skip it for PRs that do not touch API routes, services, database models, or frontend API contracts, such as pure styling or documentation changes. Test files matching exclusion patterns are also out of scope.