python-fastapi-development – skill Lập trình cho agent AI
Phát triển backend Python FastAPI với mẫu async, SQLAlchemy, Pydantic, xác thực và các mẫu API production.
Cài skill python-fastapi-development bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/python-fastapi-development-12f86.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /python-fastapi-development – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/python-fastapi-development-12f86.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $python-fastapi-development – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/python-fastapi-development-12f86.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /python-fastapi-development – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/python-fastapi-development-12f86.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /python-fastapi-development – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Python/FastAPI Development Workflow
Overview
Specialized workflow for building production-ready Python backends with FastAPI, featuring async patterns, SQLAlchemy ORM, Pydantic validation, and comprehensive API patterns.
When to Use This Workflow
Use this workflow when:
- Building new REST APIs with FastAPI
- Creating async Python backends
- Implementing database integration with SQLAlchemy
- Setting up API authentication
- Developing microservices
Workflow Phases
Phase 1: Project Setup
Skills to Invoke
app-builder- Application scaffoldingpython-development-python-scaffold- Python scaffoldingfastapi-templates- FastAPI templatesuv-package-manager- Package management
Actions
1. Set up Python environment (uv/poetry)
2. Create project structure
3. Configure FastAPI app
4. Set up logging
5. Configure environment variables
Copy-Paste Prompts
Use @fastapi-templates to scaffold a new FastAPI projectUse @python-development-python-scaffold to set up Python project structurePhase 2: Database Setup
Skills to Invoke
prisma-expert- Prisma ORM (alternative)database-design- Schema designpostgresql- PostgreSQL setuppydantic-models-py- Pydantic models
Actions
1. Design database schema
2. Set up SQLAlchemy models
3. Create database connection
4. Configure migrations (Alembic)
5. Set up session management
Copy-Paste Prompts
Use @database-design to design PostgreSQL schemaUse @pydantic-models-py to create Pydantic models for APIPhase 3: API Routes
Skills to Invoke
fastapi-router-py- FastAPI routersapi-design-principles- API designapi-patterns- API patterns
Actions
1. Design API endpoints
2. Create API routers
3. Implement CRUD operations
4. Add request validation
5. Configure response models
Copy-Paste Prompts
Use @fastapi-router-py to create API endpoints with CRUD operationsUse @api-design-principles to design RESTful APIPhase 4: Authentication
Skills to Invoke
auth-implementation-patterns- Authenticationapi-security-best-practices- API security
Actions
1. Choose auth strategy (JWT, OAuth2)
2. Implement user registration
3. Set up login endpoints
4. Create auth middleware
5. Add password hashing
Copy-Paste Prompts
Use @auth-implementation-patterns to implement JWT authenticationPhase 5: Error Handling
Skills to Invoke
fastapi-pro- FastAPI patternserror-handling-patterns- Error handling
Actions
1. Create custom exceptions
2. Set up exception handlers
3. Implement error responses
4. Add request logging
5. Configure error tracking
Copy-Paste Prompts
Use @fastapi-pro to implement comprehensive error handlingPhase 6: Testing
Skills to Invoke
python-testing-patterns- pytest testingapi-testing-observability-api-mock- API testing
Actions
1. Set up pytest
2. Create test fixtures
3. Write unit tests
4. Implement integration tests
5. Configure test database
Copy-Paste Prompts
Use @python-testing-patterns to write pytest tests for FastAPIPhase 7: Documentation
Skills to Invoke
api-documenter- API documentationopenapi-spec-generation- OpenAPI specs
Actions
1. Configure OpenAPI schema
2. Add endpoint documentation
3. Create usage examples
4. Set up API versioning
5. Generate API docs
Copy-Paste Prompts
Use @api-documenter to generate comprehensive API documentationPhase 8: Deployment
Skills to Invoke
deployment-engineer- Deploymentdocker-expert- Containerization
Actions
1. Create Dockerfile
2. Set up docker-compose
3. Configure production settings
4. Set up reverse proxy
5. Deploy to cloud
Copy-Paste Prompts
Use @docker-expert to containerize FastAPI applicationTechnology Stack
| Category | Technology |
|----------|------------|
| Framework | FastAPI |
| Language | Python 3.11+ |
| ORM | SQLAlchemy 2.0 |
| Validation | Pydantic v2 |
| Database | PostgreSQL |
| Migrations | Alembic |
| Auth | JWT, OAuth2 |
| Testing | pytest |
Quality Gates
- [ ] All tests passing (>80% coverage)
- [ ] Type checking passes (mypy)
- [ ] Linting clean (ruff, black)
- [ ] API documentation complete
- [ ] Security scan passed
- [ ] Performance benchmarks met
Related Workflow Bundles
development- General developmentdatabase- Database operationssecurity-audit- Security testingapi-development- API patterns
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- python-packaging – Hướng dẫn toàn diện cách tạo, cấu trúc và phân phối package Python bằng công cụ đóng gói…
- python-patterns – Nguyên tắc phát triển Python và cách ra quyết định. Chọn framework, mẫu async, type…
- python-performance-optimization – Profile và tối ưu code Python bằng cProfile, công cụ đo bộ nhớ và best practice về hiệu…
- python-pro – Thành thạo Python 3.12+ với tính năng hiện đại, async, tối ưu hiệu năng và thực hành sẵn…
- python-testing-patterns – Xây dựng chiến lược test toàn diện với pytest, fixtures, mocking và phát triển hướng…
- qiskit – Xây dựng và transpile mạch Qiskit, kiểm thử simulator cục bộ và chuẩn bị workload trên…
- qoder-delegate – Giao tác vụ viết code cho Qoder CLI (`qodercli`) chỉ khi người dùng yêu cầu rõ ràng…
- rayden-code – Tạo code React với component Rayden UI, dùng đúng props, token và các mẫu layout cao cấp.