# Build Production FastAPI Services

Production FastAPI services require careful async, data, security, testing, and deployment decisions. This skill provides structured guidance for designing and improving modern Python APIs.

## Install

```bash
npx skillstore add sickn33/fastapi-pro
```

## Metadata

- Status: approved
- Slug: sickn33-fastapi-pro
- Skillstore revision: r1
- Version status: missing
- Tree hash: 54c390744672fe910a3c7760b2e18f5969c441dfbf6ab1586bf7221f1f8d299f
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/fastapi-pro
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-fastapi-pro
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-fastapi-pro/manifest

## Capabilities

- Designs FastAPI endpoints with async patterns, dependency injection, Pydantic V2 validation, and structured error handling.
- Guides async SQLAlchemy 2.0 sessions, transactions, connection pooling, migrations, and query optimization.
- Plans authentication and authorization using OAuth2, JWT, API keys, roles, permissions, and security headers.
- Creates testing strategies with pytest, async integration tests, service mocks, coverage, and performance checks.
- Advises on caching, WebSockets, task queues, observability, rate limiting, and external service integration.
- Recommends Docker, Kubernetes, CI pipelines, ASGI server settings, health checks, and scaling approaches.

## Use Cases

- Create an async API: Design endpoints, Pydantic models, dependencies, database sessions, error responses, and tests for a new FastAPI service.
- Prepare a service for production: Add authentication, observability, caching, containers, health checks, deployment settings, and scaling guidance.
- Review an API architecture: Evaluate service boundaries, data access, integrations, performance risks, security controls, and maintainability.

## Prompt Templates

### Create a basic endpoint

```
Create a FastAPI endpoint for [resource]. Include Pydantic V2 request and response models, validation, error handling, and focused tests.
```

### Add async database access

```
Design async SQLAlchemy 2.0 persistence for [resource]. Include session lifecycle, repository methods, transaction handling, migrations, and tests.
```

### Secure and observe a service

```
Improve this FastAPI service for production. Add [authentication method], authorization, rate limiting, structured logging, metrics, health checks, and security tests.
```

### Design a scalable architecture

```
Design a FastAPI architecture for [workload] at [traffic level]. Address service boundaries, concurrency, caching, messaging, failure handling, observability, deployment, and load testing.
```

## Limitations

- It provides guidance and implementation suggestions but does not deploy services or validate a live environment.
- The detailed implementation playbook referenced by the skill is not included in the package.
- Library and platform recommendations require current version and environment checks.
- Security, performance, and architecture advice still requires project-specific testing and expert review.

## Best Practices

- Provide expected traffic, data stores, deployment platform, security requirements, and current library versions.
- Request tests and measurable acceptance criteria with every implementation or optimization task.
- Validate generated guidance against official documentation and the actual runtime environment.

## Anti Patterns

- Do not use blocking database or network operations inside async request handlers.
- Do not accept generic production advice without sharing workload, failure, security, and deployment constraints.
- Do not deploy generated authentication, migration, or concurrency changes without review and testing.

## Security Audit

- Audited at: 2026-07-24T00:12:32.658\+00:00
- Summary: The static finding at line 24 is a false positive caused by Markdown backticks around a file path. SKILL.md contains guidance only, with no shell execution or prompt injection evidence. The referenced resource is absent, which limits content completeness but does not create a security risk.

## Stats

- Views: 193
- Downloads: 12
- Favorites: 0
- Popularity score: 0
