SkillAgentSearch skills...

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-py

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

80/100

Supported Platforms

Universal

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.

Substance
20/30
Structure
18/20
Description
12/15
Adoption
15/20
Freshness
15/15

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 found

Our 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.

SkillScoreStarsUpdatedFormat
fastapi-router-py (this skill)by microsoft803.1k6d agoSKILL.md
Agent-Reachby Panniantong10086.2k14d agoCLAUDE.md
headroomby headroomlabs-ai10074.1ktodayCLAUDE.md
ai-job-searchby MadsLorentzen10044.5ktodayCLAUDE.md
claude-howtoby luongnv8910041.7k3d agoCLAUDE.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.

name: 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

  1. Create router in src/backend/app/routers/
  2. Mount in src/backend/app/main.py
  3. Create corresponding Pydantic models
  4. Create service layer if needed
  5. Add frontend API functions

Best Practices

  1. Pick def or async def per endpoint based on whether you call async I/O; do not call blocking I/O from an async def handler.
  2. Manage long-lived resources (DB pools, HTTP clients) in lifespan and inject via Depends; use with/async with for per-request resources.

Reference Files

| File | Contents | |------|----------| | references/capabilities.md | Additional non-hero capabilities, operation-group coverage, and production checklists. |

Related Skills

View on GitHub
GitHub Stars3.1k
CategoryDevelopment
Updated6d ago
Forks349

Languages

TypeScript

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions