Claude Code hook
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.
Install
git clone https://github.com/ewtryocb/fastapi-claude-template.gitFrom the README
FastAPI Template Production-ready FastAPI template with Clean Architecture, multi-transport support (HTTP / NATS consumers / Taskiq scheduler), and first-class Claude Code integration — custom skills, architecture hooks, and a review agent that teach the AI how the codebase is structured. A batteries-included starting point for building async Python services. Ships with the boring-but-important stuff already wired: Dishka DI across three transports, SQLAlchemy 2.0 async + Alembic, Pydantic v2 contracts, JWT auth, pagination, layered testing with testcontainers, and strict layer boundaries enforced by Claude Code hooks so the architecture stays clean as the project grows. Highlights - Clean Architecture + Hexagonal — strict inward dependencies (application/ → database/ is the only documented exception). The full ruleset lives in CLAUDE.md. - Three transports, one composition root — HTTP (FastAPI + Granian), message consumers (FastStream over NATS), scheduled jobs (Taskiq over NATS JetStream). All share the same Dishka container built by entrypoints/container.py. - RequestBus + UseCase pattern — every transport translates input into a Request, calls request_bus.send(), and unwraps a Result. Zero business logic in endpoints/subscribers/tasks. Paired with an EventBus for fire-and-forget domain events, both inheriting a shared Bus[M] Protocol. - Audience-first HTTP routing — endpoints grouped by who can call them (public/, user/, admin/, internal/). Auth is wired once at the router level; it's structurally impossible to forget on individual endpoints. - Strict/lenient pagination split — HTTP contract enforces 10 ≤ limit ≤ 200; internal callers can request unbounded fetches via limit=None. - Layered testing — unit (mocks only), integration (testcontainers…
How hooks work
- Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
- They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
- A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Details
- Repository
- ewtryocb/fastapi-claude-template
- Type
- Hooks
- Language
- Python
- License
- MIT
- Last updated
- 7 April 2026
FAQ
What is 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. It is a hook for Claude Code, from ewtryocb/fastapi-claude-template on GitHub.
How do I install Fastapi Claude Template?
Clone ewtryocb/fastapi-claude-template from GitHub and follow the setup steps in its README.
Is Fastapi Claude Template popular?
ewtryocb/fastapi-claude-template has 33 GitHub stars and 5 forks. It was last updated on 7 April 2026.
More hooks
AI Saas Starter
29nikandr-surkov/ai-saas-starter
AI SaaS boilerplate for Next.js 16 — Better Auth, Stripe subscriptions, credits system, AI image generation. AI-native: AGENTS.md, Claude Code skills & hooks.
Safer Dependencies
43robert-auger/safer-dependencies
safer-dependencies is a security layer for Claude Code that audits packages before they’re added to your project. It detects and fixes risky dependencies, including CVEs, typosquats, abandoned packages, version-age issues, and adds package-cooldown violations across npm, PyPI, RubyGems, Maven, Go, and Rust.
ENI Hooks For Claude Code
31Goochbeater/ENI-Hooks-for-Claude-Code
Kings game
Claude Rpc
32rar-file/claude-rpc
Discord Rich Presence (RPC) for Claude Code — live model, project, tokens, and lifetime stats in your Discord profile. Driven by Claude Code hooks.
Claude Soul
36lauvsong/claude-soul
Custom Claude Code settings — rules, hooks, skills, and scheduled tasks
Britfix
19Talieisin/britfix
Convert American spellings to British English - fix LLM output and documents
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.