MCPInstall

fastapi

FastAPI development including async endpoints, Pydantic models, dependency injection, and OpenAPI documentation. Activate for FastAPI apps, async Python APIs, and modern Python web services.

Installs
51
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/thelobbi/claude --skill fastapi
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads fastapi automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

FastAPI Skill

Provides comprehensive FastAPI development capabilities for the Golden Armada AI Agent Fleet Platform.

When to Use This Skill

Activate this skill when working with:

  • FastAPI application development
  • Async endpoint implementation
  • Pydantic model definitions
  • Dependency injection patterns
  • OpenAPI/Swagger documentation

Quick Reference

Run Commands

```bash

Development

uvicorn main:app --reload --host 0.0.0.0 --port 8000

Production

uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4

With Gunicorn

gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 ```

Application Structure

``` app/ ├── main.py ├── config.py ├── dependencies.py ├── routers/ │ ├── init.py │ ├── agents.py │ └── tasks.py ├── models/ │ ├── init.py │ ├── agent.py │ └── task.py ├── schemas/ │ ├── init.py │ ├── agent.py │ └── task.py └── services/ ├── init.py └── llm_service.py ```

Basic Application

```python

main.py

from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from contextlib import asynccontextmanager

from app.routers import agents, tasks from app.config import settings

@asynccontextmanager async def lifespan(app: FastAPI): # Startup print("Starting up...") yield # Shutdown print("Shutting down...")

app = FastAPI( title="Golden Armada Agent API", version="1.0.0", lifespan=lifespan )

app.add_middleware( CORSMiddleware, allow_origins=settings.allowed_origins, allow_credentials=True, allow_methods=[""], allow_headers=[""], )

app.include_router(agents.router, prefix="/api/v1/agents", tags=["agents"]) app.include_router(tasks.router, prefix="/api/v1/tasks", tags=["tasks"])

@app.get("/health") async def health_check(): return {"status": "healthy", "service": "golden-armada"} ```

Pydantic Schemas

```python

schemas/agent.py

from pydantic import BaseModel, Field from typing import Optional from enum import Enum

class AgentType(str, Enum): CLAUDE = "claude" GPT = "gpt" GEMINI = "gemini"

class AgentBase(BaseModel): name: str = Field(..., min_length=1, max_length=100) type: AgentType description: Optional[str] = None

class AgentCreate(AgentBase): pass

class AgentResponse(AgentBase): id: str status: str created_at: datetime

model_config = ConfigDict(from_attributes=True)

```

Router Example

```python

routers/agents.py

from fastapi import APIRouter, HTTPException, Depends, status from typing import List

from app.schemas.agent import AgentCreate, AgentResponse from app.services.agent_service import AgentService from app.dependencies import get_agent_service

router = APIRouter()

@router.post("/", response_model=AgentResponse, status_code=status.HTTP_201_CREATED) async def create_agent( agent: AgentCreate, service: AgentService = Depends(get_agent_service) ): """Create a new agent.""" return await service.create(agent)

@router.get("/", response_model=List[AgentResponse]) async def list_agents( skip: int = 0, limit: int = 100, service: AgentService = Depends(get_agent_service) ): """List all agents.""" return await service.list(skip=skip, limit=limit)

@router.get("/{agent_id}", response_model=AgentResponse) async def get_agent( agent_id: str, service: AgentService = Depends(get_agent_service) ): """Get agent by ID.""" agent = await service.get(agent_id) if not agent: raise HTTPException(status_code=404, detail="Agent not found") return agent ```

Dependency Injection

```python

dependencies.py

from functools import lru_cache from typing import Annotated from fastapi import Depends

from app.config import Settings from app.services.agent_service import AgentService from app.services.llm_service import LLMService

@lru_cache def get_settings(): return Settings()

async def get_llm_service( settings: Annotated[Settings, Depends(get_settings)] ) -> LLMService: return LLMService(api_key=settings.anthropic_api_key)

async def get_agent_service( llm_service: Annotated[LLMService, Depends(get_llm_service)] ) -> AgentService: return AgentService(llm_service=llm_service) ```

Background Tasks

```python from fastapi import BackgroundTasks

@router.post("/tasks/{task_id}/execute") async def execute_task( task_id: str, background_tasks: BackgroundTasks, service: TaskService = Depends(get_task_service) ): background_tasks.add_task(service.execute_async, task_id) return {"status": "accepted", "task_id": task_id} ```

WebSocket Support

```python from fastapi import WebSocket, WebSocketDisconnect

@router.websocket("/ws/{agent_id}") async def agent_websocket(websocket: WebSocket, agent_id: str): await websocket.accept() try: while True: data = await websocket.receive_text() response = await process_message(agent_id, data) await websocket.send_text(response) except WebSocketDisconnect: print(f"Agent {agent_id} disconnected") ```

FAQ

What does the fastapi skill do?

FastAPI development including async endpoints, Pydantic models, dependency injection, and OpenAPI documentation. Activate for FastAPI apps, async Python APIs, and modern Python web services.

How do I install fastapi?

Run npx skills add https://github.com/thelobbi/claude --skill fastapi in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/fastapi/ (personal) or .claude/skills/fastapi/ (project).

Which AI agents can use fastapi?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is fastapi safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains fastapi?

It is published by thelobbi in thelobbi/claude. It has 51 recorded installs.

More from thelobbi/claude

View all →

vision-multimodal

thelobbi/claude

Vision and multimodal capabilities for Claude including image analysis, PDF processing, and document understanding. Activate for image input, base64 encoding, multiple images, and visual analysis.

Media & Creative551 installs

complex-reasoning

thelobbi/claude

Multi-step reasoning patterns and frameworks for systematic problem solving. Activate for Chain-of-Thought, Tree-of-Thought, hypothesis-driven debugging, and structured analytical approaches that leverage extended thinking.

design-system

thelobbi/claude

Open the skill to read its SKILL.md instructions.

Frontend & Design135 installs

keycloak

thelobbi/claude

Keycloak identity and access management including realms, clients, authentication flows, themes, and user federation. Activate for OAuth2, OIDC, SAML, SSO, identity providers, and authentication configuration.

84 installs

kanban

thelobbi/claude

Kanban methodology including boards, WIP limits, flow metrics, and continuous delivery. Activate for Kanban boards, workflow visualization, and lean project management.

gcp

thelobbi/claude

Open the skill to read its SKILL.md instructions.

DevOps & Cloud81 installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs