Deploy doctor
@shipcheck/deploy-doctor
Paste a failed Vercel or Netlify build log and get the most likely cause and a fix you can apply. Recognizes about twenty common failures: letter-case import errors, missing packages, missing env vars, prerender errors, window is not defined, lockfile drift, peer dependency conflicts, wrong Node version, out of memory, wrong output or root folder, oversized functions, and more.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "deploy-doctor",
- 3 "owner": "shipcheck",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Paste a failed Vercel or Netlify build log and get the most likely cause and a fix you can apply. Recognizes about twenty common failures: letter-case import errors, missing packages, missing env vars, prerender errors, window is not defined, lockfile drift, peer dependency conflicts, wrong Node version, out of memory, wrong output or root folder, oversized functions, and more.",
- 7 "category": "devops",
- 8 "license": "MIT",
- 9 "compat": ["claude-code"],
- 10 "permissions": {
- 11 "shell": ["node scripts/triage-log.mjs", "npm run build", "pnpm run build", "yarn build"],
- 12 "files": {
- 13 "read": ["./data/**", "./package.json", "./vercel.json", "./netlify.toml", "./next.config.*", "./vite.config.*", "./.nvmrc", "./src/**", "./app/**", "./pages/**", "./components/**", "./lib/**"],
- 14 "write": ["./data/**", "./out/**"]
- 15 }
- 16 },
- 17 "tests": {
- 18 "cases": [
- 19 {
- 20 "name": "a Vercel Next.js log with a missing Supabase env var points at env first, prerender second",
- 21 "inputs": {
- 22 "data/build-log.txt": "Running build in Washington, D.C., USA (East)\nVercel CLI 39.1.0\nRunning \"npm run build\"\n ▲ Next.js 15.0.3\n Generating static pages (0/8) ...\nError: supabaseUrl is required.\n at new SupabaseClient (node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:45:19)\nError occurred prerendering page \"/pricing\".\nError: Command \"npm run build\" exited with 1\n"
- 23 },
- 24 "checks": [
- 25 {
- 26 "type": "command_exits_zero",
- 27 "command": "node scripts/triage-log.mjs data/build-log.txt --json out/deploy-triage.json --md out/deploy-triage.md"
- 28 },
- 29 {
- 30 "type": "output_matches_schema",
- 31 "path": "out/deploy-triage.json",
- 32 "schema": {
- 33 "type": "object",
- 34 "required": ["detected", "primary", "matches"],
- 35 "properties": {
- 36 "detected": {
- 37 "type": "object",
- 38 "properties": {
- 39 "platform": { "const": "Vercel" },
- 40 "framework": { "const": "Next.js" },
- 41 "package_manager": { "const": "npm" }
- 42 }
- 43 },
- 44 "primary": { "const": "missing-env" },
- 45 "matches": { "type": "array", "minItems": 2 }
- 46 }
- 47 }
- 48 },
- 49 { "type": "file_contains", "path": "out/deploy-triage.md", "text": "## Most likely cause: Environment variable missing at build time" }
- 50 ]
- 51 },
- 52 {
- 53 "name": "a Netlify Vite log with a wrong-case import is diagnosed as a local path problem",
- 54 "inputs": {
- 55 "data/build-log.txt": "Netlify Build\n@netlify/build 29.55.2\nNow using node v22.11.0 (npm v10.9.0)\n$ npm run build\nvite v5.4.10 building for production...\nerror during build:\nFailed to resolve import \"./components/navBar\" from \"src/App.tsx\". Does the file exist?\n\"build.command\" failed\nCommand failed with exit code 1: npm run build\n"
- 56 },
- 57 "checks": [
- 58 {
- 59 "type": "command_exits_zero",
- 60 "command": "node scripts/triage-log.mjs data/build-log.txt --json out/deploy-triage.json"
- 61 },
- 62 {
- 63 "type": "output_matches_schema",
- 64 "path": "out/deploy-triage.json",
- 65 "schema": {
- 66 "type": "object",
- 67 "properties": {
- 68 "detected": {
- 69 "type": "object",
- 70 "properties": {
- 71 "platform": { "const": "Netlify" },
- 72 "framework": { "const": "Vite" },
- 73 "node": { "const": "22.11.0" }
- 74 }
- 75 },
- 76 "primary": { "const": "missing-module-local" }
- 77 }
- 78 }
- 79 }
- 80 ]
- 81 },
- 82 {
- 83 "name": "lockfile drift and long tokens in the log are masked in the report",
- 84 "inputs": {
- 85 "data/build-log.txt": "Running \"install\" command: `npm ci`\nnpm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.\nnpm ERR! token FAKEFAKEFAKEFAKEFAKEFAKEFAKEFAKEFAKE0000 failed\n"
- 86 },
- 87 "checks": [
- 88 {
- 89 "type": "command_exits_zero",
- 90 "command": "node scripts/triage-log.mjs data/build-log.txt --md out/deploy-triage.md"
- 91 },
- 92 { "type": "file_contains", "path": "out/deploy-triage.md", "text": "Lockfile does not match package.json" },
- 93 { "type": "file_not_contains", "path": "out/deploy-triage.md", "text": "FAKEFAKEFAKEFAKEFAKEFAKEFAKEFAKEFAKE0000" }
- 94 ]
- 95 }
- 96 ]
- 97 }
- 98}
