Back to list
codyde

neondb-setup

by codyde

0🍴 0📅 Jan 22, 2026

SKILL.md


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.

NeonDB Setup Skill

Provision a NeonDB serverless PostgreSQL database and configure Drizzle ORM.

Setup Steps

  1. 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 SentryVibe.

  2. 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.

  3. 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!,
      },
    });
    
  4. 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 });
    
  5. 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(),
    });
    
  6. 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"
      }
    }
    
  7. Push schema to database:

    npm run db:push
    

Important

  • Carefully review the project and ensure that the schema.ts file created actually matches the needed schema in the project
  • Database expires in 72 hours unless claimed
  • Claim URL is shown in CLI output and saved to .env - inform the user to save it
  • Ensure .env is in .gitignore
  • Use db:push for development, db:generate + db:migrate for production

Cleanup

After success, remove this skill:

rm -rf .claude/skills/neondb-setup
rmdir .claude/skills .claude 2>/dev/null

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon