Skip to content
Back to skills

Database

ASecurity

Use when changing database schemas, migrations, database access, or database package structure.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentssqlexpressdatabase

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add davidvornholt/standards --skill database --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Database?

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

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

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
description: Use when changing database schemas, migrations, database access, or database package structure.
---

# Database and migrations

Databases default to Drizzle, and the Drizzle schema is the source of truth. Generate migrations from it with `drizzle-kit generate`, and use `drizzle-kit generate --custom` for SQL the schema can't express.

Unless a database is private to one app, its schema, migrations, Drizzle config, and scripts live in a dedicated package: `packages/db` for the primary database, and one package per additional database.

Effect code accesses PostgreSQL through `@effect/sql-pg`, using the connection helpers from the project's `@<project>/db` package rather than its own `PgClient`.

When a process opens more than one pool against the same database, such as an Effect client beside the `pg` pool an auth library uses, their maximum sizes together stay within the role's connection limit in every environment, including pull request previews. Pools can't lend each other idle connections, and a query past a full pool waits while one past the role's limit fails. An integration test saturates every pool at once against a role created with that limit.

The canonical justfile owns the local development database (`just dev-db-start`). Don't add a project script or compose file for it.

`bun run` doesn't load `.env.local`, so scripts that need `DATABASE_URL` load it explicitly, as in `"db:migrate": "bun --env-file=.env.local drizzle-kit migrate"`.

Files in this skill

  • SKILL.md1.5 KB
  • agents/openai.yaml236 B

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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