Borrowing it
Nothing to install: this file belongs to nanotaboada/python-samples-fastapi-restful. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/nanotaboada/python-samples-fastapi-restful/master/CLAUDE.mdgit clone --depth 1 https://github.com/nanotaboada/python-samples-fastapi-restfulWrote 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/nanotaboada/python-samples-fastapi-restful/claude-md)<a href="https://agentmods.dev/instructions/nanotaboada/python-samples-fastapi-restful/claude-md"><img src="https://agentmods.dev/badge/instructions/nanotaboada/python-samples-fastapi-restful/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/nanotaboada/python-samples-fastapi-restful/claude-md"><img src="https://agentmods.dev/badge/instructions/nanotaboada/python-samples-fastapi-restful/claude-md.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.01777 | $0.01777 |
| Opus 5.5 | $0.00711 | $0.00711 |
| Sonnet 5.5 | $0.00355 | $0.00355 |
| Haiku 4.5 | $0.00178 | $0.00178 |
Grade A, and why
python-samples-fastapi-restful 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 24d 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 — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Claude Code
- Run
/pre-committo execute the full pre-commit checklist for this project. - Run
/pre-releasebefore tagging a release. - See
.claude/skills/create-issue/SKILL.mdfor the SDD issue workflow, and.claude/skills/add-endpoint/SKILL.mdfor the endpoint/schema workflows.
Structure
Layer rule: Routes → Services → SQLAlchemy → SQLite. Routes handle HTTP
concerns only; business logic belongs in services. Never skip a layer.
tools/ is legacy (superseded by Alembic migrations); gunicorn.conf.py is
used by the Docker entrypoint.
Coding Guidelines
- Naming: snake_case (files, functions, variables), PascalCase (classes)
- Type hints: Required everywhere — functions, variables, return types
- Async: All routes and service functions must be
async def; useAsyncSession(neverSession); useaiosqlite(neversqlite3); use SQLAlchemy 2.0select()(neversession.query()) - API contract: camelCase JSON via Pydantic
alias_generator=to_camel; Python internals stay snake_case - Models:
PlayerRequestModel(noid, used for POST/PUT) andPlayerResponseModel(includesid: UUID, used for GET/POST responses). One request model intentionally covers both POST and PUT — per-operation differences (conflict check on POST, mismatch guard on PUT) are handled at the route layer, not by duplicating the model. Never reintroduce the removedPlayerModel; it was removed because a single flat model conflated ORM, request, and response concerns. - Primary key: UUID surrogate key (
id) — opaque, internal, used for GET by id only. UUID v4 for API-created records; UUID v5 (deterministic) for migration-seeded records.squad_numberis the natural key — human-readable, domain-meaningful, used for all mutation endpoints (PUT, DELETE) and preferred for all external consumers - Caching: cache key
"players"(hardcoded); clear on POST/PUT/DELETE;X-Cacheheader (HIT/MISS) - Errors: Catch specific exceptions with rollback in services; Pydantic validation returns 422 (not 400); squad number mismatch on PUT returns 400 (not 422 — it is a semantic error, not a validation failure)
- Logging:
loggingmodule only; neverprint() - Tests: integration tests against the real SQLite DB (seeded via
Alembic migrations) via
TestClient— no mocking. Naming patterntest_request_{method}_{resource}_{context}_response_{outcome}; docstrings single-line, concise;tests/player_fake.pyfor test data;tests/conftest.pyprovides afunction-scopedclientfixture for isolation;tests/test_main.pyexcluded from Black;tests/test_migrations.pycovers Alembic downgrade paths - Decisions: justify every decision on its own technical merits; never use "another project does it this way" as a reason — that explains nothing and may mean replicating a mistake
- Avoid: sync DB access, mixing sync/async,
print(), missing type hints, unhandled exceptions
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.
- 24d ago Changed · -61 lines · -682 tokens per session 2999cdfdcb6d
- 2mo ago First seen · 227 lines · 2,459 tokens per session scan A 06cec1727910
python-samples-fastapi-restful CLAUDE.md is an instructions file published in the GitHub repository nanotaboada/python-samples-fastapi-restful (141 stars, last pushed 4d ago), licensed MIT. It adds 1,777 tokens to every session, about $0.0071 per session on Opus 5.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.
python-samples-fastapi-restful CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-samples-fastapi-restful CLAUDE.mdnanotaboada/python-samples-fastapi-restful | Instructions file | 141 | 4d ago | MIT | A | 1,777 | Claude Code |
| graftcode graftcode-python.instructions.mdgrft-dev/graftcode | Instructions file | 967 | 1mo ago | none | A | 4,639 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |