netlify-serverless
Use when choosing and operating Netlify's serverless execution primitives.
Skill by prachwal-archive
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/prachwal-archive-netlify-serverless
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/netlify-serverless
What's inside
- Skill name
netlify-serverless- Description
- Use when choosing and operating Netlify's serverless execution primitives. Covers Functions, Edge Functions, Background and Scheduled Functions, runtime capabilities, routing primitives, and deployment-time constraints.
- License
- MIT
- Instructions
- 194 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (4)
- SKILL.md
- functions.md · references/
- patterns.md · references/
- security.md · references/
SKILL.md (first lines)
# Netlify Serverless Skill
Use this skill when deciding how backend logic should run on Netlify's serverless infrastructure: Functions, Edge Functions, Background Functions, and Scheduled Functions.
## Core principles
1. Prefer the current web-standard `Request`/`Response` API over the older Lambda compatibility shape.
2. Pick the execution primitive for the workload instead of forcing everything into synchronous Functions.
3. Keep each function or job narrowly scoped, with one route or task per file.
4. Use runtime-scoped environment variables for secrets. Do not treat `netlify.toml` as a secret store for functions.
5. Design for cold starts and regional execution: minimize module-scope work and keep shared state safe to reuse.
6. Keep API contract design and database rules in the companion skills.
## Choose the right primitive
- Use a synchronous Function for normal API requests that must answer immediately.
- Use `context.waitUntil()` for post-response work that should not block the client, such as telemetry, async audit logging, or fire-and-forget webhooks.
- Use a Background Function for jobs that can run asynchronously for up to 15 minutes. Netlify returns `202` immediately and retries on failure.
- Use a Scheduled Function for cron-style jobs that only run on published deploys and have a 30 second execution limit.
- Use an Edge Function for request rewriting, auth gates, personalization, geo logic, or low-latency work near the user. Keep CPU work extremely small because Edge Functions have a 50 ms CPU limit.
## Workflow
1. Identify whether the endpoint is synchronous, post-response, scheduled, or long-running.
2. Choose the primitive: synchronous Function, Edge Function, Background Function, or Scheduled Function.
3. Decide whether the route should use `config.path` or the default `/.netlify/functions/<name>` path.
4. Add only the platform-specific behavior needed for that primitive: path config, `waitUntil`, schedule, or edge context.
5. Keep request contracts and database rules in the dedicated companion skills.
6. Test locally with `netlify dev` and verify production-only behavior such as env vars, rate limiting, and scheduled jobs separately.
## Directory layout
```
netlify/
functions/
api-products.ts ← GET/POST /api/products
api-products-[id].ts ← GET/PUT/DELETE /api/products/:id
auth-callback.ts ← OAuth callback handler
webhook-stripe.ts ← Stripe webhook handler
sync-catalog-background.ts ← long-running async job
daily-summary.ts ← scheduled job via `config.schedule`
edge-functions/
geo-redirect.ts ← edge-level redirect by country
netlify.toml ← redirects, function config, env
```
## Function anatomy (TypeScript)
```ts
// netlify/functions/api-products.ts
import type { Config, Context } from "@netlify/functions";
type ProductBody = { name: string; price: number };
export default async (req: Request, context: Context) => {
if (req.method !== "POST") {
return Response.json({ error: "Method Not Allowed" }, { status: 405 });
}
let body: ProductBody;
try {
body = await req.json();
} catch {
return Response.json({ error: "Invalid JSON" }, { status: 400 });
}
// Validation, auth, and service-layer rules belong in companion API skills.
context.waitUntil(logAudit(context.requestId, body.name));
return Response.json({ id: crypto.randomUUID(), ...body }, { status: 201 });
};
export const config: Config = {
path: "/api/products",
};
async function logAudit(requestId: string, productName: string) {
console.log("audit", { requestId, productName });
}
```
## Request context
- Log `context.requestId` on every failure path so downstream logs can be correlated.
- Use `context.params`, `context.ip`, `context.geo`, and `context.site` where they materially affect behavior. Do not parse these values from raw headers when Netlify already provides them.
- In Edge Functions, use the edge `Context` object for site, server region, params, and `waitUntil`.
- Keep auth, CORS, and response-shape policy in the companion API or security skills.
## Environment variables
```toml
# netlify.toml
[build.environment]
NODE_VERSION = "20"
# Runtime secrets for Functions are not read from netlify.toml.
# Set them in the Netlify UI, CLI, or API with Functions scope.
```
```ts
const secret = Netlify.env.get("JWT_SECRET");
if (!secret) throw new Error("JWT_SECRET is not set");
```
- For serverless Functions, read runtime env via `Netlify.env.get("KEY")`.
- For Edge Functions, use `Netlify.env.get("KEY")` for env access.
- Changes to function runtime env vars require a new build and deploy to take effect.
- Only a subset of Netlify read-only variables is available at runtime. If code depends on repo, branch, or deploy metadata, verify it is exposed in the current runtime first.
- Keep secrets and least-privilege policy in the companion security skills.
## Routing
- Prefer `export const config = { path: "/api/products/:id" }` for API routes instead of older redirect-based function routing.
- Use redirect rules only when you need URL rewriting behavior outside the function itself.
- Use named params from `context.params` and the standard `URL` API for query string parsing.
## Edge Functions
Use Edge Functions for request shaping, auth gates, geo personalization, and low-latency rewrites, not for heavy compute or relational query orchestration.From prachwal-archive/web-ui-skills, MIT.
More from prachwal-archive/web-ui-skills
- 0.502score
a11y-review
prachwal-archive
Use when reviewing web interfaces for accessibility, including WCAG 2.2 mapping, ARIA misuse, keyboard access, focus management, responsive/mobile behavior…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docs-instructions
prachwal-archive
Use when maintaining repository Markdown, Copilot instructions, Codex AGENTS.md, repo skills, prompts, or LLM evaluation tasks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
preact-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in Preact apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
react-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in React apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
react-ui
prachwal-archive
Guidance for building, redesigning, or reviewing React TSX pages/components, hooks, state management, styling, routing, accessibility, and Testing Library…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
project-tooling
prachwal-archive
Tooling guidance for Vite, Vitest, TypeScript, ESLint/Biome, package scripts, path aliases, and build/test tooling.
SkillCFreshness: C★ 1Claude Code +9 - 0.437score
netlify-typescript-api
prachwal-archive
Use when designing or implementing TypeScript backend APIs on Netlify, including handler structure, validation, typed contracts, error envelopes, and testable…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
preact-ui
prachwal-archive
Use when designing, refactoring, or reviewing Preact pages and components, including component structure, MVVM architecture, signals, hooks, forms, routing…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
typescript-fundamentals
prachwal-archive
Use when designing or reviewing TypeScript code structure, type safety, patterns, JSDoc, naming conventions, formatting, and module organization.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
eslint-config
prachwal-archive
Use when setting up, extending, or fixing ESLint configuration for TypeScript projects, including flat config, Preact/React, Node.js, Netlify Functions, and…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
mongodb-netlify
prachwal-archive
Use when building Netlify Functions or full-stack apps that use MongoDB Atlas or MongoDB-compatible deployments.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
neon-netlify
prachwal-archive
Use when building Netlify apps or APIs with Neon Postgres.
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 16, 2026 (6 months ago)
- Last release
- Apr 23, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from prachwal-archive
- 0.502score
a11y-review
prachwal-archive
Use when reviewing web interfaces for accessibility, including WCAG 2.2 mapping, ARIA misuse, keyboard access, focus management, responsive/mobile behavior…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
react-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in React apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docs-instructions
prachwal-archive
Use when maintaining repository Markdown, Copilot instructions, Codex AGENTS.md, repo skills, prompts, or LLM evaluation tasks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
preact-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in Preact apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
react-ui
prachwal-archive
Guidance for building, redesigning, or reviewing React TSX pages/components, hooks, state management, styling, routing, accessibility, and Testing Library…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
project-tooling
prachwal-archive
Tooling guidance for Vite, Vitest, TypeScript, ESLint/Biome, package scripts, path aliases, and build/test tooling.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
netlify-serverless skill. Agent Mart. https://agentmart.dev/skills/prachwal-archive-netlify-serverless (last updated 2026-10-24)