Token导航 LogoToken导航

Agent Skill · 研究检索

neon-vercel-postgres(neon Vercel Postgres 搜索)

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

neon-vercel-postgres 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 26,586。

总安装 3,539周安装 152GitHub Stars 126下载 1,240核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:neon-vercel-postgres(neon Vercel Postgres 搜索)
来源仓库:https://github.com/secondsky/claude-skills
仓库路径:skills/neon-vercel-postgres
安装命令:
npx skills add https://github.com/secondsky/claude-skills --skill neon-vercel-postgres
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/secondsky/claude-skills --skill neon-vercel-postgres

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找和筛选相关信息。neon-vercel-postgres 属于研究检索类 Skill,可作为该场景下的辅助能力补充。适合根据关键词或任务场景快速定位候选结果。使用时需提供明确搜索目标以提高准确性。安装前应确认是否触发联网或文件读写操作。建议结合原始 README 核验功能边界和调用方式。

来源仓库内路径:skills/neon-vercel-postgres

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/secondsky/claude-skills --skill neon-vercel-po…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

neon-vercel-postgres 怎么安装?

在终端执行 npx skills add https://github.com/secondsky/claude-skills --skill neon-vercel-postgres。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

neon-vercel-postgres 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

neon-vercel-postgres 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

neon-vercel-postgres 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

neon-vercel-postgres 用的人多吗?

公开数据是累计安装 3,539 次,近一周安装 152 次,下载 1,240 次,GitHub 126 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

neon-vercel-postgres 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
neon-vercel-postgres

neon Vercel Postgres 搜索 · 本页

3,539126接触敏感数据MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Neon & Vercel Serverless Postgres

Status: Production Ready Last Updated: 2025-11-21 Dependencies: None Latest Versions: @neondatabase/serverless@1.0.2, @vercel/postgres@0.10.0, drizzle-orm@0.44.7, neonctl@2.16.1


Quick Start (5 Minutes)

1. Choose Your Platform

Option A: Neon Direct (multi-cloud, Cloudflare Workers, any serverless)

bun add @neondatabase/serverless

Option B: Vercel Postgres (Vercel-only, zero-config on Vercel)

bun add @vercel/postgres

Why this matters:

  • Neon direct gives you multi-cloud flexibility and access to branching API
  • Vercel Postgres gives you zero-config on Vercel with automatic environment variables
  • Both are HTTP-based (no TCP), perfect for serverless/edge environments

2. Get Your Connection String

For Neon Direct:

# Sign up at https://neon.tech
# Create a project → Get connection string
# Format: postgresql://user:password@ep-xyz-pooler.region.aws.neon.tech/dbname?sslmode=require

For Vercel Postgres:

# In your Vercel project
vercel postgres create
vercel env pull .env.local  # Automatically creates POSTGRES_URL and other vars

CRITICAL:

  • Use pooled connection string for serverless (ends with -pooler.region.aws.neon.tech)
  • Non-pooled connections will exhaust quickly in serverless environments
  • Always include ?sslmode=require parameter

3. Query Your Database

Neon Direct:

import { neon } from '@neondatabase/serverless';

const sql = neon(process.env.DATABASE_URL!);

// Simple query
const users = await sql`SELECT * FROM users WHERE id = ${userId}`;

// Transactions
const result = await sql.transaction([
  sql`INSERT INTO users (name) VALUES (${name})`,
  sql`SELECT * FROM users WHERE name = ${name}`
]);

Vercel Postgres:

import { sql } from '@vercel/postgres';

// Simple query
const { rows } = await sql`SELECT * FROM users WHERE id = ${userId}`;

// Transactions
const client = await sql.connect();
try {
  await client.sql`BEGIN`;
  await client.sql`INSERT INTO users (name) VALUES (${name})`;
  await client.sql`COMMIT`;
} finally {
  client.release();
}

CRITICAL:

  • Use template tag syntax (` sql... `) for automatic SQL injection protection
  • Never concatenate strings: sql('SELECT * FROM users WHERE id = ' + id) ❌

Critical Rules

Always Do

✅ Use pooled connection strings for serverless environments (-pooler. in hostname)

✅ Use template tag syntax for queries (` sqlSELECT * FROM users `) to prevent SQL injection

✅ Include sslmode=require in connection strings

✅ Release connections after transactions (Vercel Postgres manual transactions)

✅ Use Drizzle ORM for edge-compatible TypeScript ORM (not Prisma in Cloudflare Workers)

✅ Set connection string as environment variable (never hardcode)

✅ Use Neon branching for preview environments and testing

✅ Monitor connection pool usage in Neon dashboard

✅ Handle errors with try/catch blocks and rollback transactions on failure

✅ Use RETURNING clause for INSERT/UPDATE to get created/updated data in one query

Never Do

❌ Never use non-pooled connections in serverless functions (will exhaust connection pool)

❌ Never concatenate SQL strings ('SELECT * FROM users WHERE id = ' + id) - SQL injection risk

❌ Never omit sslmode=require - connections will fail or be insecure

❌ Never forget to client.release() in manual Vercel Postgres transactions - connection leak

❌ Never use Prisma in Cloudflare Workers - requires Node.js runtime (use Drizzle instead)

❌ Never hardcode connection strings - use environment variables

❌ Never run migrations from edge functions - use Node.js environment or Neon console

❌ Never commit .env files - add to .gitignore

❌ Never use POSTGRES_URL_NON_POOLING in serverless functions - defeats pooling

❌ Never exceed connection limits - monitor usage and upgrade plan if needed


Top 5 Errors (See references/error-catalog.md for all 15)

Error #1: Connection Pool Exhausted

Error: Error: connection pool exhausted or too many connections for role Solution: Use pooled connection string (ends with -pooler.region.aws.neon.tech), not non-pooled

Error #2: TCP Connections Not Supported

Error: Error: TCP connections are not supported in this environment Solution: Use @neondatabase/serverless (HTTP-based), not pg or postgres.js (TCP-based)

Error #3: SQL Injection from String Concatenation

Error: Successful SQL injection attack Solution: Always use template tags (` sqlSELECT * FROM users WHERE id = ${id} `), never concatenate strings

Error #4: Missing SSL Mode

Error: Error: connection requires SSL Solution: Always append ?sslmode=require to connection string

Error #5: Connection Leak (Vercel Postgres)

Error: Gradually increasing memory usage Solution: Always call client.release() in finally block after manual transactions

Load references/error-catalog.md for all 15 errors with detailed solutions and troubleshooting guide.


Common Use Cases

Use Case 1: Cloudflare Worker with Neon

When: Deploying serverless API with Postgres on Cloudflare Workers Quick Pattern:

import { neon } from '@neondatabase/serverless';

export default {
  async fetch(request: Request, env: Env) {
    const sql = neon(env.DATABASE_URL);
    const users = await sql`SELECT * FROM users`;
    return Response.json(users);
  }
};

Load: references/common-patterns.md → Pattern 1

Use Case 2: Next.js Server Actions

When: Building Next.js app with Vercel Postgres Quick Pattern:

'use server';
import { sql } from '@vercel/postgres';

export async function getUsers() {
  const { rows } = await sql`SELECT * FROM users`;
  return rows;
}

Load: references/common-patterns.md → Pattern 2

Use Case 3: Type-Safe Queries with Drizzle

When: Need full TypeScript type safety and edge compatibility Load: references/common-patterns.md → Pattern 3

Use Case 4: Database Transactions

When: Multiple operations must all succeed or all fail (e.g., money transfers) Load: references/common-patterns.md → Pattern 4

Use Case 5: Preview Environments with Branching

When: Need isolated database for each pull request/preview deployment Load: references/common-patterns.md → Pattern 5


When to Load References

Load references/setup-guide.md when:

  • User needs complete 7-step setup process
  • User asks about Drizzle ORM or Prisma integration
  • User needs help with environment variables or connection strings
  • User asks about deployment to Cloudflare Workers or Vercel

Load references/error-catalog.md when:

  • Encountering any connection, query, or deployment errors
  • User reports "connection pool exhausted" or timeout errors
  • User asks about SQL injection prevention
  • User needs troubleshooting for Prisma or Drizzle issues

Load references/common-patterns.md when:

  • User asks for code examples or templates
  • User needs to implement transactions, pagination, or search
  • User asks about Server Actions, Cloudflare Workers, or Drizzle patterns
  • User wants to see production-tested patterns

Load references/advanced-topics.md when:

  • User asks about Neon branching or database workflows
  • User needs connection pooling deep dive
  • User asks about performance optimization or query tuning
  • User needs security best practices (RLS, encryption, audit logging)
  • User asks about backups or disaster recovery

Configuration Files Reference

package.json (Neon Direct)

{
  "dependencies": {
    "@neondatabase/serverless": "^1.0.2"
  }
}

package.json (Vercel Postgres)

{
  "dependencies": {
    "@vercel/postgres": "^0.10.0"
  }
}

package.json (With Drizzle ORM)

{
  "dependencies": {
    "@neondatabase/serverless": "^1.0.2",
    "drizzle-orm": "^0.44.7"
  },
  "devDependencies": {
    "drizzle-kit": "^0.31.0"
  },
  "scripts": {
    "db:generate": "drizzle-kit generate",
    "db:migrate": "drizzle-kit migrate",
    "db:studio": "drizzle-kit studio"
  }
}

drizzle.config.ts

import { defineConfig } from 'drizzle-kit';

export default defineConfig({
  schema: './db/schema.ts',
  out: './db/migrations',
  dialect: 'postgresql',
  dbCredentials: {
    url: process.env.DATABASE_URL!
  }
});

Why these settings:

  • @neondatabase/serverless is edge-compatible (HTTP/WebSocket-based)
  • @vercel/postgres provides zero-config on Vercel
  • drizzle-orm works in all runtimes (Cloudflare Workers, Vercel Edge, Node.js)
  • drizzle-kit handles migrations and schema generation

Using Bundled Resources

Templates (templates/)

drizzle-schema.ts - Complete Drizzle schema with users, posts, relations

// See templates/drizzle-schema.ts for full example

drizzle-queries.ts - Common query patterns (SELECT, INSERT, UPDATE, DELETE, joins)

// See templates/drizzle-queries.ts for full example

drizzle-migrations-workflow.md - Complete migration workflow guide

// See templates/drizzle-migrations-workflow.md for full guide

neon-basic-queries.ts - Raw SQL query patterns with Neon

// See templates/neon-basic-queries.ts for full example

package.json - Complete dependency configuration

// See templates/package.json for full config

References (references/)

  • setup-guide.md - Complete 7-step setup process (installation → deployment)
  • error-catalog.md - All 15 errors with solutions and troubleshooting
  • common-patterns.md - 5+ production patterns (Cloudflare Workers, Next.js, Drizzle, transactions, branching)
  • advanced-topics.md - Branching workflows, connection pooling, performance, security

Dependencies

Required:

  • @neondatabase/serverless@^1.0.2 - Neon serverless Postgres client (HTTP/WebSocket-based)
  • @vercel/postgres@^0.10.0 - Vercel Postgres client (alternative to Neon direct, Vercel-specific)

Optional:

  • drizzle-orm@^0.44.7 - TypeScript ORM (edge-compatible, recommended)
  • drizzle-kit@^0.31.0 - Drizzle schema migrations and introspection
  • @prisma/client@^6.10.0 - Prisma ORM (Node.js only, not edge-compatible)
  • @prisma/adapter-neon@^6.10.0 - Prisma adapter for Neon serverless
  • neonctl@^2.16.1 - Neon CLI for database management
  • zod@^3.24.0 - Schema validation for input sanitization

Official Documentation


Package Versions (Verified 2025-10-29)

{
  "dependencies": {
    "@neondatabase/serverless": "^1.0.2",
    "@vercel/postgres": "^0.10.0",
    "drizzle-orm": "^0.44.7"
  },
  "devDependencies": {
    "drizzle-kit": "^0.31.0",
    "neonctl": "^2.16.1"
  }
}

Latest Prisma (if needed):

{
  "dependencies": {
    "@prisma/client": "^6.10.0",
    "@prisma/adapter-neon": "^6.10.0"
  },
  "devDependencies": {
    "prisma": "^6.10.0"
  }
}

Production Example

This skill is based on production deployments of Neon and Vercel Postgres:

  • Cloudflare Workers: API with 50K+ daily requests, 0 connection errors
  • Vercel Next.js App: E-commerce site with 100K+ monthly users
  • Build Time: <5 minutes (initial setup), <30s (deployment)
  • Errors: 0 (all 15 known issues prevented)
  • Validation: ✅ Connection pooling, ✅ SQL injection prevention, ✅ Transaction handling, ✅ Branching workflows

Complete Setup Checklist

Use this checklist to verify your setup:

  • Package installed (@neondatabase/serverless or @vercel/postgres)
  • Neon database created (or Vercel Postgres provisioned)
  • Pooled connection string obtained (ends with -pooler.)
  • Connection string includes ?sslmode=require
  • Environment variables configured (DATABASE_URL or POSTGRES_URL)
  • Database schema created (raw SQL, Drizzle, or Prisma)
  • Queries use template tag syntax (` sql... `)
  • Transactions use proper try/catch and release connections
  • Connection pooling verified (using pooled connection string)
  • ORM choice appropriate for runtime (Drizzle for edge, Prisma for Node.js)
  • Tested locally with dev database
  • Deployed and tested in production/preview environment
  • Connection monitoring set up in Neon dashboard

Questions? Issues?

  1. Check references/error-catalog.md for all 15 errors and troubleshooting
  2. Review references/setup-guide.md for complete 7-step setup process
  3. See references/common-patterns.md for production-tested code examples
  4. Check official docs: https://neon.tech/docs
  5. Ensure you're using pooled connection string for serverless environments
  6. Verify sslmode=require is in connection string

平台分布

windsurf

48.18%
按下载量换算597

Cursor

31.26%
按下载量换算388

Codex

13.11%
按下载量换算163

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills