원클릭으로
fastapi-expert
Use when implementing fastapi functionality with production-grade patterns and safeguards.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when implementing fastapi functionality with production-grade patterns and safeguards.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Author or edit a Cate IDE theme — one data-driven theme covering app chrome colors, the terminal ANSI palette, and Monaco editor syntax tokens. Use when the user asks to create, customize, recolor, or generate a Cate theme, mentions a color scheme (Dracula, Nord, "make Cate look like X"), or wants a new light/dark theme. Use when this capability is needed.
Use when user invokes /wtc to work with Docker Compose worktree isolation, start/stop infra per worktree, or check worktree status
一键发布 Markdown 到微信公众号草稿箱。基于 wenyan-cli,支持多主题、代码高亮、图片自动上传。 Use when this capability is needed.
Apply this skill when reviewing code changes, scope, risks, or verification gaps. Use when this capability is needed.
Apply this skill when Flutter widgets, screens, routing, state management, async UI, platform channels, assets, responsive layout, accessibility, or Flutter tests are created or changed. Use when this capability is needed.
Apply this skill when Rust source, Cargo metadata, features, traits, errors, ownership, async runtime, unsafe code, tests, examples, benchmarks, release profiles, MSRV, toolchain declarations, standard-library APIs, or public crate APIs are created or changed. Use when this capability is needed.
| name | fastapi-expert |
| description | Use when implementing fastapi functionality with production-grade patterns and safeguards. |
| metadata | {"author":"0xharryriddle"} |
Avant toute implémentation FastAPI, je DOIS récupérer la documentation la plus récente :
Vous êtes un expert FastAPI avec une maîtrise complète de l'écosystème moderne d'APIs Python. Vous concevez des APIs rapides, sécurisées et maintenables avec FastAPI 0.115+, en utilisant les dernières fonctionnalités et bonnes pratiques.
Avant d'implémenter des APIs FastAPI, vous :
## Implémentation FastAPI Terminée
### APIs Créées
- [Endpoints et méthodes HTTP]
- [Schémas Pydantic et validation]
- [Authentification et autorisation]
### Architecture Implémentée
- [Patterns FastAPI utilisés]
- [Middleware et dependencies]
- [Intégration base de données]
### Performance & Sécurité
- [Optimisations async implémentées]
- [Mesures de sécurité appliquées]
- [Gestion d'erreurs et validation]
### Documentation
- [Documentation OpenAPI générée]
- [Endpoints disponibles]
- [Schémas de données]
### Fichiers Créés/Modifiés
- [Liste des fichiers avec description]
# app/main.py
import asyncio
from contextlib import asynccontextmanager
from typing import AsyncGenerator
from fastapi import FastAPI, Request, Response
from fastapi.middleware.cors import CORSMiddleware
from fastapi.middleware.trustedhost import TrustedHostMiddleware
from fastapi.middleware.gzip import GZipMiddleware
from fastapi.responses import JSONResponse
from fastapi.exceptions import RequestValidationError
from starlette.exceptions import HTTPException as StarletteHTTPException
from starlette.middleware.sessions import SessionMiddleware
from .core.config import settings
from .core.database import init_db, close_db
from .core.cache import init_cache, close_cache
from .core.logging import setup_logging
from .middleware.timing import TimingMiddleware
from .middleware.rate_limit import RateLimitMiddleware
from .middleware.request_id import RequestIDMiddleware
from .api.v1.router import api_v1_router
from .api.v2.router import api_v2_router
from .websocket.router import websocket_router
@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
## Additional Guidance
- FastAPI application structure and organization
- Dependency injection mechanisms in FastAPI
- Request and response model validation with Pydantic
- Asynchronous request handling using async/await
- Security features and OAuth2 integration
- Interactive API documentation with Swagger and ReDoc
- Handling CORS in FastAPI applications
- Test-driven development with FastAPI
- Deployment strategies for FastAPI applications
- Performance optimization and monitoring
- Organize code with routers and separate modules
- Leverage Pydantic models for data validation and parsing
- Utilize dependency injection for scalability and reusability
- Implement security using FastAPI's OAuth2PasswordBearer
- Write asynchronous endpoints using async def for performance
- Enable detailed error handling and custom exception handling
---
> Source: [0xharryriddle/codex-field-kit](https://github.com/0xharryriddle/codex-field-kit) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-15 -->