# fastapi-endpoint

Guides you through planning and coding async FastAPI endpoints with Pydantic v2 schemas, SQLAlchemy 2.0, auth checks, and pytest suites. Gathers requirements before writing code.

- skill · `type=skill` · Claude Code · 393 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/web-development/fastapi-endpoint
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/fastapi-endpoint

## What it does

This skill splits endpoint creation into four distinct phases. It begins by scanning your codebase to map existing routers, app entry files, and database session handling. The assistant only asks for new requirements once it understands your project structure.

Requirements are gathered through focused interview rounds. The skill clarifies your data fields, cursor or offset pagination, caching strategy, and authentication approach. After you approve the resulting plan, Claude Code generates Pydantic v2 validation schemas, database models, and route handlers.

The generated code strictly targets modern async stacks with SQLAlchemy 2.0 and Pydantic v2. In projects relying on legacy Pydantic v1 or synchronous database drivers, the output will break without manual refactoring.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill web-development/fastapi-endpoint
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill fastapi-endpoint -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/fastapi-endpoint/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/fastapi-endpoint/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/fastapi-endpoint/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/fastapi-endpoint/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates fastapi-endpoint
```

2. **Manually: put the files in place**
- File: `.github/skills/fastapi-endpoint/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/web-development/fastapi-endpoint
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/fastapi-endpoint/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/web-development/fastapi-endpoint

## When to use it
- plan REST endpoints through guided interview questions
- generate Pydantic v2 schemas for CRUD operations and paginated responses
- write async database queries using SQLAlchemy 2.0
- wire authentication dependencies for JWT tokens or API keys
- scaffold async route tests using pytest

## Example prompts
- Add a new CRUD endpoint for user orders to our FastAPI service
- Build a paginated products endpoint with cursor navigation and JWT auth
- Create a public analytics route with Cache-Control headers

## Similar
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [claude-api](https://affpapa.org/en/nevibecode/skills/claude-api.md) — skill · 74198 installs
- [lark-im](https://affpapa.org/en/nevibecode/skills/lark-im.md) — skill · 472900 installs
- [lark-event](https://affpapa.org/en/nevibecode/skills/lark-event.md) — skill · 466800 installs
- [caveman-discover](https://affpapa.org/en/nevibecode/skills/caveman-discover.md) — skill · 104400 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
