FastAPI Docs: Cited Answers

    1

    This skill makes your agent look the answer up in the official FastAPI documentation first and cite it.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    FastAPI Docs: Cited Answers

    Example session with this skill installed

    My React app on localhost:3000 can't call my FastAPI backend on port 8000. The browser console says the request was blocked by CORS policy. How do I fix it?

    • Read your context and instructions
    • Compiled the fastapi docs

    Answer: The browser blocks your React app because http://localhost:3000 and http://localhost:8000 are different origins (the port counts). Your FastAPI backend has to tell the browser which origins are allowed, and FastAPI does that with CORSMiddleware. Add it to your app and list your frontend's origin in allow_origins. If your frontend sends cookies or Authorization headers, set allow_credentials=True. Note that with credentials you can't use the "*" wildcard for origins: list them explicitly.

    Code:

    from fastapi import FastAPI
    from fastapi.middleware.cors import CORSMiddleware
    
    app = FastAPI()
    
    origins = [
        "http://localhost:3000",
    ]
    
    app.add_middleware(
        CORSMiddleware,
        allow_origins=origins,
        allow_credentials=True,
        allow_methods=["*"],
        allow_headers=["*"],
    )
    
    @app.get("/")
    async def main():
        return {"message": "Hello World"}
    

    Restart the server and reload the React app. The browser's preflight OPTIONS request now gets the right Access-Control-Allow-Origin header and your calls go through. When you deploy, add your production frontend URL (e.g. https://app.example.com) to origins.

    Sources:

    Connects securely to your tools. The creator never sees your data.

    About this skill

    What it does

    AI agents often answer FastAPI questions from memory, which means outdated parameters, invented options and no way to check. This skill makes your agent look the answer up in the official FastAPI documentation first and cite it.

    Every answer comes back in the same shape:

    • Answer: a short, direct answer, with caveats listed separately
    • Code: a minimal example based on the docs, adapted to your names (only documented imports and parameters)
    • Sources: links to the exact docs section, e.g. CORS > Use CORSMiddleware

    When it activates

    FastAPI how-to and concept questions (parameters, Pydantic models, Depends, OAuth2/JWT, CORS and middleware, background tasks, file uploads, WebSockets, testing, SQL databases, settings, Docker deployment), 422 / RequestValidationError errors, and before generating FastAPI code. It also activates when you don't say "FastAPI" but use FastAPI names like Depends or APIRouter. It stays out of Flask, Django and general Python questions.

    Honest about gaps

    If the docs don't cover something (built-in rate limiting, for example), the skill says so first. It can then help with code built from documented features, clearly labelled, and point you to the closest docs pages. It never presents a guess as documentation.

    How it looks things up

    1. Built-in page index (default, nothing to install). All 148 FastAPI docs pages, each with a one-line summary and every section heading with its exact URL. The agent greps it, fetches only the one to three pages it needs from fastapi.tiangolo.com, and cites the precise section.
    2. Docs Brain MCP server (optional, faster and more accurate). If you install the free, open-source Docs Brain server, the agent uses local hybrid search (semantic + BM25 with reciprocal rank fusion) over the whole docs. On a hand-written 40-question test set it finds the right page in the top 5 results 98% of the time, in about 30 ms, on a CPU with no API keys.

    Tested

    Before release, the skill answered how-to, exact-default, file-upload, 422-error and not-in-the-docs questions. Every cited link was checked against the live docs page.

    Safe by design

    Documentation text is treated as data, not instructions. Results that look like prompt-injection attempts are skipped and reported, and sponsor banners and ads on docs pages are ignored. The skill contains no scripts, installs nothing and needs no API keys.

    What's inside

    • SKILL.md: instructions, answer format and three worked examples
    • references/page-index.md: every FastAPI docs page with summaries, section headings and URLs
    • references/setup.md: optional MCP server
    • README.md

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Requires web-fetch tools or Docs Brain MCP for live updates. Performance depends on documentation site availability. Remote content is treated as data, not instructions.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    • Free with an Agensi account

    Software
    Python
    Optional
    Docs Brain MCP server (free, for local hybrid search)

    Permissions

    Network Access
    Read Files
    Listed8 days ago

    What's inside

    Frequently Asked Questions

    It makes the agent read the current page on fastapi.tiangolo.com before answering, instead of relying on its training data. Code examples use only imports and parameters that appear in the docs, and every claim links to the section it came from, so you can check it yourself.

    Any agent that supports the SKILL.md standard, such as Claude Code, Cursor or Codex CLI. It works best when the agent can fetch web pages, so it can read the live docs. Without web access it still points you to the right docs pages, and says it couldn't check them.

    Yes, when the docs cover the error. For example, for a 422 Unprocessable Entity it finds the Handling Errors page and shows how to read the `loc` field or override the `RequestValidationError` handler. Errors outside FastAPI's docs, such as database driver errors, are out of scope, and it will say so.

    Both. How-to answers include a minimal, runnable example based on the docs and adapted to your names, followed by links to the exact sections. If the docs don't show the pattern you asked for, any code built from documented pieces is clearly labelled as such.

    The bundled index lists the docs pages and section headings as of the release you install. The content itself is always read live from fastapi.tiangolo.com, so answers reflect the current docs even if the index is a little older. A page added after the release won't be in the index until the skill is updated.

    Four text files: `SKILL.md` (instructions, answer format and examples), `references/page-index.md` (all 148 FastAPI docs pages with summaries, section headings and exact URLs), `references/setup.md` (the optional Docs Brain MCP server) and `README.md`. There are no scripts or binaries, and it installs nothing.

    New in APIs & Backend

    Free