neon-functions
Has your agent create serverless functions that connect to the database. It's useful for tasks that need to run continuously.
What it does
Neon Functions lets you create and run code (called 'functions') that runs close to your database. They are good for tasks that need to stay active longer than usual and need to access data quickly.
When to use it
- ✓When you need code that 'listens' for a longer time, like a chat.
- ✓To create connections that send real-time updates to the user.
- ✓When your code needs to access the database many times and quickly.
Example of what to ask your AI
“How do I create a function that responds to web requests and stays connected to my database?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You write your code in Node.js and use Neon's tools to deploy it. Neon handles running it close to your data and gives you an address to access it over the internet.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill neon-functionsOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/neon-functions/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Neon Functions
This is a preview feature and only available in us-east-2. Neon Functions are long-running Node.js HTTP handlers deployed onto a Neon branch. Each function gets a public HTTPS URL, runs in the same region as your database, and — if the branch has Postgres — gets DATABASE_URL injected automatically. You deploy and manage them through the same Neon CLI, neon.ts, and API you already use.
Use this skill to help the user define, run locally, deploy, and manage functions next to their database. Deliver a deployed function with its invocation URL, a working local neon dev loop, or a precise answer from the official Neon docs.
When to Use
Reach for Neon Functions when the workload is a request/response handler that benefits from staying alive and staying close to the data:
- Long-running request/response flows that outlast lambda-style limits. Agents that make several LLM calls and tool invocations per request, or image/video generation, routinely blow past the ~10–60s execution caps and short streaming windows of traditional serverless functions. Neon Functions are long-running: the handler just needs to start responding within 15 minutes, and an open stream stays alive as long as bytes keep flowing. That's enough headroom for real agent workloads.
- Stateful streaming without bolting on Redis. Because a function stays alive across a request, it can host an SSE endpoint or a WebSocket server and hold the connection open in-process — no external state store (Redis, etc.) needed just to keep a stream coherent. Module-scope state (a
pgpool, an in-memory counter) persists across requests on the same isolate. - Compute that must sit next to Postgres. The function runs in the same region as the branch's database, so there are no cross-region round trips on every query.
DATABASE_URLis injected for you. - A backend that branches with your data. Each branch runs its own version of the function at its own URL, against its own isolated database (and storage, and gateway) state. Preview deployments, CI, and dev environments each get a self-contained backend — deploying to a child never affects the parent.
- Webhooks, bots, and post-response work. Webhook handlers that fan out into multiple DB writes, Discord/WebSocket bots, and fire-and-forget follow-ups via
waitUntil(analytics, audit logs) all fit.
If the workload is a pure static site, a cron/background job that needs its own lifecycle and cancellation, or something that must run outside us-east-2 today, this isn't the right tool yet (see Timeouts and Availability below).
What It Does
- Long-running & serverless — Built for WebSocket servers (see WebSocket servers), SSE endpoints (see Server-sent events (SSE)), long agent HTTP streams, and APIs. Still scales to zero when idle.
- Web-standard handler — A function is any default export with a
fetch(request)method returning aResponse(Workers/WinterTC-compatible). A Hono app exports exactly that shape, soexport default appjust works. Runs on Node.js 24, so all Node APIs are available. - Close to your database — Runs in the branch's region;
DATABASE_URLinjected automatically when the branch has Postgres. - Branchable — Each branch runs its own function version at its own URL against its own isolated state.
- Same CLI/API — Deploy and manage via
neon,neon.ts, or the Neon API.
Architecture: where Functions fit
Neon (Functions included) is backend primitives, not full-stack app hosting. Host your app on Vercel (or Netlify, or another frontend/app host); Functions are the long-running, stateful slice of your backend that lives next to your data. They compose with that platform in two ways:
- Add a Function to a full-stack app. Your Next.js / TanStack Start app on Vercel (or Netlify) owns UI, auth (e.g. Neon Auth), and talks directly to Neon Postgres and Object Storage. When one workload outgrows the host's short serverless limits — a WebSocket or SSE server, or a long-running agent that would time out — move just that piece onto a Neon Function. (See Functions as an agent backend for the client-direct pattern.)
…
FAQ
What are 'functions' in this context?
They are small programs you create to perform specific tasks. Think of them as helpers that run whenever you need them.
Why is 'close to the database' important?
This makes data access much faster, as it doesn't need to 'travel' far to fetch or store information.
Can I use this for any type of code?
It's ideal for code that needs to stay active for longer periods (like chats or data streams) and benefits from quick database access. It's not recommended for very short tasks or scheduled jobs (like an alarm).
Details
Original description by the author
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your data.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3668
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
api-connector-builder
Has your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
affaan-m/ECC
api-design
Helps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
affaan-m/ECC
backend-patterns
Helps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.
affaan-m/ECC