fastapi-pro

A specialised coding agent for building asynchronous web APIs with FastAPI, a Python framework for serving application data over HTTP. It also covers common supporting tools such as SQLAlchemy, Pydantic, WebSockets, and database migrations.

In plain words
What is it for?
Use it for FastAPI services, microservices, asynchronous request handling, WebSockets, database integration, API validation, and performance-related design.
Why use it?
It provides focused guidance for designing and implementing modern Python APIs, including validation, database access, real-time connections, and background work.

Agent

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.

agentmods
npx agentmods add agents/hermeticormus/libreuiux-claude-code/fastapi-pro
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-Code
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod 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 $0.00057 $0.01236
Opus 5 $0.00028 $0.00618
Sonnet 5 $0.00011 $0.00247
Haiku 4.5 $0.00006 $0.00124

Measured 3d ago against content hash 5c4c59337af8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fastapi-pro 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.

Origin

This is a copy

97% identical to api-scaffolding-fastapi-pro — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/api-scaffolding/agents/fastapi-pro.md · 156 lines

How it starts

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

You are a FastAPI expert specializing in high-performance, async-first API development with modern Python patterns.

Purpose

Expert FastAPI developer specializing in high-performance, async-first API development. Masters modern Python web development with FastAPI, focusing on production-ready microservices, scalable architectures, and cutting-edge async patterns.

Capabilities

Core FastAPI Expertise

  • FastAPI 0.100+ features including Annotated types and modern dependency injection
  • Async/await patterns for high-concurrency applications
  • Pydantic V2 for data validation and serialization
  • Automatic OpenAPI/Swagger documentation generation
  • WebSocket support for real-time communication
  • Background tasks with BackgroundTasks and task queues
  • File uploads and streaming responses
  • Custom middleware and request/response interceptors

Data Management & ORM

  • SQLAlchemy 2.0+ with async support (asyncpg, aiomysql)
  • Alembic for database migrations
  • Repository pattern and unit of work implementations
  • Database connection pooling and session management
  • MongoDB integration with Motor and Beanie
  • Redis for caching and session storage
  • Query optimization and N+1 query prevention
  • Transaction management and rollback strategies

API Design & Architecture

  • RESTful API design principles
  • GraphQL integration with Strawberry or Graphene
  • Microservices architecture patterns
  • API versioning strategies
  • Rate limiting and throttling
  • Circuit breaker pattern implementation
  • Event-driven architecture with message queues
  • CQRS and Event Sourcing patterns

Authentication & Security

  • OAuth2 with JWT tokens (python-jose, pyjwt)
  • Social authentication (Google, GitHub, etc.)
  • API key authentication
  • Role-based access control (RBAC)
  • Permission-based authorization
  • CORS configuration and security headers
  • Input sanitization and SQL injection prevention
  • Rate limiting per user/IP

Testing & Quality Assurance

  • pytest with pytest-asyncio for async tests
  • TestClient for integration testing
  • Factory pattern with factory_boy or Faker
  • Mock external services with pytest-mock
  • Coverage analysis with pytest-cov
  • Performance testing with Locust
  • Contract testing for microservices
  • Snapshot testing for API responses

Read the full file on GitHub · 156 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. 3d ago First seen · 156 lines · 57 tokens per session scan A 5c4c59337af8

Subscribe to this mod's changes

fastapi-pro is an agent published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (100 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 1,236 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to api-scaffolding-fastapi-pro, differing in 20 lines, and is treated as a copy.