> Full Neon documentation index: https://neon.com/docs/llms.txt

# Get Better Code from Your AI Coding Agent with the Neon Skill

How the Neon skill helps AI coding agents write higher-quality Postgres code by encoding Neon best practices directly into your project

[Watch on YouTube](https://youtube.com/watch?v=NN251KTjAo8)

If you're using an AI coding agent to build an app with Neon, the **Neon skill** is one of the most impactful things you can add to your project. It encodes Neon's best practices directly into your repository so your agent produces higher-quality Neon code from the very first prompt.

### What is the Neon skill?

A "skill" (sometimes called a rules file or agent context) is a Markdown document that lives in your project and gives your AI coding agent domain-specific knowledge about Neon. When your agent reads the Neon skill, it understands how to use Neon correctly without you having to explain the nuances in every prompt.

The Neon skill distills Neon's most important best practices into a concise, structured format. It covers:

- **Neon connection methods and drivers** — which driver to use depending on your deployment target
- **Neon branching workflows** — how to use Neon branches for preview environments, testing, and migrations
- **Neon schema and migration patterns** — conventions that work well with Neon's architecture
- **Neon environment variable setup** — the correct way to wire up your Neon connection string

Without the Neon skill, your agent relies entirely on its training data, which may be months or years out of date. With the Neon skill, it has current, authoritative guidance from Neon.

### How do I install the Neon skill?

There are three ways to add the Neon skill to your project, depending on which tool you use.

**skills.sh (any agent or editor)**

[skills.sh](https://skills.sh) is a registry of agent skills for popular tools and platforms, including the Neon skill.

1. Go to [skills.sh](https://skills.sh) and search for **neon**.
2. Select the **neon-postgres** skill.
3. Copy the install command and run it in your project's terminal.
4. Follow the prompts to complete Neon skill setup.

**Cursor plugin**

If you're using [Cursor](https://cursor.com), you can install the Neon plugin directly from the chat window:

1. Open Cursor's chat panel.
2. Type `neon` in the chat input.
3. Click the **Add neon plugin** button that appears.

This installs both the Neon skill **and** the [Neon MCP server](https://neon.com/docs/ai/neon-mcp-server), which gives your agent the ability to interact with your Neon account directly — creating Neon branches, running queries, managing Neon projects — all from the chat.

**Claude Code plugin**

If you're using [Claude Code](https://claude.ai/code), search for **Neon** in the Claude plugin marketplace and install the Neon plugin from there.

### Does the Neon skill actually change the code my agent writes?

Yes — concretely. Here's a real example using a Next.js app with Neon and Drizzle.

Suppose you prompt your agent:

> This is a Next.js app that I'll be hosting on Vercel. Please set up Neon with Drizzle.

**Without the Neon skill**, the agent produces:

```typescript
import { neon } from '@neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-http';

const sql = neon(process.env.DATABASE_URL!);
export const db = drizzle(sql);
```

This uses the [Neon serverless driver](https://neon.com/docs/serverless/serverless-driver), which connects to Neon over HTTP. It will run without errors — but it's no longer the most performant option for Vercel deployments.

**With the Neon skill**, the agent produces:

```typescript
import { Pool } from 'pg';
import { drizzle } from 'drizzle-orm/node-postgres';
import { attachDatabase } from '@vercel/postgres-pool';

const pool = attachDatabase(new Pool({ connectionString: process.env.DATABASE_URL }));
export const db = drizzle(pool);
```

This uses the standard **Node Postgres driver** with a connection pool and Vercel's `attachDatabase` function, which lets Vercel manage the Neon connection pool correctly in its serverless runtime.

### Why does my agent write suboptimal Neon code without the Neon skill?

As of 2026, Vercel supports **connection pooling with Fluid Compute**, which makes a standard `pg` pool with `attachDatabase` the most performant way to connect to Neon from a Next.js app on Vercel — not the HTTP-based Neon serverless driver.

The problem is that most AI models have training data that predates this change. They've seen thousands of examples of the Neon serverless driver being used for Vercel deployments, so that's what they reach for by default.

The Neon skill's **Connection Methods and Drivers** section explains this exact dynamic and tells the agent which Neon connection method to use based on deployment target. Because the agent reads the Neon skill before writing any code, it makes the right choice automatically.

### Does the Neon skill only help with one edge case?

No — the Neon connection method example is just one of many. Throughout the lifecycle of a full application — Neon connection handling, Neon migrations, Neon branch-per-PR workflows, Neon read replica routing — there are dozens of similar nuances where agent training data lags behind Neon's current best practices.

An agent working without the Neon skill can introduce a subtle pattern of suboptimal choices: code that runs, but misses performance, reliability, or workflow improvements that Neon offers.

### How much does the Neon skill affect my final codebase?

A single wrong Neon connection method is easy to spot and fix. But AI agents make many small decisions across an entire codebase, and not all of them are as visible as a wrong import. Over time this becomes a "death by a thousand cuts" situation — individually minor choices that collectively degrade the quality of your Neon integration.

The Neon skill is a one-minute setup that pays off across the full lifetime of your project.

### Where can I find the Neon skill?

The Neon skill is available on [skills.sh](https://skills.sh) (search for **neon-postgres**) and in the plugin marketplace for Cursor and Claude Code.

## Quick reference

|                                   | Without Neon skill                 | With Neon skill                  |
| --------------------------------- | ---------------------------------- | -------------------------------- |
| Neon connection method for Vercel | Neon serverless driver (HTTP)      | Node Postgres + `attachDatabase` |
| Neon branching workflow           | Generic git branching              | Neon branch-per-PR patterns      |
| Agent knowledge of Neon           | Model training data (may be stale) | Current Neon best practices      |
| Setup time                        | —                                  | \~1 minute                       |

> **Try it on Neon!**
>
> Neon is Serverless Postgres built for the cloud. Add the Neon skill to your project and start building with your AI coding agent today.
>
> [Sign Up](https://console.neon.tech/signup)
