fastapi-routes

fastapi-routes is a skill for Claude Code, Codex from tedivm/robs_awesome_python_template. It costs 44 tokens per session (1,311 once invoked), scanned A, original, MIT.

A set of guidelines for building FastAPI web API routes, including request and response data models. FastAPI is a Python framework for creating web APIs.

In plain words
What is it for?
Adding or changing API endpoints, defining Pydantic models, registering routers, and designing REST APIs. REST APIs use standard actions such as reading, creating, updating, and deleting resources.
Why use it?
It keeps endpoints, HTTP actions, and data validation consistent across a project. It also avoids unclear or unchecked request and response data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Adding or changing API endpoints, defining Pydantic models, registering routers, and designing REST APIs. REST APIs use standard actions such as reading, creating, updating, and deleting resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tedivm/robs_awesome_python_template/fastapi-routes
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 tedivm/robs_awesome_python_template --skill fastapi-routes
Clone the repo
git clone --depth 1 https://github.com/tedivm/robs_awesome_python_template

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/fastapi-routes/github.svg)](https://agentmods.dev/skills/tedivm/robs_awesome_python_template/fastapi-routes)
Your own site
<a href="https://agentmods.dev/skills/tedivm/robs_awesome_python_template/fastapi-routes"><img src="https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/fastapi-routes/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-routes

Your own site · 80×15
<a href="https://agentmods.dev/skills/tedivm/robs_awesome_python_template/fastapi-routes"><img src="https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/fastapi-routes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,311 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.00044 $0.01311
Opus 5.5 $0.00018 $0.00524
Sonnet 5.5 $0.00009 $0.00262
Haiku 4.5 $0.00004 $0.00131

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

Security

Grade A, and why

fastapi-routes 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 1mo ago.

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.

{{cookiecutter.__package_slug}}/.agents/skills/fastapi-routes/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FastAPI Routes

context7: If the context7_query-docs tool is available, resolve and load the full fastapi documentation before proceeding:

context7_resolve-library-id: "fastapi"
context7_query-docs: /fastapi/fastapi "<your query>"

Guidelines and patterns for writing FastAPI routes in this codebase.


REST Principles

APIs must adhere as closely as possible to REST principles, including appropriate use of HTTP verbs:

Verb Usage
GET Read one or many resources
POST Create a new resource
PUT Replace / fully update a resource
PATCH Partial update (use sparingly)
DELETE Remove a resource

Pydantic Models

  • Always use Pydantic models for both input and output — never use plain dict or Any.
  • Never reuse the same model for input and output. Use separate models:
    • PostCreate — user input for creating a resource
    • PostUpdate — user input for updating (optional fields)
    • PostRead — response shape returned to the client
  • Parameters in input models must use Field() with validation constraints and a description.
  • Output models do not require Field() unless you need aliases or serialization control.
from uuid import UUID
from pydantic import BaseModel, Field


class PostCreate(BaseModel):
    title: str = Field(min_length=1, max_length=200, description="Post title")
    content: str = Field(min_length=1, description="Post content")


class PostRead(BaseModel):
    id: UUID
    title: str
    content: str
    created_at: str


class PostUpdate(BaseModel):
    title: str | None = Field(default=None, max_length=200, description="Post title")
    content: str | None = Field(default=None, description="Post content")

Router Pattern

Use APIRouter for all routes. Register the router in {{cookiecutter.__package_slug}}/www.py.

Read the full file on GitHub · 200 lines

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. 1mo ago First seen · 200 lines · 44 tokens per session scan A 65fc767f0a44

Subscribe to this mod's changes

fastapi-routes is a skill published in the GitHub repository tedivm/robs_awesome_python_template (312 stars, last pushed 5mo ago), licensed MIT. It adds 44 tokens to every session and 1,311 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-08-30.

Related

Other skills, from other repositories

python

Enforces FastAPI, Dependency Injection, and general Python coding standards using uv inside the server directory.

aps08/fullstack-clean-architecture · 22 tokens

fastapi

FastAPI best practices and conventions. Use when working with FastAPI APIs, Pydantic models, dependencies, streaming responses including Server-Sent Events (SSE), and serving frontend apps. Keeps FastAPI code clean and up to date with the latest features and patterns.

idiscoord13-sketch/agent-jail-mcp · 57 tokens

background-task

Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.

vstorm-co/full-stack-ai-agent-template · 62 tokens

channel-bot

Work with messaging-channel bots (Telegram / Slack) — register a bot, route inbound messages through the AI agent, handle webhooks vs polling, or add a new channel adapter. Use when wiring chat into a messaging platform or debugging bot delivery.

vstorm-co/full-stack-ai-agent-template · 53 tokens

fastapi-expert

Expert-level FastAPI development for high-performance Python APIs with async support. Use when the user mentions Python, API, async, REST, OpenAPI, or Pydantic, or when the task involves FastAPI Features.

personamanagmentlayer/pcl · 49 tokens

aspnet-core

Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization…

Haohao-end/openagent · 79 tokens