CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

database-migrations

Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL, Prisma, Drizzle, Kysely, Django, and golang-migrate. Use when writing a schema or data migration, adding a column or index to a large table, planning a rollback, or preparing a zero-downtime deploy.

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

70%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The safety-critical material is excellent — sequenced expand-contract workflows with explicit validation gates, checklists, and executable code — but the skill is let down by monolithic structure and boilerplate per-tool sections that inflate the context cost. The two referenced example SQL files are missing from the bundle, breaking both the progressive-disclosure structure and the executability of the self-check commands.

Suggestions

Move the per-tool workflow sections (Prisma, Drizzle, Kysely, Django, golang-migrate) into separate reference files (e.g. references/prisma.md) and keep SKILL.md to the core safety patterns with brief, clearly signaled pointers.

Ship the referenced examples/postgres-add-column.sql and examples/postgres-column-rename.sql files in the bundle, or remove the psql commands that invoke them — the links are currently broken.

Trim boilerplate that restates standard tool usage Claude already knows (Prisma/Drizzle schema definitions, the Kysely programmatic migrator), keeping only the non-obvious safety notes such as --create-only for CONCURRENTLY, SeparateDatabaseAndState, Kysely<any>, and the allowUnorderedMigrations warning.

DimensionReasoningScore

Conciseness

The safety content (expand-contract sequencing, lock_timeout guidance, IS DISTINCT FROM rationale, drain-writer gates) is dense and non-obvious, but roughly half the ~490-line body is per-tool sections (Prisma, Drizzle, Kysely, Django, golang-migrate) restating boilerplate Claude already knows — standard CLI commands, schema syntax examples, and a full programmatic Kysely migrator. This matches 'mostly efficient but includes some unnecessary explanation or could be tightened'; it is not score 4 because the removable boilerplate is more than minor instances, and not score 2 because there is no padded prose or basic-concept explanation.

3 / 5

Actionability

Guidance is overwhelmingly executable copy-paste SQL/bash/TypeScript/Python — including the batched DO-block loop, whose COMMIT-inside-DO pattern is valid PostgreSQL (https://www.postgresql.org/docs/current/plpgsql-transactions.html). It falls short of 'fully executable' because the two self-check commands (`psql -X -v ON_ERROR_STOP=1 -f examples/postgres-add-column.sql` and the column-rename equivalent) reference files that do not exist in the bundle, so those commands fail as written; the SKIP LOCKED early-exit caveat is also unstated.

4 / 5

Workflow Clarity

The expand-contract rename is a clearly sequenced 7-step workflow with explicit validation gates ("Require zero mismatches before switching reads"), a pre-flight Migration Safety Checklist, retry feedback for failed batch transactions, drain instructions per step, and a deployment-gate timeline. Batch/destructive operations all carry verification, so the workflow-clarity cap does not apply; this matches the top anchor with checklists, checkpoints, and error-recovery loops all present.

5 / 5

Progressive Disclosure

Section headers give the file reasonable internal structure, but everything is inlined in one ~490-line SKILL.md — the five per-tool workflow sections are natural candidates for separate reference files. The only two file references (examples/postgres-add-column.sql and examples/postgres-column-rename.sql) are clearly signaled but broken, since neither file exists in the bundle. This matches 'some structure but could be better organized; content that should be separate is inline'; it is not score 2 because the references are not buried and the in-file organization is genuinely clear.

3 / 5

Total

15

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: it concisely enumerates concrete capabilities and tools, and pairs them with an explicit 'Use when' clause full of natural trigger phrases. The only weakness is a handful of natural trigger terms (column renames, backfills, new-project migration setup) that appear in the body but not in the trigger clause.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — "forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows" — plus six named tools (PostgreSQL, Prisma, Drizzle, Kysely, Django, golang-migrate). This is comprehensive concrete coverage matching the top anchor; it is not score 4 because there are no notable gaps in the action inventory.

5 / 5

Completeness

Explicitly answers both questions: the first sentence states what the skill does (safe, reversible migration patterns with named techniques and tools) and "Use when writing a schema or data migration, adding a column or index to a large table, planning a rollback, or preparing a zero-downtime deploy" gives concrete trigger phrases. This clearly matches the top anchor; it is not score 4 because the 'when' clause is already explicit and specific rather than needing more detail.

5 / 5

Trigger Term Quality

The trigger clause uses natural phrases users would say: "writing a schema or data migration", "adding a column or index to a large table", "planning a rollback", "preparing a zero-downtime deploy". It falls short of the top anchor because a few natural trigger terms are missing — e.g. renaming a column, backfilling data, and setting up migration tooling for a new project (a trigger the skill body itself lists) do not appear in the 'when' clause.

4 / 5

Distinctiveness Conflict Risk

Occupies a clear niche (database migrations) with six named tools and migration-specific triggers (expand-contract renames, concurrent indexes, batched backfills), giving minimal overlap risk with adjacent skills like general SQL or database-design skills. Matches the top anchor; not score 4 because the named tools and migration-specific trigger phrasing make confusion with a related skill unlikely.

5 / 5

Total

19

/

20

Passed

Validation

81%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 13 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (503 lines); consider splitting into references/ and linking

Warning

metadata_version

'metadata.version' is missing

Warning

relative_links

Relative link issues: 2 possibly missing (examples/postgres-add-column.sql, examples/postgres-column-rename.sql)

Warning

Total

13

/

16

Passed

Repository

affaan-m/ECC

Path

skills/database-migrations/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.