cwinvestments/memstack/netlify-deploy
Claude Code and agent skill by cwinvestments/memstack
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use this skill when the user says 'deploy to Netlify', 'Netlify setup', 'netlify-deploy', or needs to deploy a static site or serverless functions to Netlify with build configuration and custom domains. Do NOT use for Railway, Vercel, or VPS deployments.
Install
npx vskill@latest install cwinvestments/memstack/netlify-deploySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as cwinvestments/memstack/netlify-deploy.
π Netlify Deploy: Pre-flight check and deploy to Netlify...
Validates build config, redirects, environment variables, and deployment readiness for Netlify static/SPA hosting.
Activation
When this skill activates, output:
π Netlify Deploy: Running pre-flight checks...
Then execute the protocol below.
| Context | Status | |
|---|---|---|
| User says "deploy to netlify" or "netlify deploy" | ACTIVE | |
| User says "deploy frontend" or "deploy static site" | ACTIVE | |
| Preparing a React/Vue/Svelte/Next.js static export for hosting | ACTIVE | |
| Deploying a backend service or API server | DORMANT: use railway-deploy | |
| Discussing Netlify pricing or features generally | DORMANT |
Anti-patterns
| Trap | Reality Check | |
|---|---|---|
| "I'll configure it in the Netlify UI" | netlify.toml is version-controlled and portable. UI settings get lost across teams. | |
| "Redirects work fine without _redirects" | SPA routing breaks on refresh without /* /index.html 200. Every SPA needs this. | |
| "Environment vars are the same everywhere" | Build-time vars (baked into JS bundle) vs runtime vars (Netlify Functions) are different. NEXT_PUBLIC_ prefix exposes to client. | |
| "The API proxy just works" | /api/* redirects must point to your actual backend URL. Forgetting to update after backend redeploy breaks the frontend. | |
| "I'll check the deploy after pushing" | netlify deploy --build locally catches build failures before they hit production. Always build locally first. |
Protocol
Step 1: Check Build Configuration
Look for Netlify config and verify build settings:
If netlify.toml exists, verify it:
| Framework | Build Command | Publish Directory | |
|---|---|---|---|
| React (CRA) | npm run build | build | |
| React (Vite) | npm run build | dist | |
| Next.js (static) | next build && next export | out | |
| Vue | npm run build | dist | |
| Svelte/SvelteKit | npm run build | build | |
| Astro | npm run build | dist | |
| Plain HTML | none | . or public |
Flag if: netlify.toml missing or publish directory doesn't match framework default.
Step 2: Verify Redirects and API Proxy
Check for the API proxy pattern (frontend β backend):
Or in _redirects:
Verify:
- β Backend URL is the production URL (not localhost)
- β
status = 200(proxy, not redirect, preserves the URL for the client) - β
force = trueif the proxy should override static files at the same path - β Backend URL still points to
localhost:3000: update to production
Flag if: Code references /api/ paths but no proxy redirect is configured.
Step 3: Verify SPA Routing
Single-page apps need a catch-all redirect so deep links and page refreshes work:
Required for SPAs (React Router, Vue Router, etc.):
Or in netlify.toml:
Flag if: Project uses client-side routing but no catch-all redirect exists. Symptoms: pages work when navigated to via links, but return 404 on direct URL access or refresh.
Note: Next.js static export handles this differently. Each page is pre-rendered as its own HTML file. SPA redirect is NOT needed for static Next.js.
Step 4: Verify Environment Variables
Build-time vs runtime separation:
| Prefix | Framework | When Available | Exposed to Client? | |
|---|---|---|---|---|
REACT_APP_ | CRA | Build time | β οΈ YES: baked into JS bundle | |
NEXT_PUBLIC_ | Next.js | Build time | β οΈ YES: baked into JS bundle | |
VITE_ | Vite | Build time | β οΈ YES: baked into JS bundle | |
| No prefix | Any | Build time only | β No, server-side/build scripts only |
Critical security check:
Flag if: Any secret (API keys with write access, database URLs, auth secrets) uses a client-exposed prefix. These are baked into the JavaScript bundle and visible to anyone who opens DevTools.
Output: List each variable with where to set it:
- Netlify UI: Site Settings β Environment Variables (for secrets)
netlify.toml[build.environment](for non-sensitive build config likeNODE_VERSION)
Step 5: Check Custom Domain and SSL
Verify in Netlify dashboard:
- β Custom domain added (Domain Management β Add domain)
- β
DNS points to Netlify (CNAME to
*.netlify.appor A record to Netlify load balancer) - β SSL certificate provisioned (automatic via Let's Encrypt: check HTTPS section)
- β Force HTTPS enabled (redirects http β https)
- β www redirect configured (www β apex or apex β www: pick one, be consistent)
Flag if: Domain is added but DNS hasn't propagated or SSL shows "Waiting for DNS verification."
Step 6: Check for Netlify Functions
If functions exist, verify:
- Function directory is specified in
netlify.toml:[functions] directory = "netlify/functions" - Functions have correct export pattern:
export const handler = async (event, context) => { ... } - Environment variables needed by functions are set in Netlify dashboard (these are runtime, not build-time)
- Functions are not importing large dependencies that exceed Netlify's 50MB bundle limit
Step 7: Check Headers Configuration
Recommended security headers:
Step 8: Pre-Deploy Checklist
Build locally to catch errors before Netlify builds:
| Check | Command | Pass Criteria | |
|---|---|---|---|
| Build passes | npm run build | Exit code 0, no errors | |
| Output directory exists | ls dist/ | Has index.html and assets | |
| No localhost in build | grep dist/ for localhost | Zero matches | |
| _redirects in output | ls dist/_redirects | Exists if using _redirects approach | |
| Env vars documented | Check .env.example | All client vars listed | |
| No secrets in client code | grep for exposed secrets | Zero matches | |
| Git clean | git status | All changes committed |
Output pre-deploy summary:
Step 9: Post-Deploy Verification
After deployment completes:
- Preview deploy: Netlify generates a unique URL for every deploy: test there first
- Check build log: Netlify dashboard β Deploys β click deploy β Build Log
- Test SPA routing: Navigate directly to a deep route (e.g.,
/dashboard/settings): should load, not 404 - Test API proxy: Open DevTools Network tab, trigger an API call, verify it reaches backend
- Check SSL: Visit
https://[domain], padlock should appear, no mixed content warnings - Test redirects: Visit
http://[domain]: should redirect tohttps://
Rollback plan:
- Netlify keeps every deploy as an immutable snapshot
- Dashboard β Deploys β click any previous deploy β "Publish deploy"
- Instant rollback, no rebuild required
Level History
- Lv.1: Base: Build config validation, redirect/proxy verification, SPA routing, env var security audit, domain/SSL checks, Netlify Functions, security headers, pre/post-deploy checklists. Based on AdminStack marketing site, GreenAcres frontend, and other Netlify deployments. (Origin: MemStack Pro v3.2, Mar 2026)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/deployment/netlify-deploy/SKILL.md
Popularity
- Repository stars
- 433
- Repository forks
- 45
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cwinvestments/memstack/netlify-deploy)