ocbunknown/fastapi-claude-template

Agent-first FastAPI template built to pair with Claude Code - opinionated architecture kept on the rails by custom skills, hooks and review agents.

32Stars on the repository
11Mods indexed here, across every type
4mo agoLast push, which is what freshness is scored on
MITLicence, which decides whether bodies are shown

api-client

01

ocbunknown/fastapi-claude-template

Skill Claude CodeCodex

Use when integrating an external HTTP API (Stripe, GitHub, Twilio, a payment provider, etc.) into the project. Enforces the Client + Service split — Client lives in infrastructure and returns raw vendor-shaped Pydantic responses, Service lives in application and maps raw responses to application Result types. Covers…

32 4mo ago A 102 tokens original MIT

endpoint

02

ocbunknown/fastapi-claude-template

Skill Claude CodeCodex

Use when creating or editing a FastAPI endpoint under src/presentation/http/v1/endpoints/ /. Enforces audience-first organization (public/user/admin/internal), the exact parameter-naming convention (data for bodies, query for GET filters), the five-parameter list shape, correct Require + Authorization wiring, and…

32 4mo ago A 73 tokens original MIT

migration

03

ocbunknown/fastapi-claude-template

Skill Claude CodeCodex

Use when the user asks to create a database migration, change a SQLAlchemy model, add a column, add an index, or otherwise modify the schema. Enforces the rule that migrations are generated via make generate NAME="..." (the project's Makefile target that runs Alembic autogenerate) — never hand-written — and never edit…

32 4mo ago A 80 tokens original MIT

repository

04

ocbunknown/fastapi-claude-template

Skill Claude CodeCodex

Use when creating or extending a repository under src/database/psql/repositories/. Enforces the project's fixed repository vocabulary (create, select, selectmany, update, delete, exists, count, upsert) — no invented methods. Shows exactly how to wrap CRUDRepository, use @onintegrity, build loads-aware selects, and…

32 4mo ago A 73 tokens original MIT

tests

05

ocbunknown/fastapi-claude-template

Skill Claude CodeCodex

Use when creating or extending tests under tests/unit/, tests/integration/, or tests/e2e/. Enforces per-use-case unit coverage, per-endpoint e2e coverage, mutation-persistence verification (not just 200 status), contract-vs-Request field-mismatch detection, loads-opt-in flow tests, role/validation boundary tests, and…

32 4mo ago A 115 tokens original MIT

usecase

06

ocbunknown/fastapi-claude-template

Skill Claude CodeCodex

Use when creating or editing a use case under src/application/v1/usecases/. Enforces the RequestBus + UseCase pattern (Request + UseCase in one file, @dataclass(slots=True), returns Result type) and the DBGateway transaction rules — never open two sessions in one use case, never touch self.database outside a context…

32 4mo ago A 81 tokens original MIT