memstack-deployment-netlify-deploy
Skill425 starsChanged 5 months agoMITView on GitHub
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.
- Reads credentials
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- vbrevik/claude_code_skillsedited, first seen Mar 14, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- vbrevik/claude_code_skills★ 056% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository87 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- memstack-automation-api-integrationSkill
- memstack-automation-content-pipelineSkill
- memstack-automation-cron-schedulerSkill
- memstack-automation-hosted-mcp-catalogSkill
- memstack-automation-n8n-workflow-builderSkill
- memstack-automation-webhook-designerSkill
- memstack-business-client-onboardingSkill
- memstack-business-contract-templateSkill
- memstack-business-financial-modelSkill
- memstack-business-freelancer-toolkitSkill
- memstack-business-gdprSkill
- memstack-business-invoice-generatorSkill
- memstack-business-licensingSkill
- memstack-business-proposal-writerSkill
- memstack-business-scope-of-workSkill
- memstack-business-sop-builderSkill
- compressSkill
- memstack-content-blog-postSkill
- memstack-content-email-sequenceSkill
- memstack-content-landing-page-copySkill
- memstack-content-newsletterSkill
- memstack-content-product-descriptionSkill
- memstack-content-tiktok-scriptSkill
- memstack-content-twitter-threadSkill
- memstack-content-youtube-scriptSkill
- memstack-deployment-ci-cd-pipelineSkill
- memstack-deployment-docker-setupSkill
- memstack-deployment-domain-sslSkill
- memstack-deployment-hetzner-setupSkill
- memstack-deployment-railway-deploySkill
- memstack-development-api-designerSkill
- memstack-development-changelog-generatorSkill
- memstack-development-code-reviewerSkill
- memstack-development-mentorSkill
- memstack-development-migration-plannerSkill
- memstack-development-performance-auditSkill
- memstack-development-refactor-plannerSkill
- memstack-development-test-writerSkill
- memstack-development-webapp-testingSkill
- diarySkill
- echoSkill
- familiarSkill
- forgeSkill
- goalSkill
- governorSkill
- grimoireSkill
- humanizeSkill
- memstack-marketing-competitor-analysisSkill
- memstack-marketing-facebook-adSkill
- memstack-marketing-google-adSkill
- memstack-marketing-launch-planSkill
- memstack-marketing-lead-magnetSkill
- memstack-marketing-marketplace-submitSkill
- memstack-marketing-pricing-strategySkill
- memstack-marketing-sales-funnelSkill
- memstack-marketing-webinar-scriptSkill
- memstack-product-feature-specSkill
- memstack-product-feedback-analyzerSkill
- memstack-product-mvp-scoperSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When this skill activates, output:
- Distinctive: line 41
Look for Netlify config and verify build settings:
- Very specific: line 51
If netlify.toml exists, verify it:
- Distinctive: line 83
Check for the API proxy pattern (frontend → backend):
- Distinctive: line 170
Verify in Netlify dashboard:
- Distinctive: line 187
If functions exist, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🌐 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:
# Check for Netlify configuration
ls netlify.toml _redirects _headers 2>/dev/null
# Check package.json for build script
cat package.json | grep -A2 '"scripts"' | grep '"build"'If netlify.toml exists, verify it:
# Expected structure
[build]
command = "npm run build" # or "yarn build", "pnpm build"
publish = "dist" # or "build", "out", ".next" (varies by framework)
[build.environment]
NODE_VERSION = "20" # Pin Node version for reproducible builds| 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 redirect files
cat netlify.toml 2>/dev/null | grep -A5 '\[\[redirects\]\]'
cat _redirects 2>/dev/nullCheck for the API proxy pattern (frontend → backend):
# netlify.toml, API proxy to Railway/external backend
[[redirects]]
from = "/api/*"
to = "https://your-backend.up.railway.app/api/:splat"
status = 200
force = trueOr in _redirects:
/api/* https://your-backend.up.railway.app/api/:splat 200Verify:
- ✅ 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:
# Check for SPA redirect
grep -r "\/\*.*\/index\.html\|\/\*.*200" netlify.toml _redirects 2>/dev/nullRequired for SPAs (React Router, Vue Router, etc.):
# In _redirects (must be LAST rule, order matters)
/* /index.html 200Or in netlify.toml:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200Flag 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
# Find env vars used in frontend code
grep -rn "process\.env\.\|import\.meta\.env\.\|VITE_\|NEXT_PUBLIC_\|REACT_APP_" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" . | grep -v node_modulesBuild-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:
# Search for secrets that might be exposed to client
grep -rn "NEXT_PUBLIC_.*SECRET\|NEXT_PUBLIC_.*KEY\|VITE_.*SECRET\|REACT_APP_.*SECRET" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.env*" . | grep -v node_modulesFlag 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
# Check for domain configuration
cat netlify.toml 2>/dev/null | grep -A5 '\[context\]'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
# Check for serverless functions
ls netlify/functions/ functions/ 2>/dev/null
cat netlify.toml 2>/dev/null | grep '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
# Check for security headers
cat netlify.toml 2>/dev/null | grep -A10 '\[\[headers\]\]'
cat _headers 2>/dev/nullRecommended security headers:
# netlify.toml
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "camera=(), microphone=(), geolocation=()"Step 8: Pre-Deploy Checklist
Build locally to catch errors before Netlify builds:
# Local build test
npm run build
# Check output directory exists and has content
ls -la dist/ # or build/, out/, etc.
# Check for common issues
grep -rn "http://localhost\|http://127\.0\.0\.1" dist/ 2>/dev/null| 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:
🌐 Netlify Deploy: Pre-flight Complete
Project: [name] ([framework])
Build: ✅ passes → [publish directory]
Redirects: ✅ SPA routing + API proxy configured
Env vars: ✅ 8 build-time vars, no secrets exposed
Domain: ✅ [domain] with SSL
Functions: ✅ 2 functions in netlify/functions/
Headers: ✅ security headers configured
Ready to deploy.
Preview: netlify deploy --build
Production: netlify deploy --build --prodStep 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)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

