agentleFS
davidvornholtdavidvornholt/mailbox/.agents/skills/database/SKILL.md

database

Skill2 starsChanged 8 days agoMITView on GitHub

Use when changing database schemas, migrations, database access, or database package structure. Keeps the Drizzle schema authoritative and migrations generated.

  • Reads credentials

31 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use monitoring, ci-cd and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • rogue-dev-studioSkill

    monitoring

    Claude monitoring and usage tracking tools (UV, claude-monitor, claude-usage-cli). Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `monitoring` work when listed in TEAM.yaml or explicitly requested.

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 4 projects that use this

  • klauswgSkill

    performance

    Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".

    Also in 6 projects that use this

  • 0xSeroSkill

    security

    Also in 11 projects that use this

  • JkudjoSkill

    incident

    Production incident response — structured triage, hypothesis tree, safe remediation, incident record

    Also in 3 projects that use this

  • mrgoonieSkill

    devops

    Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.

    Also in 4 projects that use this

The file

Files
SKILL.md

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".

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.