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 skills add j4flmao/agent-skills --skill fastapigit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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/skills/j4flmao/agent-skills/fastapi)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/fastapi"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/fastapi/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/skills/j4flmao/agent-skills/fastapi"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/fastapi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00071 | $0.04025 |
| Opus 5.5 | $0.00028 | $0.01610 |
| Sonnet 5.5 | $0.00014 | $0.00805 |
| Haiku 4.5 | $0.00007 | $0.00402 |
Grade A, and why
python-fastapi-architecture 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 16d 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 — 493 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python FastAPI Architecture
Purpose
Structure FastAPI applications with Clean Architecture. Pydantic at boundaries only. Domain entities are pure Python dataclasses. FastAPI routers are thin. Dependency injection via Depends.
Agent Protocol
Trigger
Exact user phrases: "FastAPI structure", "FastAPI architecture", "FastAPI folder", "FastAPI clean arch", "FastAPI router", "FastAPI dependency injection", "Python backend structure".
Input Context
Before activating, verify:
- requirements.txt or pyproject.toml has fastapi dependency.
- The feature or module being created is known.
Output Artifact
No file output. Produces folder structure and code examples as text.
Response Format
Folder structure:
src/
main.py
api/v1/endpoints/
core/
domain/
application/use_cases/
infrastructure/database/
schemas/
Code: module-level only. No import statements.
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- src/ directory structure follows Clean Architecture.
- Domain entities are pure Python (dataclasses). No Pydantic. No SQLAlchemy.
- Pydantic schemas exist only in src/schemas/ (API boundary).
- Repository interfaces are ABCs in domain/.
- Repository implementations use SQLAlchemy in infrastructure/.
- FastAPI routers use Depends() for DI.
- One endpoint file per resource in api/v1/endpoints/.
Max Response Length
Folder structure: unlimited. Code: 15 lines per example.
Architecture Decision Trees
FastAPI vs Django vs Flask
| Criterion | FastAPI | Django | Flask |
|---|---|---|---|
| Async | Native (async def) | Partial (3.1+ async) | Limited (async extra) |
| Validation | Pydantic (built-in) | DRF Serializers | Manual / Flask-Marshmallow |
| Performance | High (Starlette + Uvicorn) | Moderate | Low |
| DI system | Depends() | No built-in | Flask-Injector |
| Ecosystem | Growing | Largest | Large |
| Auto-docs | OpenAPI (built-in) | DRF-YASG | Flask-Smorest |
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/dependency-injection-patterns.md 2.7 KB
- references/fastapi-advanced.md 4.7 KB
- references/fastapi-background.md 8.3 KB
- references/fastapi-dependency-injection.md 3.9 KB
- references/fastapi-routing-patterns.md 3.4 KB
- references/fastapi-structure.md 1.8 KB
- references/fastapi-testing.md 2.3 KB
- references/fastapi-websocket.md 9.3 KB
- references/middleware-background.md 12 KB
- references/testing-debugging.md 9.6 KB
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.
- 16d ago Changed · +1 lines · -55 tokens per session 1cd68296d243
- 17d ago Changed 8ec3612086f8
- 1mo ago Changed · +12 lines ea065e5a85ac
- 1mo ago Changed · -61 lines dc1349971b08
- 3mo ago First seen · 541 lines · 126 tokens per session scan A ac21b315b729
python-fastapi-architecture is a skill published in the GitHub repository j4flmao/agent-skills (47 stars, last pushed 17d ago), licensed MIT. It adds 71 tokens to every session and 4,025 once invoked, about $0.0003 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-fastapi-architecture compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-fastapi-architecturej4flmao/agent-skills | Skill | 47 | 17d ago | MIT | A | 71 | Claude Code, Codex |
| background-taskvstorm-co/full-stack-ai-agent-template | Skill | 2.0k | yesterday | MIT | A | 62 | Claude Code |
| channel-botvstorm-co/full-stack-ai-agent-template | Skill | 2.0k | yesterday | MIT | A | 53 | Claude Code |
| fastapi-guardrennf93/fastapi-guard | Skill | 829 | 20d ago | MIT | A | 72 | Claude Code, Codex |
| pydantic-resolve-3stepKLR-Pattern/pydantic-resolve | Skill | 327 | 1mo ago | MIT | A | 56 | Claude Code |
| fastapi-expertpersonamanagmentlayer/pcl | Skill | 47 | 1mo ago | Apache-2.0 | A | 49 | Claude Code |
| compose-python-stackleynier/python-template | Skill | 37 | 3d ago | MIT | A | 65 | Codex |