Creates RPC-style endpoint following layered architecture (Controller → Manager → Repository). Use when creating new API endpoints or CRUD operations.
中文简介正在准备中。当前显示原文说明。
Creates FastAPI endpoints with layered architecture (Router → Service → Repository). Use when creating new API endpoints, CRUD operations, or scaffolding a new domain module in a FastAPI project.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Creates complete FastAPI endpoints following strict layered architecture patterns.
schemas.pymodels.pyrepository.pyservice.pyget_db, get_service in dependencies.pyrouter.pytests/See code-patterns.md for complete templates for each file.
Router (APIRouter) → Service → Repository → Database
↓ ↓ ↓
Depends() Business logic SQLAlchemy
Pydantic schemas HTTPException AsyncSession
Status codes Validation Soft delete
?id=xxx, never path params /{id}deleted_at.is_(None) in all queriesasync def for all endpoints — unless CPU-boundForgetting response_model makes your API leak internal fields. Always set response_model=YourSchema on endpoints. Without it, FastAPI serializes the raw return value, which may include hashed_password, deleted_at, or other internal fields from your SQLAlchemy model.
Depends() creates a new instance per request — not a singleton. If your service holds state, it will be lost between requests. Services should be stateless. If you need shared state, use app state or a cache.
await db.commit() in the dependency, not in the repository. The get_db dependency handles commit/rollback. If you also commit inside the repository, you get double-commit bugs or premature commits before all operations complete.
422 errors from Pydantic are opaque by default. Override the RequestValidationError handler to return field-level errors. The default just says "validation error" with no useful detail for the frontend.
Missing status_code=201 on create endpoints. FastAPI defaults to 200. Explicitly set status_code=status.HTTP_201_CREATED on POST create routes and status_code=status.HTTP_204_NO_CONTENT on delete routes.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Creates RPC-style endpoint following layered architecture (Controller → Manager → Repository). Use when creating new API endpoints or CRUD operations.
中文简介正在准备中。当前显示原文说明。
Write blog posts, guides, tutorials, and long-form content. Sounds like a real person, not AI. Use when the user wants polished written content.
中文简介正在准备中。当前显示原文说明。
Design RPC-style APIs with layered architecture (Controller → Manager → Repository). Use when creating new API endpoints, designing API contracts, or reviewing API patterns.
中文简介正在准备中。当前显示原文说明。
Run a structured brainstorm session for startup ideas. Takes a theme or problem and generates ideas with quick gut-checks. Use when the user wants to explore a space or generate new ideas.
中文简介正在准备中。当前显示原文说明。
Run real browser QA with Playwright. Use when testing a frontend feature, verifying UI before PR, smoke testing after deploy, or investigating reported visual bugs.
中文简介正在准备中。当前显示原文说明。
CI/CD pipeline patterns for GitHub Actions, PR automation, and deployment workflows. Use when setting up CI, fixing broken pipelines, automating PR checks, or configuring deployment.
中文简介正在准备中。当前显示原文说明。