# fastapi-microservices-development

Guide for structuring Python microservices using FastAPI, covering dependency injection, asynchronous routes, and service-to-service communication.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 587 installs · ★ 62
- Author: manutej
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/manutej/luxor-claude-marketplace/tree/HEAD/plugins/luxor-backend-toolkit/skills/fastapi-microservices-development/SKILL.md
- Updated: 2026-06-13
- HTML: https://affpapa.org/en/nevibecode/skills/fastapi-microservices-development

## What it does

This skill guides service design in Python. It outlines core boundaries, such as one database per service and stateless endpoint design. It provides practical patterns for resource modeling with Pydantic and CRUD operations with standard status codes.

The reference details when to choose `async def` over standard `def` routines. It shows how to share authentication logic and parameters using FastAPI's `Depends` system. For service communication, the skill implements external HTTP calls through `httpx` with fallback error handling.

The guide requires Python 3.7 or newer. When using synchronous database drivers, standard functions are preferred to keep event loops unblocked.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill fastapi-microservices-development -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill fastapi-microservices-development -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill fastapi-microservices-development -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install manutej/luxor-claude-marketplace fastapi-microservices-development
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill fastapi-microservices-development -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/manutej/luxor-claude-marketplace --path plugins/luxor-backend-toolkit/skills/fastapi-microservices-development
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill fastapi-microservices-development -a opencode
```

### 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/manutej/luxor-claude-marketplace/tree/HEAD/plugins/luxor-backend-toolkit/skills/fastapi-microservices-development/SKILL.md

## When to use it
- structure isolated microservices following the single responsibility principle
- configure dependency injection with `Depends` to share request logic
- handle network communication between services using `httpx`
- write REST CRUD routes paired with Pydantic models

## Example prompts
- Build a set of FastAPI CRUD endpoints for an inventory service using Pydantic schemas.
- Write an async client call using httpx to query an external service with error handling.
- Create a shared dependency with Depends to validate query parameters across multiple endpoints.

## Similar
- [fastapi-microservices-serverless](https://affpapa.org/en/nevibecode/skills/fastapi-microservices-serverless.md) — skill · 724 installs
- [fastapi-development](https://affpapa.org/en/nevibecode/skills/fastapi-development.md) — skill · 618 installs
- [fastapi-templates](https://affpapa.org/en/nevibecode/skills/fastapi-templates.md) — skill · 25840 installs
- [fastapi-python](https://affpapa.org/en/nevibecode/skills/fastapi-python.md) — skill · 13900 installs
- [fastapi-async-patterns](https://affpapa.org/en/nevibecode/skills/fastapi-async-patterns.md) — skill · 953 installs
- [python-fastapi-best-practices-cursorrules-prompt-f](https://affpapa.org/en/nevibecode/rules/python-fastapi-best-practices-cursorrules-prompt-f.md) — rule · ★ 41024

From the same set: [manutej/luxor-claude-marketplace](https://affpapa.org/en/nevibecode/by/manutej/luxor-claude-marketplace.md) — 59 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
