fastapi-router-py
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models
Install / Use
npx skills add microsoft/skills --skill fastapi-router-pyInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of fastapi-router-py
fastapi-router-py scores 80/100 on our quality scale, 2403rd of 3,841 Development & Engineering skills we index.
Its SKILL.md is 2.2 KB long, well organised into 10 sections with 3 code examples: moderately detailed.
With 3,051 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so fastapi-router-py is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-30. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
fastapi-router-py compared with similar skills
All 4 of these similar skills score higher than fastapi-router-py; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| fastapi-router-py (this skill)by microsoft | 80 | 3.1k | 6d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 86.2k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.5k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 3d ago | CLAUDE.md |
Frequently asked questions
- How do I install fastapi-router-py?
- Run
npx skills add microsoft/skills --skill fastapi-router-py. The install tabs above show the steps for each supported agent. - Which AI agents does fastapi-router-py work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is fastapi-router-py safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is fastapi-router-py still maintained?
- The repository was last updated 6 days ago, so fastapi-router-py is actively maintained.
Skill content
View source on GitHubname: fastapi-router-py description: Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications. license: MIT metadata: author: Microsoft version: "1.0.0"
FastAPI Router
Create FastAPI routers following established patterns with proper authentication, response models, and HTTP status codes.
Quick Start
Copy the template from assets/template.py and replace placeholders:
{{ResourceName}}→ PascalCase name (e.g.,Project){{resource_name}}→ snake_case name (e.g.,project){{resource_plural}}→ plural form (e.g.,projects)
Authentication Patterns
# Optional auth - returns None if not authenticated
current_user: Optional[User] = Depends(get_current_user)
# Required auth - raises 401 if not authenticated
current_user: User = Depends(get_current_user_required)
Response Models
@router.get("/items/{item_id}", response_model=Item)
async def get_item(item_id: str) -> Item:
...
@router.get("/items", response_model=list[Item])
async def list_items() -> list[Item]:
...
HTTP Status Codes
@router.post("/items", status_code=status.HTTP_201_CREATED)
async def create_item(item: ItemCreate) -> Item:
...
@router.delete("/items/{id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_item(id: str) -> None:
...
Integration Steps
- Create router in
src/backend/app/routers/ - Mount in
src/backend/app/main.py - Create corresponding Pydantic models
- Create service layer if needed
- Add frontend API functions
Best Practices
- Pick
deforasync defper endpoint based on whether you call async I/O; do not call blocking I/O from anasync defhandler. - Manage long-lived resources (DB pools, HTTP clients) in
lifespanand inject viaDepends; usewith/async withfor per-request resources.
Reference Files
| File | Contents | |------|----------| | references/capabilities.md | Additional non-hero capabilities, operation-group coverage, and production checklists. |
Related Skills
Agent-Reach
86.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
44.5kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
