python-fastapi-setup

python-fastapi-setup is a skill for Codex from Victory-7291/project-scaffold-setup-skills. It costs 84 tokens per session (1,905 once invoked), scanned A, original, MIT.

A setup method for Python web services built with FastAPI, a framework for creating APIs. It organizes application code, settings, routes, middleware, health checks, tests, and deployment files.

In plain words
What is it for?
It is for creating or modernizing FastAPI services, including startup configuration, API endpoints, testing, Docker, and production server setup.
Why use it?
It gives a service a predictable structure so developers can find and maintain its main parts without searching through wrapper scripts.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit It is for creating or modernizing FastAPI services, including startup configuration, API endpoints, testing, Docker, and production server setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup
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 Victory-7291/project-scaffold-setup-skills --skill python-fastapi-setup
Clone the repo
git clone --depth 1 https://github.com/Victory-7291/project-scaffold-setup-skills

Made for: 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 python-fastapi-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup/github.svg)](https://agentmods.dev/skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup)
Your own site
<a href="https://agentmods.dev/skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup"><img src="https://agentmods.dev/badge/skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup/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 python-fastapi-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup"><img src="https://agentmods.dev/badge/skills/victory-7291/project-scaffold-setup-skills/python-fastapi-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00084 $0.01905
Opus 5.5 $0.00034 $0.00762
Sonnet 5.5 $0.00017 $0.00381
Haiku 4.5 $0.00008 $0.00191

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

Security

Grade A, and why

python-fastapi-setup scanned grade A with 1 finding 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.

The scan reads SKILL.md. This mod also ships 2 executable files (assets/gunicorn.conf.py, scripts/scaffold_fastapi_project.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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsS http://127.0.0.1:8000/health
skills/python-fastapi-setup/SKILL.md · 182 lines

How it starts

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

Python FastAPI Setup

Overview

Create or modernize FastAPI services around a small repeatable structure:

app/main.py -> app/core/config.py -> app/api/v1/endpoints/ -> middleware -> tests -> deployment

Prefer direct startup commands, typed settings, explicit lifespan ownership for process-level resources, and a minimal test suite. Keep the scaffold boring on purpose: a future maintainer should be able to find the app, settings, routers, health check, and startup command without hunting through wrapper scripts.

Workflow

  1. Classify the workspace before writing files.

    • Treat the target as greenfield if it is empty or the user asks for a new service.
    • Treat it as existing if it has Python source, pyproject.toml, requirements.txt, an ASGI app, tests, Docker files, CI, or git history.
    • For existing projects, inventory the current entrypoint, router layout, dependency manager, settings pattern, middleware, tests, deployment files, and startup commands before editing.
  2. For greenfield scaffolds, run the bundled script from this skill directory:

python3 scripts/scaffold_fastapi_project.py \
  --name inventory_api \
  --out /path/to/inventory_api
  • The scaffold always generates gunicorn.conf.py, Docker, and Compose files for a production-ready default.
  • The scaffold script renders reusable project and deployment configuration from assets/ for pyproject.toml, Docker, Compose, and Gunicorn. Update those assets when the shared standard changes; update the Python script when generation logic, arguments, app files, or dependency policy change.
  • Read references/python-fastapi-blueprint.md before changing generated files or adding new script options.
  1. For existing projects, patch conservatively.
    • Preserve working endpoints and behavior.
    • Before moving routes, record the existing endpoint contract: path, method, status code, response shape, sample payloads, headers, and any query/path parameters visible in the current code or tests.
    • Add or update regression tests for those existing contracts before or during the refactor. The tests should assert the old payloads and status codes, not newly invented placeholder data.
    • Move toward app/main.py only when it improves clarity or matches the user's request.
    • Retire wrapper launchers such as run_service.py after replacing them with documented direct commands.
    • Keep the repo's dependency manager unless there is a clear reason to change it.
    • Add only the modules and settings the service actually uses.
    • Do not replace legacy route payloads, IDs, names, or response field types with new sample fixtures just because the code moved into a cleaner module.

Read the full file on GitHub · 182 lines

Files

What ships with it

9 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. 1mo ago First seen · 182 lines · 84 tokens per session scan A 391f0a2302e0

Subscribe to this mod's changes

python-fastapi-setup is a skill published in the GitHub repository Victory-7291/project-scaffold-setup-skills (8 stars, last pushed 2mo ago), licensed MIT. It adds 84 tokens to every session and 1,905 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

litestar-granian

Auto-activate for litestargranian, GranianPlugin, litestar run Granian options, runtime threads, HTTP/2, TLS, access logs, metrics, static mounts, or worker lifecycle. Not for non-Granian servers.

litestar-org/litestar-skills · 54 tokens

litestar

Auto-activate for Litestar, Controller, Router, @get/@post, FromPath, MsgspecDTO, OpenAPIConfig, Provide, FromDishka, Guard, ASGIMiddleware, HTTPException, ChannelsPlugin, or WebSocket. Not for standalone libs.

litestar-org/litestar-skills · 58 tokens

litestar-autowire

Auto-activate for litestarautowire, AutowirePlugin, AutowireConfig, domainpackages, AutowireIntegration, AutowireLoader, or clearautowirecache. Not for manual Router composition — use explicit routes.

litestar-org/litestar-skills · 56 tokens

litestar-styleguide

Use when authoring Litestar skill content, Python/TypeScript examples, PEP 604, async I/O, Google docstrings, ruff/mypy/pyright, pytest, or CI rules. Not for focused Litestar APIs.

litestar-org/litestar-skills · 54 tokens

ktor

Use when building, modifying, debugging, or reviewing Ktor 3.5.x server and client applications, including routing, requests/responses, plugins, serialization, authentication, sessions, WebSockets, SSE, engines, testing, deployment, and Kotlin multiplatform client work.

Heapy/kortex · 57 tokens

apideck-python

Apideck Unified API integration patterns for Python. Use when building integrations with accounting software (QuickBooks, Xero, NetSuite), CRMs (Salesforce, HubSpot, Pipedrive), HRIS platforms (Workday, BambooHR), file storage (Google Drive, Dropbox, Box), ATS systems (Greenhouse, Lever), e-commerce, or any of…

apideck-libraries/api-skills · 116 tokens