/harness-claude:prisma-migrationsfrom harness-claude
Manages database schema evolution with Prisma Migrate: generate, deploy, reset migrations, baseline existing databases, resolve drift and failed migrations.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:prisma-migrations still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Manage database schema evolution with prisma migrate dev/deploy/reset and migration history
schema.prisma, run:npx prisma migrate dev --name describe_the_change
This generates a migration SQL file, applies it, and regenerates Prisma Client.
migrate dev in production. Use:npx prisma migrate deploy
This applies all pending migrations without generating new ones.
npx prisma migrate reset
mkdir -p prisma/migrations/0_init
npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > prisma/migrations/0_init/migration.sql
npx prisma migrate resolve --applied 0_init
npx prisma migrate diff --from-schema-datamodel prisma/schema.prisma --to-schema-datasource prisma/schema.prisma
Customize generated SQL — after migrate dev creates a migration file, edit it before committing. Prisma will not overwrite your edits on subsequent runs.
Handle failed migrations — if a migration partially applied:
# Fix the database state manually, then mark as applied:
npx prisma migrate resolve --applied MIGRATION_NAME
# Or mark as rolled back:
npx prisma migrate resolve --rolled-back MIGRATION_NAME
migrate dev requires a shadow database to detect drift. Configure it explicitly if your provider does not allow automatic creation:datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
Always commit migration files (prisma/migrations/) to version control. They are the source of truth for production.
Never delete or reorder migration directories once they have been applied to any environment.
Prisma Migrate uses a migrations table (_prisma_migrations) to track which migrations have been applied. Each migration is a directory containing a migration.sql file and is applied in lexicographic order.
Migration history vs schema state: The migration history is the authoritative record. The schema file describes the desired end state. If these diverge (drift), migrate dev will detect it via the shadow database.
Shadow database mechanics: During migrate dev, Prisma creates a temporary shadow database, applies all existing migrations to it, computes the diff against your schema, and generates the new migration. The shadow database is dropped afterward. This means you need CREATE DATABASE privileges in development.
Data migrations: Prisma generates only DDL (schema changes). If you need DML (data changes — backfills, column value transforms), add raw SQL to the generated migration file before committing.
Trade-offs:
migrate dev is safe and reversible (via reset), but slow on large schemas due to shadow database overheadmigrate deploy is fast but irreversible — there is no built-in rollback. Write reverse migrations manually if neededdb push skips migration history entirely — use it only for rapid prototyping, never in a shared environmentCommon mistakes:
migrate dev in CI — it generates files and requires a shadow database. Use migrate deploy insteadhttps://prisma.io/docs/orm/prisma-migrate
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job