本文へスキップ
Skillpedia
APIとサーバー(バックエンド)33k · #8781

neon-postgres

できること

このスキルにより、AIはアプリでサーバーレスのPostgresデータベースであるNeonを使うためのパターンを使えます。PrismaやDrizzleをNeonにつなぎ、接続プーリングを扱う開発者向けです。

使う場面

  • ✓PrismaまたはDrizzleのアプリをNeonのデータベースに接続するとき。
  • ✓サーバーレスのNeonアプリに接続プーリングが必要なとき。
  • ✓開発やテストのために、データベースのブランチを使いたいとき。

スキルのリンク

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/neon-postgres/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/neon-postgres/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のNeonデータベースでPrismaを設定してください。アプリにはプーリングされた接続を、マイグレーションには直接の接続を使ってください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは2つの接続文字列を設定します。アプリケーション用のプーリングされたものと、マイグレーション用の直接のものです。また、単発のクエリにはHTTP、トランザクションにはWebSocketなど、適切なNeonのドライバーを選びます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Neon Postgres

Patterns

Prisma with Neon Connection

Configure Prisma for Neon with connection pooling.

Use two connection strings:

  • DATABASE_URL: Pooled connection for Prisma Client
  • DIRECT_URL: Direct connection for Prisma Migrate

The pooled connection uses PgBouncer for up to 10K connections. Direct connection required for migrations (DDL operations).

Drizzle with Neon Serverless Driver

Use Drizzle ORM with Neon's serverless HTTP driver for edge/serverless environments.

Two driver options:

  • neon-http: Single queries over HTTP (fastest for one-off queries)
  • neon-serverless: WebSocket for transactions and sessions

Connection Pooling with PgBouncer

Neon provides built-in connection pooling via PgBouncer.

Key limits:

  • Up to 10,000 concurrent connections to pooler
  • Connections still consume underlying Postgres connections
  • 7 connections reserved for Neon superuser

Use pooled endpoint for application, direct for migrations.

⚠️ Sharp Edges

Issue Severity Solution
Issue high See docs
Issue high See docs
Issue high See docs
Issue medium See docs
Issue medium See docs
Issue low See docs
Issue medium See docs
Issue high See docs
よくある質問

接続文字列が2つあるのはなぜですか?

プーリングされた接続はアプリ用で、直接の接続はマイグレーションの操作に必要だからです。

どのドライバーがトランザクションを扱いますか?

このスキルによると、トランザクションとセッションにはWebSocketのサーバーレスドライバーを使います。

プーラーは何件の接続を扱えますか?

このスキルは、プーラーが最大10,000の同時接続に対応すると説明しています。

詳細

作者による元の説明

Expert patterns for Neon serverless Postgres, branching, connection pooling, and Prisma/Drizzle integration Use when: neon database, serverless postgres, database branching, neon postgres, postgres serverless.

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8781
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル