一键导入
schema-diff
Preview a SQLite schema change and its impact before applying it to a production database
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Preview a SQLite schema change and its impact before applying it to a production database
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run the universal button emulator simulator with preset scenarios for testing elevator integration logic
Pre-flight validation checklist before deploying Accelerate Robotics to production
Scaffold a new Express API route with validation, auth middleware, test, and server.js registration
| name | schema-diff |
| description | Preview a SQLite schema change and its impact before applying it to a production database |
User wants to change src/db/database.js — adding a table, adding a column, changing a constraint — and wants to see the impact before applying it.
Read the current schema from src/db/database.js.
Read the production database schema (if accessible):
sqlite3 data/accelerate.db .schema
Compare the two. Differences mean a past change was made in code that hasn't been applied to the production DB yet.
Read the proposed change the user wants to make.
Print three things:
SELECT COUNT(*) on affected tablesRisk heuristics:
Generate the migration SQL:
CREATE TABLE statementALTER TABLE ... ADD COLUMN statementRemind the user of the backup runbook: docs/50-operations/runbooks/backup-database.md
Do not apply the change. This skill is read-only. The user makes the decision.
Schema Change Preview
---------------------
Current: src/db/database.js (N tables)
Proposed: + adds column `foo` to `inquiries`
Diff:
inquiries:
+ foo TEXT DEFAULT NULL
Rows affected:
inquiries: 142 rows (will get NULL foo)
Risk: LOW
New nullable column, no constraints, no data transformation.
Migration SQL:
ALTER TABLE inquiries ADD COLUMN foo TEXT;
Reminder: back up the production DB before applying.
See docs/50-operations/runbooks/backup-database.md