HavenSkills

Claude Database Skills

Connect applications to databases, shape schemas and improve query performance.

Skills
6 skills

How to choose

Choose the skill for your database engine or ORM. Work on a branch or staging database when changing schema.

Filter

All skills in this category

supabase-postgres-best-practices

Review Postgres schema, queries, indexes and migrations using Supabase guidance.

by supabase
npx skills add supabase/agent-skills --skill supabase-postgres-best-practices
Author
supabase
Repo
GitHub

prisma-client-api

Use Prisma Client for typed queries, relations and transactions.

by prisma
npx skills add prisma/skills --skill prisma-client-api
Author
prisma
Repo
GitHub

prisma-database-setup

Configure Prisma for the application's database provider and connection.

by prisma
npx skills add prisma/skills --skill prisma-database-setup
Author
prisma
Repo
GitHub

neon-postgres

Connect to and work with a Neon Postgres database, including development branches.

by neondatabase
npx skills add neondatabase/agent-skills --skill neon-postgres
Author
neondatabase
Repo
GitHub

convex-quickstart

Set up a Convex backend and wire queries and mutations into an application.

by convex
npx skills add convex/agent-skills --skill convex-quickstart
Author
convex
Repo
GitHub

supabase

Connect an application to Supabase and work with its database, authentication and storage features.

by supabase
npx skills add supabase/agent-skills --skill supabase
Author
supabase
Repo
GitHub

What database skills are for

A database skill gives an agent two things it otherwise improvises: how to look before it writes, and how to undo. Reading a schema is easy. Knowing that a migration takes a lock, that a column rename breaks a dashboard nobody mentioned, or that staging seed data is not the shape of production — that is what the skill is for.

The work splits cleanly: query-and-explain tasks (read-only, useful immediately) and schema changes (need a plan, a backup, a rollback).

Which of the six to install

Pick by engine first, then by task.

Postgres on Supabase — supabase-postgres-best-practices for schema, index and query review; install supabase as well only if the app also uses its auth or storage. Postgres on Neon — neon-postgres, which knows about development branches; that is the feature worth having when you want to try a migration without touching the main database. Prisma projects — prisma-database-setup configures the provider and connection string, prisma-client-api is for typed queries, relations and transactions. A new project needs setup first; an existing one usually only needs the client skill. Convex — convex-quickstart is a backend platform with its own queries and mutations, so it is not interchangeable with the Postgres skills at all.

Where these skills break in practice

  • Destructive statements without a WHERE. “Clean up test users” is one missing clause away from emptying the table. Require a SELECT returning the same rows first, and a row count.
  • Migrations with no lock budget. Adding an index to a large table takes minutes during which writes queue. On staging nobody notices; in production it is an outage.
  • The schema the agent imagined. It writes SQL against columns from your description instead of the live schema, and the first run fails on a column that never existed. Paste the real table definition.
  • Transaction boundaries. Two statements that must succeed together are sent separately; the first commits, the second fails.
  • Production credentials in a scratch session. Read the connection string before running anything, and say the environment out loud in the prompt.

The check that catches most of it

  1. Run the query with LIMIT 1 and read the actual column names before trusting generated SQL.
  2. For anything that writes: run it inside a transaction, print the affected row count, roll back, then decide.
  3. Run the migration and its rollback on a branch first, and time it there.
  4. Re-read the schema afterwards. If the change is not visible, it did not happen.

Which page to read next

Cloud skills cover the deploy that usually triggers the migration. Coding skills covers the tests that should have caught the schema change before it shipped.

How to evaluate the result

Review migrations, confirm rollback behaviour and compare representative query plans before applying changes.

How to check the result

Review the generated SQL, run it on a branch, test the rollback, and compare query plans before and after for the two or three queries the change targets.

Frequently asked questions

How do I install one of these database skills?

Use the command beside the skill, select a supported agent, then reload the agent and confirm it can see the skill in your project.

Which skill should I install for a Postgres project?

Use supabase-postgres-best-practices for schema and query review on Supabase. Use neon-postgres for branch-aware connection work on Neon. If your application already uses Prisma, use prisma-client-api for queries and transactions. Add the supabase skill if your app also uses Supabase authentication or storage.

Do I need both Prisma skills?

prisma-database-setup configures the provider and connection, prisma-client-api is for writing queries, relations and transactions. A new project needs setup first; an existing project usually only needs the client skill.

Can I apply a schema change to production straight away?

Not safely. Run the migration and its rollback on a branch or staging database first, time it there, and keep the generated SQL for review before it touches production.

Does convex-quickstart work with SQL or Prisma?

No. Convex is a backend platform with its own queries and mutations. Install it for a Convex project only, and use the Postgres skills for Postgres databases.

Can I let Claude run SQL on production?

Give it a read-only role on production and a writable one on staging. The failure you are protecting against is not malice — it is a plausible query with a missing clause.

What is the cheapest safeguard?

Count first: SELECT COUNT(*) with the same WHERE clause as the UPDATE or DELETE, then compare with the affected-rows report afterwards.