Creates and manages ephemeral Neon databases for testing, CI/CD pipelines, and isolated development environments. Use when building temporary databases for automated tests or rapid prototyping.
View on GitHubneondatabase/ai-rules
neon-plugin
January 18, 2026
Select agents to install to:
npx add-skill https://github.com/neondatabase/ai-rules/blob/main/neon-plugin/skills/neon-toolkit/SKILL.md -a claude-code --skill neon-toolkitInstallation paths:
.claude/skills/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
```bash
npm install @neondatabase/toolkit
```
### Basic Usage
```typescript
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.t