Skip to main content
skill CX Codex

fastapi-local-dev — Claude Code skill: run FastAPI in dev and prod

A runbook skill for FastAPI: Uvicorn with reload during development, Gunicorn with UvicornWorker in production.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a claude-code
Open on GitHub

What fastapi-local-dev does

The skill hands you commands for both modes. Development: uvicorn app.main:app --reload. Production: gunicorn app.main:app -k uvicorn.workers.UvicornWorker -w <n> --bind :8000, with <n> filled in by you.

Imports get their own note: run from the repo root, either through python -m uvicorn ... or with PYTHONPATH=.. On WSL, when reload misses file changes, the skill suggests WATCHFILES_FORCE_POLLING=true.

There is an anti-patterns section. Two are named outright: pairing --reload with more than one worker, and watch: true in PM2 for Python. Worth checking your start scripts if FastAPI runs under PM2.

What it helps with

  • run FastAPI locally with auto-reload
  • start a production server on Gunicorn with UvicornWorker
  • fix imports when launching from the repo root
  • get auto-reload working under WSL
  • strip conflicting flags from a start command

Example prompts for the agent

  • What is the right way to run FastAPI in dev mode?
  • Build me a production command with Gunicorn and UvicornWorker
  • Reload misses changes on WSL — what should I do?

How to install fastapi-local-dev

1Skills CLI (Vercel)

npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a claude-code

2Manually: put the files in place

~/.claude/skills/fastapi-local-dev/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/fastapi-local-dev/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about fastapi-local-dev

How do I install fastapi-local-dev in Claude?

Run npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a claude-code. The skill file then sits at ~/.claude/skills/fastapi-local-dev/SKILL.md.

What does fastapi-local-dev do?

It is a FastAPI runbook: dev mode on Uvicorn with --reload, prod on Gunicorn with UvicornWorker, plus notes on imports, WSL and anti-patterns.

Why should --reload not run with multiple workers?

The skill lists --reload --workers > 1 as an anti-pattern. Production uses Gunicorn with UvicornWorker and the worker count you choose.

Source text

SKILL.md · MIT
---
name: fastapi-local-dev
description: FastAPI dev/prod runbook (Uvicorn reload, Gunicorn)
user-invocable: false
disable-model-invocation: true
version: 1.1.0
category: toolchain
author: Claude MPM Team
license: MIT
progressive_disclosure:
  entry_point:
    summary: "FastAPI dev: Uvicorn reload; prod: Gunicorn+UvicornWorker"
tags: [python, fastapi]
---

# FastAPI Local Dev

- Dev: `uvicorn app.main:app --reload`
- Imports: run from repo root; use `python -m uvicorn ...` or `PYTHONPATH=.`
- WSL: `WATCHFILES_FORCE_POLLING=true` if reload misses changes
- Prod: `gunicorn app.main:app -k uvicorn.workers.UvicornWorker -w <n> --bind :8000`

Anti-patterns:
- `--reload --workers > 1`
- PM2 `watch: true` for Python

References: `references/`.

© Claude MPM Team · MIT · bobmatnyc/claude-mpm-skills

Similar skills

Everything for Backend and APIs →

From the same set65

vercel-deployments-builds Walks through the Vercel deployment lifecycle: builds, previews, release phases and rollback. Useful when you configure build output or control releases. CX Codex +1 368installs stacked-prs A skill that walks the agent through building stacks of dependent pull requests, where each branch grows from the previous one instead of main. Useful when a large feature is split into phases. CX Codex +1 362installs better-auth-core A skill for wiring Better Auth into TypeScript apps: the instance, server handlers, client, and sessions. Useful when you need auth running without digging through docs. CX Codex +1 358installs reporting-pipelines A skill that fixes one pattern for report exports: collect data, normalize it, write CSV/JSON/Markdown with timestamped names into reports/. CX Codex +1 354installs headlessui A skill covering Headless UI: unstyled React and Vue components with keyboard navigation and ARIA built in. Useful when you want your own design without losing accessibility. CX Codex +1 345installs vercel-networking-domains A skill that walks the agent through Vercel domains, redirects, rewrites, headers and edge cache. Useful when you change traffic behavior rather than app code. CX Codex +1 344installs svelte Get Svelte 5 guidance for reactive components and SvelteKit apps. Use it when building UI state, bindings, routes, or data-loading flows. CX Codex +1 343installs env-manager Checks .env for structural errors, flags secrets sitting in client-exposed variables, and diffs the file against .env.example. Useful before a deploy. CX Codex +1 340installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor