Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/ocbunknown/fastapi-claude-template/claude-mdgit clone --depth 1 https://github.com/ocbunknown/fastapi-claude-templateWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/ocbunknown/fastapi-claude-template/claude-md)<a href="https://agentmods.dev/instructions/ocbunknown/fastapi-claude-template/claude-md"><img src="https://agentmods.dev/badge/instructions/ocbunknown/fastapi-claude-template/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.07589 | $0.07589 |
| Opus 5 | $0.03794 | $0.03794 |
| Sonnet 5 | $0.01518 | $0.01518 |
| Haiku 4.5 | $0.00759 | $0.00759 |
Grade A, and why
fastapi-claude-template CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 484 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI Template — Architecture Guide
High-level structure
src/
├── application/ ← USE CASES (transport-agnostic business logic)
│ ├── common/
│ │ ├── interfaces/ ← ports: bus, request_bus, event_bus, wrapper, usecase, cache, hasher, jwt, broker
│ │ ├── bus/ ← RequestBusImpl, EventBusImpl (both inherit Bus[M])
│ │ ├── events/ ← Event base, BrokerEvent, StreamEvent, @event decorator
│ │ ├── pagination.py ← OffsetPagination (lenient, internal)
│ │ ├── exceptions.py ← AppException + DetailedError hierarchy
│ │ └── request.py ← Request base (Pydantic, frozen)
│ ├── v1/
│ │ ├── usecases/ ← use case classes, grouped by domain (auth/, user/)
│ │ ├── services/ ← domain services (AuthService) + ServiceGateway
│ │ ├── results/ ← use case return types (UserResult, OffsetResult, etc.)
│ │ ├── events/ ← v1 domain events (UserRegistered, etc.)
│ │ └── constants.py
│ └── provider.py ← ApplicationProvider (Dishka)
│
├── infrastructure/ ← OUTBOUND ADAPTERS (accessed through ports)
│ ├── cache/ ← Redis adapter (implements StrCache port)
│ ├── security/ ← JWT, Argon2 (implement JWT, Hasher ports)
│ ├── http/ ← HTTP client stack
│ │ ├── clients/ ← Client + Request base classes (provider-agnostic)
│ │ └── provider/ ← AsyncProvider Protocol + AiohttpProvider + middleware chain
│ ├── broker/nats/ ← NatsBroker, NatsJetStreamBroker
│ ├── logging/ ← setup_logging
│ └── provider.py ← InfrastructureProvider (Dishka)
│
├── database/ ← PERSISTENCE — first-class layer (see "Persistence")
│ └── psql/ ← SQLAlchemy + Postgres (the only backend)
│ ├── models/ ← ORM models (inherit Base with .as_dict())
│ ├── repositories/ ← repository implementations (BaseRepository + CRUD helper)
│ ├── queries/ ← Query Object pattern (complex SQL builders)
│ ├── types/ ← OrderBy, Loads literals, TypedDict payloads
│ ├── interfaces/ ← internal ports (DBGateway, CRUD)
│ ├── manager.py ← TransactionManager
│ ├── connection.py ← engine + session factory
│ ├── exceptions.py ← integrity-error translation to AppException
│ ├── tools.py ← on_integrity decorator + sqla-autoloads re-exports (sqla_select, sqla_offset_query, sqla_cursor_query, unique_scalars, add_conditions)
│ └── provider.py ← DatabaseProvider (Dishka)
│
├── presentation/ ← INBOUND ADAPTERS — synchronous client interface
│ └── http/ ← FastAPI HTTP transport
│ ├── common/ ← middlewares, serializers (exclude_none=True), guards, contract.py, responses, exception_handlers
│ └── v1/
│ ├── contracts/ ← Pydantic request/response schemas + pagination.py (strict OffsetPagination)
│ ├── guards/ ← v1-specific gates (Authorization JWT+roles)
│ └── endpoints/ ← audience-first organization (see below)
│ ├── public/ no auth (healthcheck, register, login, refresh)
│ ├── user/ JWT, any role (router-level Authorization())
│ ├── admin/ JWT + Admin role (router-level Authorization("Admin"))
│ └── internal/ service-to-service stub (include_in_schema=False)
│
├── consumers/ ← INBOUND ADAPTERS — message-driven (FastStream)
│ ├── routers/ ← @subscriber-decorated functions calling request_bus
│ ├── subjects.py ← NATS subject constants
│ └── streams.py ← NATS JetStream stream constants
│
├── tasks/ ← INBOUND ADAPTERS — time-driven (Taskiq)
│ ├── broker.py ← Taskiq broker + scheduler factories
│ └── *.py ← scheduled task functions calling request_bus
│
├── entrypoints/ ← composition root + module-level app instances
│ ├── container.py ← build_container() — shared across all transports
│ ├── http.py ← FastAPI app + lifespan + run()
│ ├── consumers.py ← FastStream app
│ ├── tasks.py ← Taskiq broker + scheduler
│ └── server/ ← ASGI server runners (granian) — process bootstrap
│
├── common/ ← shared leaf utilities (no upper-layer deps)
│ ├── di/ ← Dishka helpers (DynamicContainer, Depends marker, inject)
│ └── tools/ ← formatter, cache key builder, text utils, types
│
└── settings/ ← Pydantic Settings + SettingsProvider
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 484 lines · 7,589 tokens per session scan A 34399a06808e
fastapi-claude-template CLAUDE.md is an instructions file published in the GitHub repository ocbunknown/fastapi-claude-template (32 stars, last pushed 4mo ago), licensed MIT. It adds 7,589 tokens to every session, about $0.0379 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
seekstone CLAUDE.md
Instructions for shaqmughal/seekstone, covering claude.md, what this repo is, commands, the harness itself (run after npm install) and architecture.
plan-forge database.instructions.md
Database patterns for .NET — Dapper/EF Core, parameterized queries, migration strategy.
pg-dash CLAUDE.md
Claude Code instructions for indiekitai/pg-dash, covering pg-dash claude.md, 项目结构, 构建与测试, 发版纪律(强制) and 发版检查清单(每次 npm publish 前必须按序执行).
jdbc-driver CLAUDE.md
Claude Code instructions for keboola/jdbc-driver, covering claude.md, project overview, build & test commands, jdbc driver and vscode sqltools extension.
MCP-SqlServer CLAUDE.md
Claude Code instructions for Aron-Valenzuela/MCP-SqlServer, covering claude.md, project overview, setup (for each user), 1. install dependencies and 2. configure claude desktop.
plsql-intelligence AGENTS.md
Instructions for MuhDur/plsql-intelligence, covering agents.md — plsql-intelligence, founder constraints (plan.md §3, non-negotiable), plan rules to internalize (plan.md §4), rule 1 – absolute (do not ever violate this) and irreversible git & filesystem actions.