fastapi-expert

fastapi-expert is a skill for Claude Code, Codex from martinholovsky/claude-skills-generator. It costs 81 tokens per session (8,485 once invoked), scanned A, original, Unlicense.

A guide for building FastAPI web services: Python applications that expose endpoints for other programs to call.

In plain words
What is it for?
Use it to build REST APIs with Pydantic validation, SQLAlchemy database access, OAuth2 or JWT login, role permissions, rate limiting, tests, and generated API documentation.
Why use it?
It helps structure asynchronous requests, validate input, handle databases and background work, and protect APIs with common security practices.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: model in frontmatter.

Good fit Use it to build REST APIs with Pydantic validation, SQLAlchemy database access, OAuth2 or JWT login, role permissions, rate limiting, tests, and generated API documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/martinholovsky/claude-skills-generator/fastapi-expert
Install

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.

Any agent
npx skills add martinholovsky/claude-skills-generator --skill fastapi-expert
Clone the repo
git clone --depth 1 https://github.com/martinholovsky/claude-skills-generator

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for fastapi-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/martinholovsky/claude-skills-generator/fastapi-expert/github.svg)](https://agentmods.dev/skills/martinholovsky/claude-skills-generator/fastapi-expert)
Your own site
<a href="https://agentmods.dev/skills/martinholovsky/claude-skills-generator/fastapi-expert"><img src="https://agentmods.dev/badge/skills/martinholovsky/claude-skills-generator/fastapi-expert/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.

agentmods 80×15 button for fastapi-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/martinholovsky/claude-skills-generator/fastapi-expert"><img src="https://agentmods.dev/badge/skills/martinholovsky/claude-skills-generator/fastapi-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.08485
Opus 5 $0.00041 $0.04242
Sonnet 5 $0.00016 $0.01697
Haiku 4.5 $0.00008 $0.00848

Measured 10d ago against content hash 8983a36ef1fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

fastapi-expert 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 10d 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.

skills/fastapi-expert/SKILL.md · 1,176 lines

How it starts

The opening of the file, as written. The whole thing — 1,176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FastAPI Development Expert

1. Overview

You are an elite FastAPI developer with deep expertise in:

  • FastAPI Core: Async/await, dependency injection, path operations, request/response models
  • Pydantic v2: Advanced validation, custom validators, field serialization, model composition
  • SQLAlchemy 2.0: Async engines, ORM models, migrations with Alembic, query optimization
  • Authentication: OAuth2 password flow, JWT tokens with refresh, role-based access control
  • Security: CORS, rate limiting, SQL injection prevention, input sanitization, OWASP Top 10
  • Database: AsyncPG, async sessions, connection pooling, transaction management
  • Performance: Background tasks, async queries, caching strategies
  • Testing: pytest with TestClient, async tests, comprehensive coverage
  • API Documentation: Auto-generated OpenAPI 3.1, Swagger UI customization

You build FastAPI applications that are:

  • Secure: Defense against OWASP Top 10, proper authentication/authorization
  • Fast: Async operations, optimized queries, efficient serialization
  • Type-Safe: Full Pydantic validation, mypy compliance
  • Production-Ready: Error handling, logging, monitoring
  • Well-Tested: Comprehensive pytest coverage

Risk Level: 🔴 HIGH - Web APIs handle sensitive data, authentication, and database operations. Security vulnerabilities can lead to data breaches, unauthorized access, and SQL injection attacks.


2. Core Principles

  1. TDD First - Write tests before implementation. Use httpx AsyncClient and pytest-asyncio for async endpoint testing.
  2. Performance Aware - Optimize for high throughput with connection pooling, asyncio.gather, caching, and streaming responses.
  3. Security First - Every endpoint must be secure by default. Apply OWASP Top 10 mitigations.
  4. Type Safety - Full Pydantic v2 validation on all inputs, mypy compliance throughout.
  5. Async Excellence - All I/O operations must be non-blocking with proper async/await.
  6. Clean Architecture - Dependency injection, separation of concerns, DRY principles.
  7. Production Ready - Comprehensive error handling, structured logging, monitoring.

Read the full file on GitHub · 1,176 lines

Changes

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.

  1. 10d ago First seen · 1,176 lines · 81 tokens per session scan A 8983a36ef1fc

Subscribe to this mod's changes

fastapi-expert is a skill published in the GitHub repository martinholovsky/claude-skills-generator (45 stars, last pushed 9mo ago), licensed Unlicense. It adds 81 tokens to every session and 8,485 once invoked, about $0.0004 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.