一键导入
db-migration-check
Detect dangerous operations in database migrations before deployment
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Detect dangerous operations in database migrations before deployment
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
DEPRECATED - Use domain-specific skills instead. Routes to bazinga-db-core, bazinga-db-workflow, bazinga-db-agents, or bazinga-db-context.
Task groups and development planning. Use when managing task groups, development plans, or success criteria.
Agent logs, reasoning, and token tracking. Use when logging interactions, saving reasoning, tracking tokens, or managing events.
Validates BAZINGA completion claims with independent verification. Spawned ONLY when PM sends BAZINGA. Acts as final quality gate - verifies test failures, coverage, evidence, and criteria independently. Returns ACCEPT or REJECT verdict.
Build complete agent prompts deterministically via Python script. Use BEFORE spawning any BAZINGA agent (Developer, QA, Tech Lead, PM, etc.).
Context packages and learning patterns. Use when managing context packages, error patterns, or strategies.
| name | db-migration-check |
| description | Detect dangerous operations in database migrations before deployment |
| version | 1.0.0 |
| allowed-tools | ["Bash","Read"] |
You are the db-migration-check skill. When invoked, you analyze database migration files to detect dangerous operations that could cause downtime, data loss, or performance issues.
Invoke this skill when:
Do NOT invoke when:
When invoked:
Use the Bash tool to run the pre-built migration check script:
python3 .claude/skills/db-migration-check/check.py
This script will:
bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.jsonUse the Read tool to read:
bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.json
Extract key information:
status - dangerous_operations_detected/safe/errordangerous_operations - Array of blocking issueswarnings - Medium-risk operationssafe_migrations - Approved operationsrecommendations - Safe alternativesReturn a concise summary to the calling agent:
Database Migration Check:
- Database: {database_type}
- Framework: {framework}
- Migrations analyzed: {count}
⚠️ DANGEROUS OPERATIONS: {count}
- CRITICAL ({count}): {list}
- HIGH ({count}): {list}
Safe migrations: {count}
Top recommendations:
1. {recommendation}
2. {recommendation}
Details saved to: bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.json
Scenario: Dangerous Migration Detected
Input: Tech Lead reviewing migration adding indexed column with default
Expected output:
Database Migration Check:
- Database: postgresql
- Framework: alembic
- Migrations analyzed: 3
⚠️ DANGEROUS OPERATIONS: 2
- CRITICAL (1): ADD COLUMN with DEFAULT locks table (migration_001.py:15)
- HIGH (1): CREATE INDEX without CONCURRENTLY blocks writes (migration_002.py:23)
Safe migrations: 1
Top recommendations:
1. For ADD COLUMN: Add as NULL first, backfill in batches, then add DEFAULT
2. For CREATE INDEX: Use CREATE INDEX CONCURRENTLY to avoid locks
Details saved to: bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.json
Scenario: All Migrations Safe
Input: Tech Lead reviewing well-written migrations
Expected output:
Database Migration Check:
- Database: postgresql
- Framework: django
- Migrations analyzed: 2
✅ No dangerous operations detected
Safe migrations: 2
- migration_001.py: ADD COLUMN (nullable, no default)
- migration_002.py: CREATE INDEX CONCURRENTLY
All migrations follow zero-downtime best practices.
Details saved to: bazinga/artifacts/{SESSION_ID}/skills/db_migration_check.json
If no migrations found:
If database type unknown:
If migration files unreadable: