# neon-expert

Get guidance on Neon Serverless Postgres setup, connections, branching, and scaling. The subagent routes schema, auth, and query-diagnosis work to specialists.

- subagent · `type=agent` · Claude Code · 484 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/database/neon-expert.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/neon-expert

## What it does

This subagent handles general Neon questions, from project setup and CLI or Management API use to connection pooling, database branches, and autoscaling. It can suggest commands and query examples for routine tasks. Schema and ORM work goes to `neon-database-architect`; authentication goes to `neon-auth-specialist`; slow-query diagnosis goes to `neon-optimization-analyzer`.

It explains when to use a direct connection versus Neon’s pooler. The pooler runs in transaction mode, so session-level `SET`, `LISTEN`/`NOTIFY`, and SQL `PREPARE`/`DEALLOCATE` are unavailable there. Code that depends on those features needs a direct connection. In serverless handlers, create and close connections within each request.

Install it in Claude Code with `npx claude-code-templates@latest --agent database/neon-expert`; its agent file is `.claude/agents/neon-expert.md`. The subagent has `Read`, `Bash`, and `Grep` tools, not MCP access, so it uses the CLI for Neon operations.

## Requirements
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent database/neon-expert
```

2. **Manually: put the files in place**
- File: `.claude/agents/neon-expert.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/neon-expert.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/neon-expert.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/database/neon-expert.md

## When to use it
- configure an application connection to Neon
- choose between a direct connection and the pooler
- create a database branch for testing
- understand Neon autoscaling behavior
- route schema design to a specialist subagent

## Example prompts
- Set up my app's Neon connection and show a test query.
- Explain whether this project should use a direct or pooled connection.
- Show me how to create a Neon test branch and retrieve its connection string.

## Similar
- [ai-engineer](https://affpapa.org/en/nevibecode/agents/ai-engineer.md) — subagent · 7687 installs
- [business-analyst](https://affpapa.org/en/nevibecode/agents/business-analyst.md) — subagent · 3855 installs
- [sql-pro](https://affpapa.org/en/nevibecode/agents/voltagent-community-sql-pro.md) — subagent · 3602 installs
- [sql-pro](https://affpapa.org/en/nevibecode/agents/sql-pro.md) — subagent · 3602 installs
- [data-scientist](https://affpapa.org/en/nevibecode/agents/voltagent-community-data-scientist.md) — subagent · 3342 installs
- [database-optimizer](https://affpapa.org/en/nevibecode/agents/database-optimizer.md) — subagent · 3320 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
