infra-platform-netlify
Netlify Platform Patterns
Quick Guide: Netlify deploys sites from Git with automatic builds, CDN distribution, and serverless compute. Use
netlify.tomlfor all configuration (redirects, headers, build settings, function schedules, plugins). Serverless functions live innetlify/functions/and use the standard(req: Request, context: Context) => Responsesignature. Edge functions run on Deno at the network edge for geo-personalization and request transformation. UseNetlify.env.get()for environment variables in functions — neverprocess.env. Use Netlify Blobs for key-value storage accessible from functions and edge functions.
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use Netlify.env.get() to access environment variables in functions — NOT process.env which is unavailable in the modern functions runtime)
(You MUST use the .mts file extension for serverless functions to get ES module support — .ts defaults to CommonJS unless "type": "module" is in package.json)
(You MUST use context.waitUntil() for post-response background work — work not passed to waitUntil may be cancelled when the response is sent)
(You MUST keep redirects and headers in netlify.toml — they are global and NOT scoped to deploy contexts)