netlify-functions

Build Netlify serverless APIs and background tasks with TypeScript.

32|7|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/netlify/context-and-tools --skill netlify-functions-netlify
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: netlify-functions
Source: https://github.com/netlify/context-and-tools/tree/main/codex/skills/netlify-functions
Command: npx skills add https://github.com/netlify/context-and-tools --skill netlify-functions-netlify

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Netlify Functions let you run server-side logic, API endpoints, background tasks, and scheduled jobs without managing servers, simplifying back-end needs in static sites.

Core Features & Use Cases

  • Modern syntax: default export with a Config object to define routes and behavior.
  • Path routing, background/scheduled tasks, streaming responses, and type-safe development with TypeScript.
  • Use Case: build a lightweight API at /api/hello that responds with JSON.

Quick Start

Create a simple Hello API with a default export and a config, then deploy to Netlify.

Frequently Asked Questions about netlify-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a serverless API endpoint with TypeScript on Netlify?

To create a serverless API endpoint with TypeScript on Netlify, use a default export alongside a Config object to define routes and behavior, then deploy the function to execute server-side logic without managing servers.

Can I run scheduled background tasks using Netlify Functions?

Yes, you can run scheduled background tasks using Netlify Functions by defining the necessary execution patterns within the Config object to implement serverless jobs for static sites without managing backend infrastructure.

What is the modern syntax for defining routing in Netlify Functions?

The modern syntax for defining routing in Netlify Functions involves using a default export paired with a Config object, which allows you to specify path routing and behavior for scalable serverless APIs.

Do I need a server to handle streaming responses with Netlify Functions?

No, you do not need a server to handle streaming responses with Netlify Functions. The platform supports streaming responses directly through configured serverless functions using TypeScript.

What is the best way to structure scalable serverless APIs on Netlify?

The best way to structure scalable serverless APIs on Netlify is by using the default export and Config pattern to define path routing and type-safe development for endpoints and background tasks.

Why use TypeScript for building serverless APIs on Netlify?

Using TypeScript for building serverless APIs on Netlify enables type-safe development, ensuring robust serverless logic, structured routing, and reliable configuration for endpoints and scheduled jobs.