fastapi-router-py

fastapi-router-py is a skill for Claude Code from microsoft/skills. It costs 46 tokens per session (535 once invoked), scanned A, original, MIT.

A template for building FastAPI routers, which are groups of web API endpoints, with create, read, update, and delete operations.

In plain words
What is it for?
Use it when adding authenticated REST endpoints and CRUD operations to a FastAPI application.
Why use it?
It helps keep API routes consistent by covering authentication, response formats, and HTTP status codes.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the azure-sdk-python plugin — 40 skills shipped together

Good fit Use it when adding authenticated REST endpoints and CRUD operations to a FastAPI application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/skills/fastapi-router-py
About the project

microsoft/skills is a collection of skills, custom agents, AGENTS.md templates, plugins, hooks, commands, and MCP configurations that give AI coding agents context for Azure SDK and Microsoft AI Foundry development. Developers use it to install selected domain-specific guidance into coding-agent environments. The catalogue entries are the repository’s own agent resources and supporting configurations.

microsoft/skills · 3,312 stars · on GitHub · microsoft.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add microsoft/skills --skill fastapi-router-py
Clone the repo
git clone --depth 1 https://github.com/microsoft/skills

Made for: Claude Code.

Or install azure-sdk-python, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fastapi-router-py

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/skills/fastapi-router-py/github.svg)](https://agentmods.dev/skills/microsoft/skills/fastapi-router-py)
Your own site
<a href="https://agentmods.dev/skills/microsoft/skills/fastapi-router-py"><img src="https://agentmods.dev/badge/skills/microsoft/skills/fastapi-router-py/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fastapi-router-py

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/skills/fastapi-router-py"><img src="https://agentmods.dev/badge/skills/microsoft/skills/fastapi-router-py.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 535 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00535
Opus 5.5 $0.00018 $0.00214
Sonnet 5.5 $0.00009 $0.00107
Haiku 4.5 $0.00005 $0.00053

Measured 3mo ago against content hash a8c5911b2c67, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fastapi-router-py scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/template.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/plugins/azure-sdk-python/skills/fastapi-router-py/SKILL.md · 73 lines

What it actually says

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

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 73 lines · 46 tokens per session scan A a8c5911b2c67

Subscribe to this mod's changes

fastapi-router-py is a skill published in the GitHub repository microsoft/skills (3,312 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 535 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

fastapi-router-py compared with skills from other repositories

fastapi-router-py next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fastapi-router-pymicrosoft/skillsSkill3.3kyesterdayMITA46Claude Code
bf-to-agents-sdk-typescript-migrationmicrosoft/AgentsSkill1.1ktodayMITA71Claude Code
agent-framework-azure-ai-py-v2diegosouzapw/awesome-omni-skillsSkill1814d agoMITA61Claude Code, Codex
agents-v2-py-v2diegosouzapw/awesome-omni-skillsSkill1814d agoMITA78Claude Code, Codex
agents-v2-pydiegosouzapw/awesome-omni-skillsSkill1814d agoMITA76Claude Code, Codex
agent-framework-azure-ai-pydiegosouzapw/awesome-omni-skillsSkill1814d agoMITA59Claude Code, Codex
agents-sdk-dotnetmicrosoft/AgentsSkill1.1ktodayMITA112Claude Code