원클릭으로
migration-guard
Review database migration files for naming conventions and dangerous operations. Auto-activates for migration files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review database migration files for naming conventions and dangerous operations. Auto-activates for migration files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Explains code in plain language for someone unfamiliar with the programming language. Use when asked to explain code, walk through logic, describe what a function does, or when the user says "explain this" or "walk me through this".
Summarizes uncommitted git changes in a concise machine-readable format. Use in CI pipelines, scripts, or headless invocations where the output will be piped or captured.
Explains what a skill is and demonstrates that skills are working. Use when testing skills, when asked about skills, or when asked to demonstrate how skills work.
Demonstrates the personal scope for Claude Code skills. Use when testing personal-scoped skills or when the user wants to understand the difference between personal and project skill scopes.
Lists the conventions for this project and demonstrates the project scope for Claude Code skills. Use when asked about project conventions, code style, or as a demonstration of project-scoped skills.
Draft a CHANGELOG.md entry for the current changes in Keep a Changelog format. Use when releasing, tagging a version, or updating CHANGELOG.md.
| title | migration-guard |
| name | migration-guard |
| description | Review database migration files for naming conventions and dangerous operations. Auto-activates for migration files. |
| paths | ["migrations/**","*.sql","db/migrate/**"] |
Review the current migration file for naming conventions, rollback presence, and dangerous operations.
Use the current file context to determine which migration file is being worked on. If the user specified a file path, use that. If the context is ambiguous, ask the user which file to review before proceeding.
Extract the file name (not the full path) and check it against two accepted naming formats:
Format A — Timestamp prefix:
Pattern: YYYYMMDDHHMMSS_description.sql
Example: 20260513143207_add_user_roles.sql
.sqlFormat B — Sequential prefix:
Pattern: NNNN_description.sql
Example: 0042_add_user_roles.sql
.sqlIf the file name matches neither format, mark the naming check as FAIL and note the reason.
Read the file content and look for either:
-- rollback, -- down, -- revert, followed by SQL that undoes the migration)-- This migration is irreversible, -- no rollback)If neither is present, mark rollback as NO.
Read the file and scan for these patterns (case-insensitive):
DROP TABLE without IF EXISTS immediately following — flag as WARNINGDROP TABLE IF EXISTS — acceptable, no warningDELETE FROM without a WHERE clause on the same or next line — flag as WARNINGUPDATE without a WHERE clause on the same or next line — flag as WARNINGTRUNCATE on any table — flag as WARNING (destructive, often irreversible in production)DROP COLUMN — flag as NOTICE (may break dependent code; not always dangerous but requires attention)For each match, note the line number.
Present findings in this format:
Migration review: <filename>
Naming convention: PASS
- Format: timestamp-prefix / sequential-prefix
(or)
Naming convention: FAIL
- Reason: <specific reason>
Rollback: YES / NO / MARKED IRREVERSIBLE
- <brief note on what the rollback does, or why it is marked irreversible>
Dangerous operations: NONE
(or)
Dangerous operations:
WARNING line 14: DELETE without WHERE clause
WARNING line 22: TRUNCATE on orders table
NOTICE line 31: DROP COLUMN — confirm no dependent code references this column
Do not modify the migration file. This skill reviews only.