TopRank Skills

Home / Claw Skills / Git / GitHub / Afrexai Fastapi Production
Official OpenClaw rules 72%

Afrexai Fastapi Production

FastAPI Production Engineering

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Afrexai Fastapi Production 技能。 若已安装,则直接安装 Afrexai Fastapi Production 技能。

Overview

Skill Key
1kalin/afrexai-fastapi-production
Author
1kalin
Source Repo
openclaw/skills
Version
-
Source Path
skills/1kalin/afrexai-fastapi-production
Latest Commit SHA
bcfb3f3190d54799c15709b5c23e2edd5e09e84d

Extracted Content

SKILL.md excerpt

# FastAPI Production Engineering

Complete methodology for building, deploying, and scaling production FastAPI applications. Not a tutorial — a production operating system.

## Quick Health Check (/16)

Score 2 points each. Total < 8 = critical work needed.

| Signal | Healthy | Unhealthy |
|--------|---------|-----------|
| Type safety | Pydantic v2 models everywhere | `dict` returns, no validation |
| Error handling | Structured error hierarchy | Bare `HTTPException` strings |
| Auth | JWT + dependency injection | Manual token parsing |
| Testing | 80%+ coverage, async tests | No tests or sync-only |
| Database | Async ORM, migrations | Raw SQL, no migrations |
| Observability | Structured logging + tracing | `print()` debugging |
| Deployment | Multi-stage Docker, health checks | `uvicorn main:app` on bare metal |
| Documentation | Auto-generated, accurate OpenAPI | Default `/docs` untouched |

## Phase 1: Project Architecture

### Recommended Structure

```
src/
├── app/
│   ├── __init__.py
│   ├── main.py              # App factory
│   ├── config.py             # Pydantic Settings
│   ├── dependencies.py       # Shared DI
│   ├── middleware.py          # Custom middleware
│   ├── features/
│   │   ├── users/
│   │   │   ├── __init__.py
│   │   │   ├── router.py     # Endpoints
│   │   │   ├── schemas.py    # Pydantic models
│   │   │   ├── service.py    # Business logic
│   │   │   ├── repository.py # Data access
│   │   │   ├── models.py     # SQLAlchemy/SQLModel
│   │   │   ├── dependencies.py
│   │   │   └── exceptions.py
│   │   ├── auth/
│   │   ├── orders/
│   │   └── ...
│   ├── core/
│   │   ├── database.py       # Engine, session factory
│   │   ├── security.py       # JWT, hashing
│   │   ├── errors.py         # Error hierarchy
│   │   └── logging.py        # Structlog config
│   └── shared/
│       ├── pagination.py
│       ├── filters.py
│       └── responses.py
├── migrations/               # Alembic
├── tests/
│   ├── conftest.py
│   ├── unit/
│...

README excerpt

# 🚀 AfrexAI FastAPI Production Engineering

Complete methodology for building, deploying, and scaling production FastAPI applications. Not a tutorial — a production operating system.

## What This Skill Does

Transforms your FastAPI project from prototype to production-grade with:

- **Project architecture** — Feature-based structure with strict layering
- **Pydantic v2 mastery** — Schema design, validation, generics
- **Error handling** — Structured exception hierarchy with global handler
- **Auth & security** — JWT + RBAC + 10-point security checklist
- **Database patterns** — Async SQLAlchemy + repository pattern + migrations
- **Testing** — Async test patterns with pytest-asyncio + httpx
- **Observability** — Structlog + request tracing + health checks
- **Deployment** — Multi-stage Docker + GitHub Actions CI + production checklist

## Install

```bash
clawhub install afrexai-fastapi-production
```

## Quick Start

Ask your agent:
- `audit my FastAPI project` — get a health score out of 16
- `set up a new FastAPI project` — full structure + config
- `add authentication` — JWT + dependency injection pattern
- `prepare for production` — Dockerfile + CI + checklist

## What Makes This 10X Better

| Feature | Generic Skills | This Skill |
|---------|---------------|------------|
| Architecture | "Use routers" | Full feature-based structure with 7 rules |
| Error handling | `HTTPException(404)` | Custom hierarchy + global handler + structured JSON |
| Auth | Basic JWT example | JWT + RBAC + DI + 10-point security checklist |
| Database | Raw SQLAlchemy | Async + repository pattern + migrations |
| Testing | "Write tests" | Async patterns + fixtures + parametrized + 7 rules |
| Deployment | `uvicorn main:app` | Multi-stage Docker + CI + health checks + checklist |
| Quality | No scoring | 0-100 rubric across 8 weighted dimensions |

## ⚡ Level Up

Get the [AfrexAI SaaS Context Pack ($47)](https://afrexai-cto.github.io/context-packs/) for complete SaaS architecture,...

Related Claw Skills

heyixuan2

bambu-studio-ai

★ 41

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

capt-marbles

geo-optimization

★ 1

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.

carlulsoe

parakeet-stt

★ 0

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, or processing voice recordings locally without cloud APIs.

carlzhao007

feishu-process-feedback

★ 0

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化。 使用场景:飞书自动化工作流、任务进度追踪、批量任务处理、需要实时反馈的场景。

cartoonitunes

bottyfans

★ 0

BottyFans agent skill for autonomous creator monetization. Lets AI agents register, build a profile, publish posts (public, subscriber-only, or pay-to-unlock), upload media, accept USDC subscriptions and tips on Base, send and receive DMs, track earnings, and appear on the creator leaderboard. Use this skill when an agent needs to monetize content, interact with fans, manage a creator profile, handle payments in USDC, or operate as an autonomous creator on the BottyFans platform.

camopel

arxivkb

★ 0

Local arXiv paper manager with semantic search. Crawls arXiv categories, downloads PDFs, chunks content, and indexes with FAISS + Ollama embeddings. No cloud API keys required — everything runs locally.