Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add ruslan-korneev/claude-plugins/plugin install fastapiWrote 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/ruslan-korneev/claude-plugins/fastapi-patterns)<a href="https://agentmods.dev/skills/ruslan-korneev/claude-plugins/fastapi-patterns"><img src="https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/fastapi-patterns/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/ruslan-korneev/claude-plugins/fastapi-patterns"><img src="https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/fastapi-patterns.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.00000 | $0.01297 |
| Opus 5.5 | $0.00000 | $0.00519 |
| Sonnet 5.5 | $0.00000 | $0.00259 |
| Haiku 4.5 | $0.00000 | $0.00130 |
Grade A, and why
fastapi-patterns 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 3mo 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 — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI Patterns
Best practices and patterns for FastAPI projects with SQLAlchemy 2.0 and dependency-injector.
Triggers
Use this skill when the user:
- Creates a new FastAPI project or module
- Asks about FastAPI application structure
- Works with SQLAlchemy models and repositories
- Configures Dependency Injection
- Creates DTOs (Pydantic models)
Layer Architecture
Router → Service → Repository → Database
↓ ↓ ↓
DTO DTO Model/DTO
- Router — HTTP endpoints, request validation
- Service — business logic, orchestration
- Repository — database operations, CRUD operations
Modular Structure
src/
├── core/
│ ├── config.py # Settings (pydantic-settings)
│ ├── database.py # Engine, Base, session
│ ├── container.py # DI Container
│ ├── dependencies.py # FastAPI dependencies
│ ├── exceptions.py # Custom exceptions
│ └── repositories.py # BaseRepository
├── modules/
│ ├── users/
│ │ ├── __init__.py
│ │ ├── models.py
│ │ ├── dto.py
│ │ ├── repositories.py
│ │ ├── services.py
│ │ └── routers.py
│ └── orders/
│ └── ...
└── main.py
BaseRepository with Generics
More details: ${CLAUDE_PLUGIN_ROOT}/skills/fastapi-patterns/references/repository.md
from typing import Generic, TypeVar
from collections.abc import Sequence
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
ModelT = TypeVar("ModelT")
CreateDTOT = TypeVar("CreateDTOT")
ReadDTOT = TypeVar("ReadDTOT")
class BaseRepository(Generic[ModelT, CreateDTOT, ReadDTOT]):
"""Base repository with generic CRUD operations."""
def __init__(self, session: AsyncSession, model: type[ModelT]) -> None:
self._session = session
self._model = model
async def get_all(self) -> Sequence[ReadDTOT]:
result = await self._session.execute(select(self._model))
return result.scalars().all()
async def save(self, data: ModelT | CreateDTOT) -> ReadDTOT:
if isinstance(data, self._model):
entity = data
else:
entity = self._model(**data.model_dump())
self._session.add(entity)
await self._session.flush()
return entity
What ships with it
4 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.
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.
- 3mo ago First seen · 219 lines · 0 tokens per session scan A 563209124156
fastapi-patterns is a skill published in the GitHub repository ruslan-korneev/claude-plugins (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,297 tokens. 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-31.
fastapi-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fastapi-patternsruslan-korneev/claude-plugins | Skill | 5 | 9mo ago | MIT | A | 0 | Claude Code |
| phoenix-contextsoliver-kriska/claude-elixir-phoenix | Skill | 579 | yesterday | MIT | A | 46 | Claude Code |
| drizzle-orm-d1secondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 76 | Claude Code |
| cloudflare-hyperdrivesecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 45 | Claude Code |
| idempotency-handlingsecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 46 | Claude Code |
| architecture-paradigm-cqrs-esathola/claude-night-market | Skill | 358 | today | MIT | A | 33 | Claude Code |
| domain-modelingrsmdt/the-startup | Skill | 588 | 1mo ago | MIT | A | 42 | Claude Code |