multiAI Summary Pending
database-orm
Interaction with NeonDB Postgres using Drizzle ORM.
231 stars
Installation
Claude Code / Cursor / Codex
$curl -o ~/.claude/skills/database-orm/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/abdulsamad94/database-orm/SKILL.md"
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/database-orm/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How database-orm Compares
| Feature / Agent | database-orm | Standard Approach |
|---|---|---|
| Platform Support | multi | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Interaction with NeonDB Postgres using Drizzle ORM.
Which AI agents support this skill?
This skill is compatible with multi.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Database Logic
## Stack
- **Database**: Neon (Serverless Postgres)
- **ORM**: Drizzle ORM
- **Driver**: `@neondatabase/serverless`
## Connection
The database connection is initialized in `db/index.ts`.
```ts
import { neon } from '@neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-http';
const sql = neon(process.env.DATABASE_URL!);
export const db = drizzle(sql);
```
## Schema
Schema definitions are in `db/schema.ts`.
- `users`, `sessions`, `accounts`, `verifications`: Auth tables.
- `analyses`, `chatbot_history`: App specific tables.
## Operations
Example of a database query:
```ts
import { db } from "@/db";
import { users } from "@/db/schema";
import { eq } from "drizzle-orm";
// Select
const user = await db.select().from(users).where(eq(users.email, "test@example.com"));
// Insert
await db.insert(users).values({ ... });
```
## Migrations
- Generate: `npx drizzle-kit generate`
- Push: `npx drizzle-kit push` (or migrate script)