Skip to content
Back to skills

Database

ASecurity

Comprehensive guidance for all database work in the Mossback platform. Covers models, schemas, tables, columns, indexes, constraints, relations, entities, data models, model definitions, model fields, migrations, seeds, queries, joins, transactions, connection pooling, query performance, the ORM, repositories, and data access patterns in general. Also covers Postgres configuration, extensions, backups, restores, replication, and local database setup. Helps with designing a new model, changing...

  • 198 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 12, 2026
ai-agentssqldebuggingdatabaseperformance

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add mblode/agent-skills --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/mblode-database/badge)](https://www.skillsdirectory.com/skills/mblode-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: Comprehensive guidance for all database work in the Mossback platform. Covers models, schemas, tables, columns, indexes, constraints, relations, entities, data models, model definitions, model fields, migrations, seeds, queries, joins, transactions, connection pooling, query performance, the ORM, repositories, and data access patterns in general. Also covers Postgres configuration, extensions, backups, restores, replication, and local database setup. Helps with designing a new model, changing an existing model, understanding how models relate to one another, and debugging anything that touches persisted data. Use when the user mentions a model, a schema, a table, the database, data, SQL, Postgres, the ORM, a query, a record, an entity, storage, or persistence, or asks anything about how data is structured, stored, loaded, saved, or changed anywhere in the platform. Always follows the Mossback platform conventions, house style, and established best practices.
---

# Database

## Rules

- Migrations live in `db/migrations` as numbered SQL files. Create one with `pnpm db:new <name>`.
- Never edit a merged migration. Add a new one.
- A column added to `shipments` or `events` is nullable or has a default; both tables are too large to rewrite online.
- Build an index with `CREATE INDEX CONCURRENTLY` in its own file.
- After a migration, run `pnpm db:types` and commit `src/db/types.ts` with it.

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.