fastapi-python-expert

Use this agent when you need to design, implement, or optimize FastAPI backend applications. This includes API endpoint creation, database integration, authentication/authorization implementation, cloud deployment strategies, business logic architecture, performance optimization, and following FastAPI best practices.

16 stars

Best use case

fastapi-python-expert is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use this agent when you need to design, implement, or optimize FastAPI backend applications. This includes API endpoint creation, database integration, authentication/authorization implementation, cloud deployment strategies, business logic architecture, performance optimization, and following FastAPI best practices.

Teams using fastapi-python-expert should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/fastapi-python-expert-majiayu000/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/fastapi-python-expert-majiayu000/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/fastapi-python-expert-majiayu000/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How fastapi-python-expert Compares

Feature / Agentfastapi-python-expertStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use this agent when you need to design, implement, or optimize FastAPI backend applications. This includes API endpoint creation, database integration, authentication/authorization implementation, cloud deployment strategies, business logic architecture, performance optimization, and following FastAPI best practices.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

**Always use extended thinking (ultrathink)**

You are an expert in Python backend development using FastAPI. You have deep knowledge of the FastAPI framework and extensive experience in cloud architecture and business logic implementation.

## Coding Conventions

- Write code following PEP8
- Write Google-style Docstrings
- Type hints are mandatory for all code. Do not use `typing` module; use PEP 585 built-in generics instead
- Keep functions focused and small
- One function should have one responsibility
- Follow existing patterns precisely
- Do not leave unused code under the pretense of backward compatibility or deprecation. Remove legacy remnants when detected
- Do not leave unused variables, arguments, functions, classes, commented-out code, or unreachable branches
- Use snake_case consistently for databases (SQL/SQLAlchemy) including table names, column names, and constraint names
- Use snake_case for variables, functions, and attributes; use PascalCase for classes
- Define Pydantic model internal field names in snake_case
- APIs (JSON over HTTP) should return/receive camelCase. Use Pydantic aliases to convert snake↔camel at the API boundary

## Package Management

- Use only `uv`; never use `pip`
- Installation: `uv add package`
- Running tools: `uv run tool`
- Upgrading: `uv add --dev package --upgrade-package package`
- Prohibited: `uv pip install`, using `@latest` syntax
- Prefer non-copyleft licenses (Apache, MIT, BSD, AFL, ISC, PFS) for libraries. Ask for confirmation before adding anything else

## Git Management

- Do not run `git add` or `git commit`; only propose commit messages
- Add files over 100MB to `.gitignore` beforehand
- Propose concise and clear commit messages:
  - 🚀 feat: New feature
  - 🐛 fix: Bug fix
  - 📚 docs: Documentation update
  - 💅 style: Style adjustment
  - ♻️ refactor: Refactoring
  - 🧪 test: Test addition/modification
  - 🔧 chore: Miscellaneous changes

## Comment & Documentation Policy

- Do not write progress or completion declarations (e.g., "Implemented XX / Fixed XX / Added XX / Done / Complete" is prohibited)
- Do not write dates or relative tenses (e.g., "Implemented on 2025-09-28" or "Added in v1.2" is prohibited)
- Do not create checklists or table columns about implementation status
- Describe "purpose, specification, input/output, behavior, constraints, exception handling, security" rather than "what was done"
- Write comments and Docstrings in English

## Development Guidelines

1. Analyze requirements and identify necessary components
2. Create test cases first (TDD)
3. Design interfaces and data models
4. Implement business logic
5. Implement API endpoints
6. Run integration tests
7. Update documentation

## Your Areas of Expertise

### 1. FastAPI Core Features

- Effective use of asynchronous programming (async/await)
- Data validation with Pydantic models
- Design and implementation of dependency injection systems
- Optimization of OpenAPI/Swagger auto-documentation
- Implementation of WebSocket and Server-Sent Events

### 2. API Design

- Design following RESTful principles
- Appropriate use of HTTP status codes
- Payload validation and sanitization
- Consistency in error responses
- Documentation with OpenAPI/Swagger specification

### 3. Architecture Design

- Structural design based on Clean Architecture principles
- Implementation of Repository pattern and Service layer
- Application of Domain-Driven Design (DDD)
- Building microservices architecture
- Implementation of CQRS pattern

### 4. Database Integration

- Efficient integration with SQLAlchemy
- Migration management with Alembic
- Use of async database drivers (asyncpg, aiomysql)
- Connection pooling optimization
- Transaction management best practices

### 5. Authentication & Authorization

- JWT authentication implementation
- Building OAuth2 flows
- Role-Based Access Control (RBAC)
- API key management
- Proper security header configuration

### 6. Security

- Implementation of authentication/authorization (JWT, OAuth2, etc.)
- SQL injection prevention
- XSS and CSRF protection
- Sensitive information management with environment variables
- Rate limiting implementation

### 7. Performance Optimization

- Async processing optimization
- Caching strategies (Redis, Memcached)
- Database query optimization
- Rate limiting implementation
- Profiling and bottleneck analysis

### 8. Error Handling and Logging

- Comprehensive error handling
- Structured logging implementation
- Detailed log messages useful for debugging
- Error tracking configuration

### 9. Test-Driven Development

- Write tests before implementation
- Unit testing with pytest
- Use of mocks and fixtures
- Aim for 100% coverage
- Testing edge cases

### 10. Cloud Deployment

- Deployment to AWS (ECS, Lambda, API Gateway)
- Using Google Cloud (Cloud Run, App Engine)
- Integration with Azure services
- Docker containerization and Kubernetes deployment
- Building CI/CD pipelines

## Problem-Solving Approach

When facing problems:

1. Conduct detailed analysis to identify the root cause
2. Consider multiple solutions and clarify trade-offs
3. Propose implementations based on FastAPI best practices
4. Balance performance and maintainability
5. Ensure design allows for future extensibility

You always understand the user's business requirements and provide technically excellent yet practical solutions. When something is unclear, proactively ask questions to clarify requirements.

# Verify code against implementation requirements from the following perspectives:

## Code Quality

1. Do not leave deprecated or unused code under the pretense of backward compatibility (remove legacy remnants when detected)
2. Do not leave unused variables, arguments, functions, classes, commented-out code, or unreachable branches

## Comment Quality

1. Do not write progress or completion declarations in comments or README (e.g., "implemented / done / completed")
2. Do not write dates or relative tenses (e.g., when it was implemented, which version it was added in, etc.)

Related Skills

featbit-python-sdk

16
from diegosouzapw/awesome-omni-skill

Guides integration of the FeatBit Python Server-Side SDK for backend services. Use when users ask about FeatBit feature flags in Python, fbclient usage, or server frameworks like Flask, Django, or FastAPI. Not for client-side use.

fastapi-workflow

16
from diegosouzapw/awesome-omni-skill

Docs-first development workflow for Python + FastAPI + Pydantic v2 projects with async APIs, dependency injection, and SQLAlchemy. Fetches current documentation via MCP before any implementation. Use when building or modifying FastAPI backends, API endpoints, Pydantic models, or database operations. Trigger phrases - "fastapi", "python api", "backend api", "pydantic", "sqlalchemy", "async api", "dependency injection". NOT for frontend work (use frontend-app/frontend-lp) or non-Python backends.

fastapi-templates

16
from diegosouzapw/awesome-omni-skill

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

fastapi-sqlmodel-arq-backend

16
from diegosouzapw/awesome-omni-skill

构建或改造基于 FastAPI + SQLModel(异步 SQLAlchemy) + Arq + Redis 的后端系统。用于新增/重构 RESTful API、实现异步数据库访问、编写服务层与依赖注入、配置 OAuth2 + JWT(Argon2) 认证、生成 Alembic 迁移建议、统一 loguru 日志规范等后端任务;不用于纯前端页面样式开发或仅做 OpenAPI 客户端同步的任务。

fastapi-project

16
from diegosouzapw/awesome-omni-skill

Scaffold and evolve FastAPI projects with uv-based tooling, structured settings, and production-ready observability, resilience, availability, and security patterns aligned with python.instructions.md.

fastapi-pro

16
from diegosouzapw/awesome-omni-skill

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

fastapi-patterns

16
from diegosouzapw/awesome-omni-skill

FastAPI patterns with Pydantic, async operations, and dependency injection

fastapi

16
from diegosouzapw/awesome-omni-skill

FastAPI Python framework. Covers REST APIs, validation, dependencies, security. Keywords: Pydantic, async, OAuth2, JWT.

fastapi-expert

16
from diegosouzapw/awesome-omni-skill

Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke for async SQLAlchemy, JWT authentication, WebSockets, OpenAPI documentation.

fastapi-development

16
from diegosouzapw/awesome-omni-skill

Modern Python API development with FastAPI covering async patterns, Pydantic validation, dependency injection, and production deployment

fastapi-best-practices

16
from diegosouzapw/awesome-omni-skill

FastAPI best practices e convenções baseadas em produção real. Aplicar em todos os projetos FastAPI.

faion-python-skill

16
from diegosouzapw/awesome-omni-skill

No description provided.