neon-toolkit

作成者: neondatabase

一時的なNeonデータベースを作成・管理し、テスト、CI/CDパイプライン、および分離された開発環境に使用します。一時データベースを構築する際に使用します…

npx skills add https://github.com/neondatabase/ai-rules --skill neon-toolkit

Neon Toolkit Skill

Automates creation, management, and cleanup of temporary Neon databases using the Neon Toolkit.

When to Use

  • Creating fresh databases for each test run
  • Spinning up databases in CI/CD pipelines
  • Building isolated development environments
  • Rapid prototyping without manual setup

Not recommended for: Production databases, shared team environments, local-only development (use Docker), or free tier accounts (requires paid projects).

Code Generation Rules

When generating TypeScript/JavaScript code:

  • BEFORE generating import statements, check tsconfig.json for path aliases (compilerOptions.paths)
  • If path aliases exist (e.g., "@/": ["./src/"]), use them (e.g., import { x } from '@/lib/utils')
  • If NO path aliases exist or unsure, ALWAYS use relative imports (e.g., import { x } from '../../../lib/utils')
  • Verify imports match the project's configuration
  • Default to relative imports - they always work regardless of configuration

Reference Documentation

Primary Resource: See [neon-toolkit.mdc](https://raw.githubusercontent.com/neondatabase-labs/ai-rules/main/neon-toolkit.mdc) in project root for comprehensive guidelines including:

  • Core concepts (Organization, Project, Branch, Endpoint)
  • Installation and authentication setup
  • Database lifecycle management patterns
  • API client usage examples
  • Error handling strategies

Quick Setup

Installation

npm install @neondatabase/toolkit

Basic Usage

import { NeonToolkit } from '@neondatabase/toolkit';

const neon = new NeonToolkit({ apiKey: process.env.NEON_API_KEY! });

// Create ephemeral database
const db = await neon.createEphemeralDatabase();
console.log(`Database URL: ${db.url}`);

// Use the database...

// Cleanup
await db.delete();

Templates & Scripts

  • templates/toolkit-workflow.ts - Complete ephemeral database workflow
  • scripts/create-ephemeral-db.ts - Create a temporary database
  • scripts/destroy-ephemeral-db.ts - Clean up ephemeral database

Common Use Cases

Testing

const db = await neon.createEphemeralDatabase();
// Run tests with fresh database
await db.delete();

CI/CD Integration

export NEON_API_KEY=${{ secrets.NEON_API_KEY }}
npm test  # Uses ephemeral database

Related Skills

  • neon-serverless - For connecting to databases
  • neon-drizzle - For schema and migrations

Want best practices in your project? Run neon-plugin:add-neon-docs with parameter SKILL_NAME="neon-toolkit" to add reference links.

neondatabaseのその他のスキル

add-neon-docs
neondatabase
ユーザーがNeonに関するドキュメントの追加、ドキュメントの追加、参照の追加、またはドキュメントのインストールを依頼した場合にこのスキルを使用します。Neonのベストプラクティス参照リンクを追加します…
official
neon-auth
neondatabase
アプリケーションにNeon Authをセットアップします。認証を設定し、認証ルートを作成し、UIコンポーネントを生成します。Next.jsに認証を追加する際に使用します…
official
neon-drizzle
neondatabase
完全に機能するDrizzle ORMのセットアップを、プロビジョニングされたNeonデータベースと共に作成します。依存関係のインストール、データベース認証情報のプロビジョニング、接続の設定などを行います。
official
neon-js
neondatabase
Neon JS SDK全体をセットアップし、統合認証とPostgREST形式のデータベースクエリを利用可能にします。認証クライアント、データクライアント、型生成を設定します。以下の場合に使用します…
official
neon-serverless
neondatabase
Neon Serverless DriverをNext.js、Vercel Edge Functions、AWS Lambda、その他のサーバーレス環境向けに設定します。@neondatabase/serverlessをインストールし、セットアップします…
official
neon-toolkit
neondatabase
テスト用、CI/CDパイプライン、および分離された開発環境向けに、一時的なNeonデータベースを作成および管理します。一時的なデータベースを構築する際に使用します…
official
logging-best-practices
neondatabase
デバッグと分析を強力にするワイドイベント(カノニカルログライン)に焦点を当てたロギングのベストプラクティス
official
skill-creator
neondatabase
効果的なスキルを作成するためのガイド。このスキルは、ユーザーがClaudeの機能を拡張する新しいスキルを作成(または既存のスキルを更新)したい場合に使用されるべきです。
official