AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Deploy Doctor

skill-yahiasherif002-claude-skills-deploy-doctor · by Yahiasherif002

Diagnose and fix common web-app deployment failures — especially full-stack JS apps (Vite SPA + Express/Node + serverless). Covers "the site shows raw JavaScript source", FUNCTION_INVOCATION_FAILED on Vercel, Render/Railway port-binding failures, env vars that don't take effect, missing build dependencies, blank social link previews, and SPA routing 404s. Use when a deploy "succeeds" but the site…

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add skill-yahiasherif002-claude-skills-deploy-doctor

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-yahiasherif002-claude-skills-deploy-doctor)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Deploy Doctor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Deploy Doctor

A diagnostic playbook for the deployment failures that look mysterious but have well-known causes. Match the symptom, apply the fix.

🔴 Site serves raw JavaScript / shows the bundled server source

Cause: an Express/Node app with server.listen() was deployed to a serverless/static host (Vercel/Netlify). They don't run a persistent server — they served your built dist/index.js as a static file. Fix — pick one:

  • Node host (simplest): deploy to Render/Railway/Fly/DO App Platform. Build npm run build,

start npm start. The Express server serves the SPA + API in one process.

  • Stay serverless: serve the SPA statically (outputDirectory: dist/public) and move API

routes into serverless functions (/api/*). Don't ship the long-running server.

🔴 FUNCTION_INVOCATION_FAILED (Vercel) / function 500s on every request (even GET)

Cause: the function crashes on load — most often an extensionless relative import (import x from "./util") under Vercel's per-file ESM compilation → ERR_MODULE_NOT_FOUND. Fix: make the function self-contained (zero imports), or use explicit .js extensions on relative imports. Also wrap the handler in try/catch so real errors return JSON instead of a platform crash. Test: GET should return your 405, not a platform 500.

🔴 Render/Railway: "deploy live" but unreachable / "no open ports"

Cause: the app doesn't bind the platform's $PORT, or hunts for a "free" port. Fix: in production bind exactly process.env.PORT on host 0.0.0.0:

const port = Number(process.env.PORT) || 3000;
server.listen(port, "0.0.0.0");

Don't run a "find an available port" loop in prod.

🔴 Build fails: "vite: not found" / "esbuild not found"

Cause: the host sets NODE_ENV=production, so npm/pnpm install skips devDependencies (where vite/esbuild/tsx live). Fix: force dev deps for the build: pnpm install --prod=false (or npm ci --include=dev).

🔴 Env vars / API keys "set" but the app acts like they're missing

Causes & fixes:

  • Env vars only apply at build/start of a NEW deploy — after adding them, redeploy.
  • Your .env is gitignored and NOT deployed — set the vars in the host's dashboard, not just locally.
  • Client vs server: only VITE_/NEXT_PUBLIC_-prefixed vars reach the browser; secrets must

stay server-side (functions / server env).

  • Name mismatch — confirm the exact key names.

🔴 Blank/ugly social link previews (LinkedIn/Twitter/Slack)

Cause: og:image / og:url are relative paths; crawlers need absolute URLs. Fix: use https://domain/og-image.png (absolute), a 1200×630 image, summary_large_image. LinkedIn caches — re-scrape via the Post Inspector. (See the seo-kit / og-image skills.)

🔴 SPA routes 404 on refresh / direct link (e.g. /projects/foo)

Cause: no SPA fallback — the host looks for a real file at that path. Fix: rewrite all non-asset, non-API paths to /index.html. Vercel:

{ "rewrites": [{ "source": "/((?!api/).*)", "destination": "/index.html" }] }

(Static assets are served by the filesystem first; the (?!api/) keeps serverless functions working.)

🔴 Stray horizontal scrollbar / layout drifts below the fold

  • overflow-y: auto silently promotes the other axis to auto too → add overflow-x: hidden.
  • A fixed full-height shell should be h-screen + overflow-hidden, not min-h-screen

(which can grow past the viewport and leave gaps).

General checklist

  1. Does it build locally? npm run build && npm start.
  2. Right host for the architecture? (persistent server → Node host; static+functions → serverless)
  3. Env vars set in the host, and redeployed after?
  4. Functions: self-contained, wrapped in try/catch, bind $PORT (servers)?
  5. SPA fallback + absolute OG URLs configured?

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.