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.
npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/fastapi-local-dev/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/fastapi-local-dev/
1Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a codex2Manually: put the files in place
.agents/skills/fastapi-local-dev/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a cursor2Manually: put the files in place
.cursor/skills/fastapi-local-dev/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install bobmatnyc/claude-mpm-skills fastapi-local-dev2Manually: put the files in place
.github/skills/fastapi-local-dev/SKILL.md1Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a gemini-cli2Platform CLI
gemini skills install https://github.com/bobmatnyc/claude-mpm-skills --path toolchains/python/frameworks/fastapi-local-devManually: put the files in place
.devin/skills/fastapi-local-dev/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add bobmatnyc/claude-mpm-skills --skill fastapi-local-dev -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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