netlify-deployment
Deploy sites, configure serverless and edge functions, and verify builds on Netlify. Use when the user mentions: 'deploy preview', 'configure netlify.toml', or 'debug a failed deploy'. Trigger terms: build error, Netlify Functions, deploy logs, deploy preview
Works with
---
name: netlify-deployment
description: Deploy sites, configure serverless and edge functions, and verify builds on Netlify. Use when the user mentions: 'deploy preview', 'configure netlify.toml', or 'debug a failed deploy'. Trigger terms: build error, Netlify Functions, deploy logs, deploy preview
license: MIT
---
# Netlify Deployment
Project deployment architecture, env vars, and key files: [deployment-config.md](../../.opencastle/stack/deployment-config.md). Docs: https://docs.netlify.com
`main` → production (auto). `feature/*`, `fix/*` → deploy preview at a unique URL (auto).
## Hard limits
- Serverless functions (`netlify/functions/`): default timeout **10s**, extendable to **26s** on Pro. Anything longer must be a background function — up to **15 min**.
- Edge functions (`netlify/edge-functions/`) run on **Deno, not Node** — no Node built-ins, no npm-only packages. Use for personalization, A/B tests, geo-routing (`context.geo`).
- Functions use web-standard `Request`/`Response`. TypeScript works with no build step.
## Gotchas
- Exporting `config = { path: '/geo' }` from a function *replaces* the default `/.netlify/functions/<name>` route. Without it, the default path is the only one that works.
- Cron is a function-level `config: Config = { schedule: "0 0 * * *" }` — the schedule is **UTC**, and the request body carries `next_run`.
- Env vars are scoped and do not cascade: **Production** (`main` deploys), **Deploy previews** (all PR/branch builds), **Branch deploy** (one named branch), **Local** (`netlify dev`). A var set only on Production is undefined in previews.
- Most build failures are `NODE_VERSION` (set it under `[build.environment]` in `netlify.toml`), a stale lockfile, or a `publish` dir that does not match the actual build output.
## Commands
```bash
netlify build --debug # reproduce the CI build locally, verbose — do this before pushing
netlify env:list # confirm vars exist in the scope you expect
netlify status # linked site + deploy state
```
Post-deploy, verify each critical route returns 200:
```bash
curl -fsS -o /dev/null -w '%{http_code}' https://<DEPLOY_URL>/
```
Any non-200 → read the deploy log in the Netlify UI, fix, redeploy.More Debugging skills
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
explore-code
lllllllama/rigorpilot-skills
Rigor Improve implementation leaf skill for auditable candidate implementation in deep learning research repositories. Use when the researcher explicitly authorizes exploratory work on an isolated branch or worktree to transplant modules, adapt a backbone, add LoRA or adapter layers, replace a head, or stitch together meaningful low-risk migration ideas with rollback-aware records in `explore_outputs/`. Do not use for end-to-end exploration orchestration on top of `current_research`, trusted baseline reproduction, conservative debugging, environment setup, verified contribution claims, or default repository analysis.
safe-debug
lllllllama/rigorpilot-skills
Rigor Debug / Rigor Audit skill for deep learning research work. Use when the user pastes a traceback, terminal error, CUDA OOM, checkpoint load failure, shape mismatch, NaN loss symptom, or training failure and wants conservative diagnosis before any patching, with debug fixes clearly separated from research contributions. Do not use for broad refactoring, speculative adaptation, automatic exploratory patching, or general repository familiarization.

