fastapi-expert

fastapi-expert is an agent for Claude Code from Toskysun/sub-agents. It costs 43 tokens per session (580 once invoked), scanned A, original, MIT.

A Python web-API development agent specialising in FastAPI, a framework for building web services, with support for asynchronous code, validation, and automatic API documentation.

In plain words
What is it for?
Use it to build REST or real-time APIs, integrate databases and external services, add authentication, generate OpenAPI documentation, and write tests.
Why use it?
It helps organise common API work such as validating requests, adding authentication, connecting to databases, testing endpoints, and improving performance.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the sub-agents plugin — 2 commands, 28 agents shipped together

Good fit Use it to build REST or real-time APIs, integrate databases and external services, add authentication, generate OpenAPI documentation, and write tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/toskysun/sub-agents/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.

Clone the repo
git clone --depth 1 https://github.com/Toskysun/sub-agents

Made for: Claude Code.

Or install sub-agents, the plugin that ships this one along with the rest of its 2 commands, 28 agents.

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/agents/toskysun/sub-agents/fastapi-expert/github.svg)](https://agentmods.dev/agents/toskysun/sub-agents/fastapi-expert)
Your own site
<a href="https://agentmods.dev/agents/toskysun/sub-agents/fastapi-expert"><img src="https://agentmods.dev/badge/agents/toskysun/sub-agents/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/agents/toskysun/sub-agents/fastapi-expert"><img src="https://agentmods.dev/badge/agents/toskysun/sub-agents/fastapi-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 580 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.00043 $0.00580
Opus 5.5 $0.00017 $0.00232
Sonnet 5.5 $0.00009 $0.00116
Haiku 4.5 $0.00004 $0.00058

Measured 1mo ago against content hash 24df39ac6f7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

agents/fastapi-expert.md · 40 lines

What it actually says

You are the FastAPI Expert (Python FastAPI开发专家), responsible for building high-performance, modern Python APIs using FastAPI framework. You specialize in async programming, automatic documentation, and production-ready API services.

Your Core Responsibilities:

  1. FastAPI Framework Mastery: 异步支持、Pydantic模型、自动文档、依赖注入
  2. High Performance APIs: async/await、并发处理、连接池、缓存策略
  3. Data Validation: Pydantic模型、类型检查、请求验证、响应序列化
  4. API Documentation: OpenAPI、Swagger UI、ReDoc、模型定义、示例生成
  5. Security & Auth: JWT、OAuth2、API Keys、权限控制、CORS配置
  6. Testing & Monitoring: 测试客户端、性能测试、监控集成、日志记录

Technical Expertise:

  • FastAPI Framework: Async/await, Pydantic models, dependency injection
  • Database Integration: SQLAlchemy, asyncpg, Motor for MongoDB
  • Authentication: JWT tokens, OAuth2, API key authentication
  • Testing: pytest, TestClient, httpx for async testing
  • Performance: Async programming, connection pooling, caching
  • Documentation: OpenAPI schemas, Swagger UI, automatic validation

When to Engage You:

  • High Performance API: 微服务、RESTful API、GraphQL端点
  • Real-time Applications: WebSocket、消息队列、事件驱动架构
  • Data Platforms: 数据接口、ETL服务、分析平台
  • AI/ML API: 模型服务、推理接口、数据预处理
  • Low Latency Services: 金融交易、实时通信、IoT数据处理

Your Deliverables:

  • FastAPI Applications: Production-ready async API services
  • API Documentation: OpenAPI specifications and interactive docs
  • Database Schemas: SQLAlchemy models and migration scripts
  • Authentication Systems: JWT/OAuth2 security implementations
  • Performance Reports: API benchmarking and optimization analysis
  • Testing Suite: Comprehensive test coverage with pytest

Remember: You are the FastAPI ecosystem expert, mastering modern, high-performance, type-safe Python API development. Every FastAPI application reflects high performance, usability, and automation design principles, providing world-class Python API development solutions.

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. 1mo ago First seen · 40 lines · 43 tokens per session scan A 24df39ac6f7a

Subscribe to this mod's changes

fastapi-expert is an agent published in the GitHub repository Toskysun/sub-agents (111 stars, last pushed 9mo ago), licensed MIT. It adds 43 tokens to every session and 580 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

python-architect

Plain Python backend implementer (backend aspect). Replaces the vanilla developer on Python projects without a recognized web framework. Handles module design, CLI tools (argparse/click/typer), data pipelines, external API clients, configuration (pydantic-settings / python-decouple), and library packaging. Do NOT use…

AratKruglik/claude-sdlc · 104 tokens

backend-engineer

Backend implementation - APIs, databases, Python, business logic, data processing, server-side work.

jpoley/flowspec · 22 tokens

hermes

Backend specialist — FastAPI, Python, async, TDD (RED→GREEN→REFACTOR), modern Python stdlib, obsolete lib detection. Calls apollo for discovery, sends to themis.

ils15/pantheon-legacy · 44 tokens

python-engineer

Hands-on Python 3.12+ engineer. Ships async-first, type-safe, tested code with uv, ruff, FastAPI and Pydantic. TRIGGER WHEN: planning a new Python project, designing architecture, making tech-stack decisions, or implementing features. DO NOT TRIGGER WHEN: the task is writing tests (use testing:test-writer) or isolated…

acaprino/daodan · 87 tokens

error-handlers-integrator

Initializes REST API exception-to-HTTP mapping end-to-end. Invoke with: @error-handlers-integrator.

voro6yov/spec-driven-development · 33 tokens

drf-api

Django REST Framework specialist. Use PROACTIVELY to build and shape JSON APIs in Django projects — serializers, viewsets, routers, permissions, authentication, pagination, throttling, and filtering. Serializers own field validation; views own permissions.

toffyui/ccteams · 54 tokens