agentleFS
K95M65K95M65/AI_ONBOARD/skills/prisma-migrate/SKILL.md

prisma-migrate

Skill0 starsChanged 4 months agoMITView on GitHub

Safely create and apply a Prisma schema migration, guarding against running against a non-local database. Use when changing prisma/schema.prisma or adding/altering database tables, columns, indexes, or relations.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Refuses to run: if DATABASE_URL looks non-local (staging/prod) unless you pass --force.

    line 21
  2. Very specific:

    Commit schema.prisma and the new migration folder together.

    line 23
  3. Distinctive:

    Never delete or edit an already-applied migration — create a new one that carries the correction.

    line 29
  4. Very specific:

    If migrate dev reports drift or wants to reset, stop and ask — a reset drops data.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prisma migrate

When to use

Any change to schema.prisma — a new model, field, index, or relation. Never edit the database by hand and never hand-write migration SQL.

Steps

  1. Edit schema.prisma.
  2. Create the migration:
    bash scripts/new-migration.sh <migration-name>
    • Generates the SQL and applies it to your local dev database via prisma migrate dev.
    • Refuses to run if DATABASE_URL looks non-local (staging/prod) unless you pass --force.
  3. Review the generated SQL under prisma/migrations/<timestamp>_<name>/ before committing.
  4. Commit schema.prisma and the new migration folder together.

Safety

  • The local-only guard is a safety net, not a substitute for judgment: migrating a shared or production database still requires explicit human confirmation.
  • Never delete or edit an already-applied migration — create a new one that carries the correction.
  • If migrate dev reports drift or wants to reset, stop and ask — a reset drops data.

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.