neon-toolkit

작성자: neondatabase

테스트, CI/CD 파이프라인 및 격리된 개발 환경을 위한 임시 Neon 데이터베이스를 생성하고 관리합니다. 임시 데이터베이스를 구축할 때 사용합니다…

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
logging-best-practices
neondatabase
강력한 디버깅과 분석을 위한 광범위한 이벤트(표준 로그 라인)에 초점을 맞춘 로깅 모범 사례
official
skill-creator
neondatabase
효과적인 스킬을 만들기 위한 가이드입니다. 사용자가 Claude의 기능을 확장하는 새 스킬을 만들거나 기존 스킬을 업데이트하려 할 때 이 스킬을 사용해야 합니다.
official
claimable-postgres
neondatabase
로컬 개발, 데모, 프로토타이핑 및 테스트 환경을 위한 즉시 사용 가능한 Postgres 데이터베이스입니다. 계정이 필요하지 않습니다. 데이터베이스는 Neon 계정에 클레임되지 않으면 72시간 후에 만료됩니다.
official