vercel-labs/python on vercel
npx skills add https://github.com/vercel-labs/academy-skills --skill Python on Vercel
Companion skill for the Python on Vercel course. Ship a FastAPI backend and a Next.js 16 frontend as a single Vercel project, on the hobby plan, under one domain.
/python-on-vercel learnStart the guided learning loop. Six lessons across three sections: setup, connecting the apps, and deploying to Vercel.
/python-on-vercel newScaffold a Python + Next.js project on Vercel:
vercel-labs/python-on-vercel-academy)npm install and Python deps via pyproject.tomlvercel login)vercel dev/ renders mock data and /api/items returns JSON/python-on-vercel submitEvaluate the current implementation against the active lesson's outcomes.
https://vercel.com/academy/python-on-vercel.md → course overview
https://vercel.com/academy/python-on-vercel/<lesson>.md → lesson content
app/, package.json, next.config.ts)api/index.py with app = FastAPI() at module levelpyproject.toml at the root (no requirements.txt)vercel.json — Vercel auto-detects Next.js at the root and Python in api/vercel devhttp://localhost:3000/api/* to api/index.py/api prefix (e.g., @app.get("/api/items"))/ or /items will not matchfetch("/api/items") only works in the browserprocess.env.VERCEL_URL (auto-injected on every deployment)VERCEL_URL is hostname-only — prepend https:// and fall back to http://localhost:3000 for local devvercel deploy --prod ships both halves under one domain| Signal | Lesson area |
|---|---|
| Vercel CLI not installed or not authenticated | Setup (1.1) |
| api/index.py runs locally with fastapi dev | FastAPI tour (1.2) |
| app/page.tsx shows mock furniture data in the browser | Next.js tour (1.3) |
| vercel dev serves both apps on localhost:3000 | Connect (2.1) |
| app/page.tsx is async function Home() and calls /api/items | Wired (2.2) |
| Asks about deploy verification or production URLs | Deploy (3.1) |
/api/items — route in api/index.py is missing the /api prefix. Check for @app.get("/api/items"), not @app.get("/items").process.env.VERCEL_URL with a localhost fallback.app not found — the FastAPI variable must be named app at module level. Vercel looks for app at supported entrypoints (app.py, index.py, server.py, plus src/ and app/ variants). Renaming it to api, server, or application breaks deploy detection.fastapi import error — Python deps missing from pyproject.toml, or wrong Python version. Pin requires-python = ">=3.12".vercel dev does not expose /api/* — confirm the command is run from the project root and Python files live in api/.vercel.json — the project structure is the configTake vercel-labs/python on vercel from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.