AgentSkillsCN

migrate-safe

通过受控的脚本化工作流,结合回滚记录与验证机制,应用 Supabase 迁移操作。

SKILL.md
--- frontmatter
name: migrate-safe
description: "Apply Supabase migrations through a guarded, script-backed workflow with rollback notes and verification."
disable-model-invocation: true

/stacklane:migrate-safe

Use the script entrypoint for deterministic safety checks and report artifacts.

Command

bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/stacklane-migrate-safe.sh" --environment staging

Optional Flags

  • --environment <staging|production>
  • --service <name>
  • --confirm-production I_UNDERSTAND_PRODUCTION (required for production)
  • --smoke-command "..."
  • --skip-verify
  • --dry-run

Execution Rules

  1. Parse user arguments and map to script flags.
  2. Never apply to production without --confirm-production I_UNDERSTAND_PRODUCTION.
  3. This command currently requires database=supabase in the active profile.
  4. Do not bypass script preflight checks.
  5. On completion, return paths to:
    • rollback notes in .stacklane/migration-reports/
    • apply report in .stacklane/migration-reports/
  6. If commands.rollback is not configured, return rollback guidance as "not configured" rather than inventing a command.

Boundaries

  • Migration scope only. No deploy in this command.
  • No unrelated app refactors.