richin13/dotfiles/fastapi-dev
Claude Code and agent skill by richin13/dotfiles
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
FastAPI engineering choices. To be used when asked to "create router", "create crud router", "add new endpoint" or similar in a fastapi codebase.
Install
npx vskill@latest install richin13/dotfiles/fastapi-devSKILL.md
The same SKILL.md was published earlier as richin13/dotfiles/fastapi-dev.
FastAPI development
- Always define an application factory (
create_app) in<module>/__init__.pyor<module>/main.py(prefer the former). - Import routers in app factory and register them via
app.include_router. Define a helper_register_routersfunction colocated withcreate_app. - Define a custom exceptions module at
<module>/exceptions.pywith a base application error. Then register an exception handler via@app.exception_handler(BaseAppError)to return proper JSON responses. - Ensure pydantic's
RequestValidationErrorandValidationErrorare handled too and transformed to a consistent error response format. - All responses use generic envelope schemas (
APIResponse[T],APIListResponse[T],APIErrorResponse) so the OpenAPI spec surfaces the wrapping. Seereferences/response-schemas.md.
Routers
Routers are thin HTTP boundaries. They handle authentication, authorization, query parameter parsing, and response shaping, nothing else. Business logic lives in plain functions called "operations".
- Common dependencies are declared as annotated aliases, e.g:
UseDBSession = t.Annotated[Session, Depends(get_db_session)]— SQLAlchemy sessionUseSettings = t.Annotated[Settings, Depends(get_settings)]— Pydantic settings object- Cross-cutting request context is bundled into a single
AppContextdataclass injected viaDepends. Adding new cross-cutting concerns (e.g. request ID) means updating the dataclass and its factory, not every operation signature. - Follow the naming pattern
UseX. If routers start to have many different dependencies, refactor the most common ones to aUseAppContext.
Operations
Operations are plain functions (or coroutines) that receive:
ctx: AppContextas the first argument (orsessionandsettings)- Input data (validated Pydantic schemas) as keyword arguments
They handle business logic and external service calls.
Testing
- Override individual dependencies via
app.dependency_overrides - Operations are tested by calling them directly with a constructed
AppContext
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/fastapi-dev/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/richin13/dotfiles/fastapi-dev)