agentleFS
MrCipherSmithMrCipherSmith/goodai-base/skills/db-migrate/SKILL.md

db-migrate

Skill0 starsChanged 5 months agoMITView on GitHub

Use when creating, applying, rolling back, or checking the status of database migrations.

  • Deletes or force-pushes

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use react-query-best-practices, you-might-not-need-a-callback and 6 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.
  • bibektimilsina00Skill

    react-query-best-practices

    Audit and fix React Query usage in apps/web — enforce query key factories, signal forwarding, staleTime, and proper mutation patterns. Use when reviewing or fixing server-state code.

    Also in 3 projects that use this

  • bibektimilsina00Skill

    you-might-not-need-a-callback

    Analyze and fix useCallback anti-patterns in your code

    Also in 3 projects that use this

  • MicrosoftSkill

    cleanup

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 7 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

  • +3 more from bibektimilsina00

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create, apply, and manage database migrations.

    line 20
  2. Very specific:

    Search for: prisma/schema.prisma, ormconfig.*, data-source.ts, knexfile.*, .sequelizerc, drizzle.config.ts, alembic.ini, migrations/ with …

    line 32
  3. Distinctive:

    Ask what schema changes are needed (or infer from context)

    line 50
  4. Distinctive:

    Verify with status command

    line 58
  5. Distinctive:

    ALWAYS show migration content before applying in production

    line 62
  6. Distinctive:

    ALWAYS confirm before rollback operations

    line 63
  7. Distinctive:

    NEVER apply to production without explicit confirmation

    line 64
  8. Distinctive:

    If ORM can't be detected, ask the user

    line 66

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “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

Database Migration

Create, apply, and manage database migrations.

Arguments

  • /db-migrate create <name> — create new migration
  • /db-migrate apply — apply pending migrations
  • /db-migrate status — show migration status
  • /db-migrate rollback — rollback last migration

Workflow

Step 1: Detect ORM/Migration Tool

Search for: prisma/schema.prisma, ormconfig.*, data-source.ts, knexfile.*, .sequelizerc, drizzle.config.ts, alembic.ini, migrations/ with raw SQL.

Step 2: Execute Command

Create:

ToolCommand
Prismanpx prisma migrate dev --name <name>
TypeORMnpx typeorm migration:generate -n <name>
Knexnpx knex migrate:make <name>
Sequelizenpx sequelize-cli migration:generate --name <name>
Drizzlenpx drizzle-kit generate:migration --name <name>
Alembicalembic revision --autogenerate -m "<name>"

Apply / Status / Rollback — analogous commands per tool.

Step 3: If Creating — Help Write Migration

  1. Ask what schema changes are needed (or infer from context)
  2. For schema-based ORMs — edit schema first, then generate
  3. For code-based migrations — generate template and fill in up/down
  4. Review generated migration before applying

Step 4: Apply & Verify

  1. Show migration SQL preview if possible
  2. Apply migration
  3. Verify with status command

Rules

  • ALWAYS show migration content before applying in production
  • ALWAYS confirm before rollback operations
  • NEVER apply to production without explicit confirmation
  • For destructive operations (drop table, remove column), double-warn
  • If ORM can't be detected, ask the user

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.