external/vercel-python/SKILL.md
Diagnose, fix, and prepare Python projects for Vercel deployments. Use for FastAPI, Flask, Django, ASGI/WSGI, Python entrypoints, pyproject.toml, requirements.txt, uv, .python-version, bundle size, Python runtime errors, or Vercel's Python SDK/runtime APIs. Use this skill whenever the user mentions Python and Vercel in the same context, even if they don't explicitly ask for deployment help.
npx skillsauth add seikaikyo/dash-skills vercel-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when a Vercel deployment involves Python, including FastAPI, Flask, Django, generic ASGI/WSGI apps, Python runtime diagnostics, dependency resolution, Python version selection, bundle size issues, or the vercel Python SDK.
This skill diagnoses and fixes Python-specific deployment issues. It does not handle the deployment itself.
Inspect the project structure before changing any files. Check the following:
Entrypoint: Identify the app entrypoint and confirm it exposes a supported top-level callable (app, application, or handler). The entrypoint priority is: [tool.vercel].entrypoint in pyproject.toml, then framework-specific discovery (Django uses the settings module; others use conventional files like app.py, main.py, etc.), then [project.scripts].app (legacy). For Django projects, if manage.py exists at the root or one directory below, check that the settings module defines ASGI_APPLICATION or WSGI_APPLICATION. See references/runtime-and-entrypoints.md for full details.
Dependencies: Identify the dependency manifest. Vercel discovers manifests from the entrypoint directory upward to the project root. The highest-priority manifest wins: pyproject.toml > Pipfile.lock / Pipfile > requirements.txt (and variants like requirements.frozen.txt, requirements.in, requirements/prod.txt). Check for a lockfile: uv.lock or pylock.toml (used with pyproject.toml projects). See references/dependencies-and-versions.md for the full priority list.
Bundle size: Vercel Python functions support up to 500 MB. Do not use 250 MB as the limit. When a uv.lock is present, the builder can automatically externalize large public PyPI packages and install them at cold start, allowing even larger dependency sets. See references/dependencies-and-versions.md for size reduction strategies.
Python version: Check .python-version (takes priority) and project.requires-python in pyproject.toml. Vercel supports Python 3.12, 3.13, and 3.14 for new projects. Only flag a version as blocking if it excludes all supported versions (e.g., ==3.11.*, <3.12, >=3.15). A range like >=3.11 is fine because it includes 3.12+.
Database: If the project requires a database (PostgreSQL, MySQL, etc.), note that Vercel Marketplace provides managed database integrations (Neon Postgres, Supabase, AWS RDS) that automatically set connection environment variables. Do not assume the app cannot connect to a database on Vercel. See references/frameworks.md for details.
Vercel config: If vercel.json exists, check for custom buildCommand or installCommand (these can limit dependency optimization).
Monorepo: If the Python app is in a subdirectory of a monorepo, confirm rootDirectory is set correctly in the Vercel project settings. The builder resolves uv.lock from the workspace root automatically for uv workspace projects.
Background workers: If the project uses task queues, background jobs, or event-driven workers (Celery, Dramatiq, Django tasks, or similar), check references/frameworks.md for Vercel's worker service support via the vercel-workers package. Do not assume background processing is incompatible with Vercel.
Identify blockers and risks from what you found:
manage.py.[tool.vercel].entrypoint).Read only the reference file that matches the problem:
references/runtime-and-entrypoints.mduv, and Python versions: references/dependencies-and-versions.mdreferences/frameworks.mdreferences/troubleshooting.mdreferences/sdk-runtime-apis.mdMake the smallest safe project change that addresses the root cause, or give the user exact remediation when credentials, missing env vars, or account state block progress.
Verify. Re-check the project against the same checklist from step 1. Confirm that no blocking findings remain and all risks have been documented or addressed.
This skill's job is done when the Python project has no blocking deployment issues. It does not handle deployment, auth, environment variables, domains, or logs.
Do not accept these conclusions without checking the reference docs first:
| Claim | Reality |
|---|---|
| "The bundle is too large for Vercel" | The limit is 500 MB, not 250 MB. With uv.lock, the builder externalizes public packages beyond that. |
| "This app requires a database, so it can't deploy to Vercel" | Vercel Marketplace provides Neon Postgres, Supabase, and AWS RDS integrations. |
| "Background processing is impossible on Vercel" | Vercel supports worker services via vercel-workers with Celery, Dramatiq, and Django task adapters. |
| "Vercel doesn't support uv workspaces or monorepos" | It does. The builder resolves uv.lock from the workspace root. |
| "This entrypoint path isn't supported" | Any path works with [tool.vercel].entrypoint in pyproject.toml. |
| "Python version X.Y isn't compatible" | Only blocking if the range excludes all of 3.12, 3.13, and 3.14. Ranges like >=3.11 are fine. |
Lead with the concrete blocker or readiness status:
I inspected the Python project. Vercel should use `app/main.py` as the entrypoint with `app` as the ASGI callable. No blocking issues found.
When several findings exist, group them by deployment impact:
references/runtime-and-entrypoints.md.uv, lockfile, or Python version issues: inspect references/dependencies-and-versions.md.collectstatic issues: inspect references/frameworks.md.PYTHON_ENTRYPOINT_NOT_FOUND, PYTHON_HANDLER_NOT_FOUND, DJANGO_SETTINGS_FAILED, PYTHON_REQUIREMENTS_PARSE_ERROR, PYTHON_DEPENDENCY_SYNC_FAILED, or LAMBDA_SIZE_EXCEEDED: inspect references/troubleshooting.md.references/sdk-runtime-apis.md.development
拋棄式 HTML mockup 比稿:產出 2 到 3 個設計立場不同的變體(密度 / 版式 / 強調軸,不是換色),各附取捨說明,最後給有立場的對比結論。適用:「畫個草圖」「比較 A 版 B 版」「先看方向再做」「給我看幾種做法」。要 production 元件或設計已定案時不適用。
tools
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
testing
Reference for writing and editing agent skills well — the vocabulary and principles that make a skill predictable. Consult when authoring, reviewing, or pruning a SKILL.md.