ocbunknown

11 mods across 1 repository, 32 stars between them.

ocbunknown/fastapi-claude-template

Agent Claude Code

Use proactively after non-trivial changes in src/ to review architecture compliance (layer rules, requestbus/DBGateway patterns from CLAUDE.md) AND security/authorization correctness — verify that admin-only parameters cannot be supplied by regular users, that user-facing responses don't leak internal/business data…

32 4mo ago A 95 tokens original MIT

PreToolUse

02

ocbunknown/fastapi-claude-template

Hook Claude Code

Runs before the agent uses a tool for Edit, Write, MultiEdit and Bash tool calls, executing guard_paths.py, guard_layers.py and pre_commit_checks.py (3 commands). From ocbunknown/fastapi-claude-template.

32 4mo ago A tokens not measured original MIT

PostToolUse

03

ocbunknown/fastapi-claude-template

Hook Claude Code

Runs after a tool call finishes for Edit, Write and MultiEdit tool calls, executing ruff_fix.py. From ocbunknown/fastapi-claude-template.

32 4mo ago A tokens not measured original MIT

api-client

05

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

06

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

07

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

08

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

09

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

10

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

ocbunknown/fastapi-claude-template

Instructions file

Instructions for ocbunknown/fastapi-claude-template, covering fastapi template — architecture guide, high-level structure, layer dependency rules, persistence — database/ as a first-class layer and dbgateway — usage rules.

32 4mo ago A 7,589 tokens original MIT