agentleFS
loganware05loganware05/captains-compass-cursor/.cursor/skills/postgres-prisma/SKILL.md

postgres-prisma

Skill2 starsChanged 31 days agoMITView on GitHub

Designs and applies PostgreSQL/Prisma schema changes, migrations, indexes, and rollback-safe data updates

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer additive, backward-compatible changes when possible.

    line 21
  2. Distinctive:

    Write rollback notes (down migration strategy or restore steps) in the plan/evidence.

    line 25
  3. Distinctive:

    Keep production credentials out of the agent context.

    line 27
  4. Distinctive:

    Run applicable Prisma validate/generate and related tests before handoff.

    line 28
  5. Distinctive:

    Do not run destructive production migrations without explicit Captain approval.

    line 36
  6. Distinctive:

    Do not delete columns/tables without a migration and rollback plan.

    line 37
  7. Distinctive:

    Do not store production connection strings in docs or commits.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

PostgreSQL and Prisma

Use this Skill when

Changing Prisma models, migrations, indexes, constraints, transactions, seed data, or PostgreSQL queries in a Node/Prisma project.

Inputs

  • Approved IMPLEMENTATION_PLAN.md (including migration/rollback sections)
  • Existing schema.prisma and migration history
  • Environment separation (dev vs production credentials)

Procedure

  1. Inspect current Prisma schema and recent migrations.
  2. Prefer additive, backward-compatible changes when possible.
  3. Define models, relations (both sides), indexes, and uniqueness explicitly.
  4. Include createdAt / updatedAt on new models unless the project convention differs.
  5. Generate migrations with the project's Prisma workflow (migrate dev locally; never invent irreversible production steps silently).
  6. Write rollback notes (down migration strategy or restore steps) in the plan/evidence.
  7. Validate queries and constraints; add seed updates only when required.
  8. Keep production credentials out of the agent context; use development databases during planning/implementation.
  9. Run applicable Prisma validate/generate and related tests before handoff.

Output

Schema/migration files, seed updates if any, rollback notes, and validation evidence for the First Mate.

Prohibited actions

  • Do not run destructive production migrations without explicit Captain approval.
  • Do not delete columns/tables without a migration and rollback plan.
  • Do not store production connection strings in docs or commits.

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.