AgentSkillsCN

sync-db-schema-from-code

通过 Prisma 迁移,将来自仓库 SSOT(prisma/schema.prisma)的 Schema 变更应用至目标数据库,并在迁移过程中提供差异预览与审批关口;随后刷新 LLM 上下文(docs/context/db/schema.json)。

SKILL.md
--- frontmatter
name: sync-db-schema-from-code
description: Apply schema changes from repo SSOT (prisma/schema.prisma) to a target DB via Prisma migrations, with diff preview + approval gate; then refresh LLM context (docs/context/db/schema.json).
category: workflows/database
ssot_path: .ai/skills/workflows/database/sync-db-schema-from-code

sync-db-schema-from-code (entry)

Canonical source: .ai/skills/workflows/database/sync-db-schema-from-code/

Open .ai/skills/workflows/database/sync-db-schema-from-code/SKILL.md and any supporting files referenced there (for example reference.md, examples.md, scripts/, templates/).

Note: The frontmatter above is identical to the canonical source except for ssot_path and category which are added for navigation. After opening the source file, skip re-reading the description to avoid redundant token usage.