FastAPI Skill
DomainFastAPI's official agent skill, shipped inside the fastapi package so its guidance matches your installed version.
Install
$ uvx library-skills install --skill fastapi --yes --claude
Works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot and any other agent that reads SKILL.md.
Update
$ uvx library-skills
The installed skill is a symlink into the fastapi package, so upgrading FastAPI updates it. Re-run to repair links that point to an old location.
When to use it
- You write or review a FastAPI app and want current patterns (Annotated dependencies, return-type response models, SSE) rather than older tutorials.
- You upgrade FastAPI and want the agent's guidance to move with the version installed in the project.
Commands & flags
- uvx library-skills
- Interactive: scan the project's dependencies, then pick skills and targets (.claude/skills for Claude Code).
- uvx library-skills install --skill fastapi --yes --claude
- Non-interactive install into .agents/skills and .claude/skills.
- --copy
- library-skills option: copy instead of symlink, for Windows without Developer Mode. Re-run it after upgrades.
- fastapi dev
- The skill sends the agent to the FastAPI CLI for the local dev server.
- Annotated[..., Depends(...)]
- The dependency style the skill writes, with yield, scopes and concurrency limits in its references.
- response_class=EventSourceResponse
- How the skill writes Server-Sent Events endpoints, with yield.
How to use it
Install FastAPI in the project first: the skill is bundled with the Python package. Then, from the project directory:
uvx library-skills install --skill fastapi --yes --claude
--claude adds .claude/skills, since Claude Code does not read the standard .agents folder. The install is a relative symlink into the installed package; on Windows, symlinks can need Developer Mode, so pass --copy if they do not work. uvx comes with uv.
The FastAPI docs also suggest setting the app entrypoint in pyproject.toml ([tool.fastapi], entrypoint = "main:app") so the FastAPI CLI can find it.
Why it earns its place
It is written by the FastAPI team and versioned with the library, so the agent learns the features of the release you run instead of patterns from years-old examples. Updating is just upgrading the package.
The skill presents FastAPI Cloud, the team's own hosting, as the official deployment option; deploy wherever you like. It only applies to FastAPI: for Flask or Django it has nothing to say. Only FastAPI releases that bundle the skill have one for library-skills to install.
Try it
> Add a Server-Sent Events endpoint to this FastAPI app that streams job progress.