CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

database-migrations

数据库迁移最佳实践,涵盖模式变更、数据迁移、回滚以及零停机部署,适用于PostgreSQL、MySQL及常用ORM(Prisma、Drizzle、Django、TypeORM、golang-migrate)。

Quality

75%

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

Fix and improve this skill with Tessl

tessl review fix ./docs/zh-CN/skills/database-migrations/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

71%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.

A strong, highly actionable reference with concrete executable patterns, clear sequencing, checklists, and an excellent anti-pattern table. Its weaknesses are the inlined per-ORM guides that bloat the single file, some routine command explanations Claude already knows, and one non-executable batch-backfill example.

Suggestions

Split the per-ORM sections (Prisma, Drizzle, Django, golang-migrate) into separate reference files (e.g., references/prisma.md) and keep only a one-line pointer plus the non-obvious patterns (custom SQL via --create-only, SeparateDatabaseAndState) in SKILL.md.

Fix the batched backfill example to use a CREATE PROCEDURE with CALL (which permits COMMIT) instead of a DO block, or batch via repeated statements from the migration tool.

Add an explicit post-migration validation loop (e.g., verify row counts / lock status after applying, and what to do on failure) to elevate workflow clarity to a full feedback loop.

DimensionReasoningScore

Conciseness

The body is dense and executable with valuable GOOD/BAD annotations and version-specific notes (e.g., "Postgres 11+ is instant, no rewrite"), but the per-ORM workflow sections restate basic commands Claude already knows (e.g., `npx prisma migrate dev`, `python manage.py makemigrations`). This is minor over-explanation that could be trimmed, matching anchor 4 rather than the fully lean anchor 5.

4 / 5

Actionability

Most guidance is copy-paste-ready SQL, bash, and Python covering the common cases (add column, concurrent index, expand-contract rename, backfill, per-ORM workflows). However, the batched backfill `DO $$ ... COMMIT` block is not executable as written — PostgreSQL does not allow COMMIT inside a DO block (that requires a CREATE PROCEDURE) — a minor gap that keeps it below 'fully executable'.

4 / 5

Workflow Clarity

Multi-step processes are clearly sequenced: numbered expand-contract steps with a day-by-day timeline, a pre-application safety checklist ("已针对生产数据副本进行测试", "回滚计划已记录"), a 'Verify data consistency' checkpoint, and dirty-state recovery (`migrate ... force VERSION`). It falls short of 5 because there is no explicit validate→fix→retry feedback loop after applying migrations, only implicit checkpoints.

4 / 5

Progressive Disclosure

Sections are well-organized and navigable, but this is a ~330-line single file with four per-ORM guides (Prisma, Drizzle, Django, golang-migrate) fully inlined — content that clearly belongs in separate reference files per the anchor 'content that should be separate is inline'. No bundle files exist, so all detail loads into context upfront; it is not a 2 because the structure itself is genuinely clear.

3 / 5

Total

15

/

20

Passed

Description

70%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 specific, well-targeted description that names concrete capability areas and the exact tools covered, making it highly distinguishable. Its main weakness is the complete absence of a 'when to use' clause, which both caps completeness and leaves trigger guidance implicit.

Suggestions

Add an explicit trigger clause, e.g. "适用于需要创建或修改数据库表、执行数据回填、规划零停机变更,或用户提到 migration、schema change、rollback 时使用".

Include a few more natural synonyms users say, such as 'schema migration', 'backfill', or 'ALTER TABLE', to broaden trigger-term coverage from good to comprehensive.

DimensionReasoningScore

Specificity

The description names four concrete capability areas ("模式变更、数据迁移、回滚以及零停机部署") plus explicit tool coverage, matching 'several specific actions; minor gaps'. It falls short of 5 because it frames topics covered rather than a comprehensive list of concrete actions, and above 3 because it goes well beyond 1-2 actions.

4 / 5

Completeness

The 'what' is clear and concrete, but there is no 'Use when...' clause or equivalent explicit trigger guidance anywhere in the description, which caps completeness at 3 per the judging guidelines. It is not a 2 because the 'what' is specific and multi-faceted rather than vague.

3 / 5

Trigger Term Quality

Natural keywords users would say are present ("数据库迁移", "模式变更", "回滚", "零停机部署") alongside tool names (PostgreSQL, MySQL, Prisma, Drizzle, Django, TypeORM, golang-migrate). A few common variations are missing (e.g., 'schema migration', 'backfill', 'ALTER TABLE'), keeping it below the comprehensive synonym coverage of a 5.

4 / 5

Distinctiveness Conflict Risk

It carves out a clear niche (production database migrations with named ORMs and databases) with distinct triggers, giving minimal conflict risk with other skills. The named tools make it far more distinct than the 'minor overlap risk' of a 4.

5 / 5

Total

16

/

20

Passed

Validation

93%

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

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

15

/

16

Passed

Repository

xu-xiang/everything-claude-code-zh

Path

docs/zh-CN/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.