fastapi-dev

fastapi-dev is a skill for Claude Code, Codex from saajunaid/caddis-plugin. It costs 18 tokens per session (2,109 once invoked), scanned A, original, MIT.

A guide to building FastAPI backends. FastAPI is a Python framework for creating web APIs, and the guide includes standard patterns, error handling, and tests.

In plain words
What is it for?
Use it to create FastAPI services and add their usual error handling and tests.
Why use it?
It provides a consistent starting point for Python API projects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create FastAPI services and add their usual error handling and tests.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/fastapi-dev"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/fastapi-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,109 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.
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.00018 $0.02109
Opus 5.5 $0.00007 $0.00844
Sonnet 5.5 $0.00004 $0.00422
Haiku 4.5 $0.00002 $0.00211

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

Security

Grade A, and why

fastapi-dev 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.

.github/skills/coding/fastapi-dev/SKILL.md · 301 lines

How it starts

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

FastAPI Development

Project Context — Read project-config.md in the repo root for brand tokens, shared-library paths, and deployment targets.

When to Use

Invoke this skill when:

  • Creating a new FastAPI backend for a project
  • Adding API endpoints for Streamlit frontends
  • Implementing repository pattern with SQL Server
  • Setting up dependency injection chains
  • Configuring CORS for Streamlit ↔ FastAPI communication
  • Deploying FastAPI on IIS/on-premise infrastructure

Project Structure

backend/
├── app/
│   ├── __init__.py
│   ├── main.py              # FastAPI application entry
│   ├── config.py            # Settings (pydantic-settings)
│   ├── dependencies.py      # Shared DI providers
│   ├── routers/
│   │   ├── __init__.py
│   │   ├── records.py        # Records endpoints
│   │   └── analytics.py     # Analytics endpoints
│   ├── models/
│   │   ├── __init__.py
│   │   ├── record.py         # Pydantic request/response models
│   │   └── user.py
│   ├── services/
│   │   ├── __init__.py
│   │   └── record_service.py
│   └── repositories/
│       ├── __init__.py
│       └── record_repo.py
├── tests/
├── .env
└── requirements.txt

Steps

Step 1: Configuration (pydantic-settings)

# app/config.py
from functools import lru_cache
from pydantic_settings import BaseSettings
from pydantic import Field

class Settings(BaseSettings):
    app_name: str = "API"
    debug: bool = False
    db_server: str = Field(..., description="SQL Server host")
    db_name: str = Field(..., description="Database name")
    db_password: str = Field(..., repr=False)
    api_key: str = Field(..., repr=False)
    allowed_origins: list[str] = ["http://localhost:8501"]
    ollama_base_url: str = "http://localhost:11434"
    ollama_model: str = "llama3.1"

    class Config:
        env_file = ".env"

@lru_cache
def get_settings() -> Settings:
    return Settings()

Step 2: Pydantic Models (Base/Create/Update/Response pattern)

# app/models/record.py
from pydantic import BaseModel, ConfigDict, Field
from uuid import UUID
from datetime import datetime
from typing import Literal

class RecordBase(BaseModel):
    customer_id: str = Field(..., min_length=1, max_length=50, example="CUST001")
    record_type: Literal["billing", "service", "technical"]
    description: str = Field(..., min_length=10, max_length=5000)
    priority: int = Field(default=3, ge=1, le=5)

class RecordCreate(RecordBase):
    pass

class RecordUpdate(BaseModel):
    status: Literal["open", "in_progress", "resolved"] | None = None
    resolution_notes: str | None = Field(None, max_length=2000)
    priority: int | None = Field(None, ge=1, le=5)

class RecordResponse(RecordBase):
    model_config = ConfigDict(from_attributes=True)
    id: UUID
    status: str
    created_at: datetime
    updated_at: datetime | None = None

class RecordList(BaseModel):
    items: list[RecordResponse]
    total: int
    page: int
    per_page: int
    pages: int

Read the full file on GitHub · 301 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 · 301 lines · 18 tokens per session scan A 3a2ccd696bb9

Subscribe to this mod's changes

fastapi-dev is a skill published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed 2d ago), licensed MIT. It adds 18 tokens to every session and 2,109 once invoked, about $0.0001 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.