一键导入
neondb-setup
Set up NeonDB PostgreSQL database with Drizzle ORM for a project. Use when the user wants to configure NeonDB or add serverless Postgres.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up NeonDB PostgreSQL database with Drizzle ORM for a project. Use when the user wants to configure NeonDB or add serverless Postgres.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Batch project dependency changes and install once. Use when starting a new feature, scaffolding a project, or when any npm/pnpm package installation is needed.
Step-by-step task tracking via the TODO_WRITE marker. Use when executing any multi-step task, follow-up request, or build workflow.
Pre-planning procedure for new tasks. Visualize end state, identify structure, and anticipate problems before coding. Use when starting a new feature, scaffolding a project, or planning a multi-file change.
Fix-verify iteration loop for dependency, build, and runtime errors. Use when installing packages, running dev servers, fixing build errors, or verifying that code compiles and runs.
Concise output formatting for the Hatchway platform UI. Use when generating any response during task execution.
Read-before-write discipline. Search for patterns and understand existing code before modifying files. Use when editing existing files, adding features to an existing codebase, or creating new components.
基于 SOC 职业分类
| name | neondb-setup |
| description | Set up NeonDB PostgreSQL database with Drizzle ORM for a project. Use when the user wants to configure NeonDB or add serverless Postgres. |
Provision a NeonDB serverless PostgreSQL database and configure Drizzle ORM.
Run the get-db CLI to provision database:
npx get-db -y
This instantly creates a database and writes DATABASE_URL to .env.
The output includes the connection string and claim URL - these are automatically detected by ShipBuilder.
Install PostgreSQL and Drizzle packages:
npm install drizzle-orm pg
npm install -D drizzle-kit @types/pg
Note: Use standard pg package - NeonDB is a PostgreSQL database.
Create Drizzle config at drizzle.config.ts:
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
dialect: 'postgresql',
schema: './src/db/schema.ts',
out: './drizzle',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
});
Create database connection at src/db/index.ts:
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';
import * as schema from './schema';
const pool = new Pool({
connectionString: process.env.DATABASE_URL!,
});
export const db = drizzle(pool, { schema });
Create example schema at src/db/schema.ts:
import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
export const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
email: text('email').notNull().unique(),
createdAt: timestamp('created_at').defaultNow().notNull(),
});
Add database scripts to package.json:
{
"scripts": {
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
}
}
Push schema to database:
npm run db:push
.env - inform the user to save it.env is in .gitignoredb:push for development, db:generate + db:migrate for productionAfter success, remove this skill:
rm -rf .claude/skills/neondb-setup
rmdir .claude/skills .claude 2>/dev/null