スキル一覧に戻る
muhammad-anas35

neon-database

by muhammad-anas35

0🍴 0📅 2026年1月16日
GitHubで見るManusで実行

SKILL.md


name: neon-database description: Use when working with Neon serverless PostgreSQL database. Covers database setup, CLI commands, Drizzle ORM integration, schema migrations, connection pooling, and user data storage patterns for authentication and chat history.

Neon Database Skill

Quick Start Workflow

When working with Neon PostgreSQL:

  1. Check if database exists

    • Look in .env or .env.local for DATABASE_URL
    • Verify connection with neon connection-string
  2. For schema changes

    • Always use Drizzle migrations (never manual SQL)
    • Check drizzle.config.ts is configured
    • Generate migration: drizzle-kit generate
    • Apply migration: drizzle-kit push
  3. For user data storage

    • Use users table for authentication
    • Use sessions table for session management
    • Use chat_history table for conversations
    • Always include user_id foreign key
  4. For queries

    • Use Drizzle ORM for type safety
    • Implement proper error handling
    • Use transactions for multi-table operations

Standard Patterns

Environment Variables

DATABASE_URL="postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require"

Connection Setup

import { drizzle } from 'drizzle-orm/neon-http';
import { neon } from '@neondatabase/serverless';

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

Database Design Principles

For this Physical AI RAG chatbot:

  • Users table: Store authentication data (email, password_hash, email_verified)
  • Sessions table: Manage user sessions (connect to users via user_id)
  • Chat history table: Store Q&A pairs with user attribution
  • All timestamps: Use timestamp('created_at').defaultNow()
  • All IDs: Use text('id').primaryKey() with crypto.randomUUID()

Knowledge Base

For detailed information, check these references:

  • CLI Commandsreferences/neon-cli.md
  • Drizzle ORM Setupreferences/drizzle-orm.md
  • Schema Patternsreferences/database-schemas.md
  • Query Examplesreferences/query-patterns.md
  • Migrations Guidereferences/migrations.md

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

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

レビュー

💬

レビュー機能は近日公開予定です