Skip to content
Back to skills

Database Orm

ASecurity

Interaction with NeonDB Postgres using Drizzle ORM.

  • 666 stars
  • 0 votes
  • 0 copies
  • 12 views
  • Added February 8, 2026
databasessqldatabase

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill database-orm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Database Orm?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Database Orm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-database-orm/badge)](https://www.skillsdirectory.com/skills/majiayu000-database-orm)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Database & ORM
description: Interaction with NeonDB Postgres using Drizzle ORM.
---

# 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)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.