一键导入
flyway-or-liquibase-detection
Auto-detect the project's DB migration tool and follow its conventions. Never use both. Use when designing or writing a schema change.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Auto-detect the project's DB migration tool and follow its conventions. Never use both. Use when designing or writing a schema change.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Strict red/green/refactor/simplify discipline for the `/build <task-id>` command. Use when implementing any task in Phase 4. The agent must NOT write production code without a failing test recorded in `.tdd-state.json`.
Strict red/green/refactor/simplify discipline for the `/build <task-id>` command. Use when implementing any task in Phase 4. The agent must NOT write production code without a failing test recorded in `.tdd-state.json`.
Strict red/green/refactor/simplify discipline for the `/build <task-id>` command. Use when implementing any task in Phase 4. The agent must NOT write production code without a failing test recorded in `.tdd-state.json`.
JUnit 5 + Spring Boot 4 test slice patterns and Testcontainers integration test patterns with `@ServiceConnection`. Use when writing or reviewing any test, especially when choosing between unit / slice / integration scope.
Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles), testing, or CLI tooling.
Apply clarity-over-cleverness rewrites — prefer code a junior engineer can read at a glance over compact-but-clever code. Use during `/build`'s simplify step and during `/code-simplify` (alias "simplify the code"). Never weakens behavior; suite must remain green.
| name | flyway-or-liquibase-detection |
| description | Auto-detect the project's DB migration tool and follow its conventions. Never use both. Use when designing or writing a schema change. |
.github/scripts/detect-stack.sh reports one of:
flyway — flyway-core in pom.xml AND src/main/resources/db/migration/ exists.liquibase — liquibase-core in pom.xml AND src/main/resources/db/changelog/ exists.none — neither.both — fatal. Refuse to proceed; ask the user to remove one.Record the result in 03-design.md under ### Inputs from detect-stack.sh.
src/main/resources/db/migration/V{version}__{description}.sqlV1__init.sql, V2__add_gift_card_table.sql, V3__add_index_gift_card_code.sqlR__view_active_orders.sql.## Rollback section in 03-design.md.-- V12__add_gift_card_table.sql
CREATE TABLE gift_card (
id UUID PRIMARY KEY,
code VARCHAR(64) NOT NULL UNIQUE,
balance NUMERIC(12,2) NOT NULL CHECK (balance >= 0),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX ix_gift_card_code ON gift_card(code);
src/main/resources/db/changelog/db.changelog-master.yamldb/changelog/changes/2026-04-18-gift-card.yaml<include file="changes/2026-04-18-gift-card.yaml"/>.id, author, and is immutable once merged.databaseChangeLog:
- changeSet:
id: gift-card-1
author: spring-implementer
changes:
- createTable:
tableName: gift_card
columns:
- column: { name: id, type: UUID, constraints: { primaryKey: true } }
- column: { name: code, type: VARCHAR(64), constraints: { nullable: false, unique: true } }
- column: { name: balance, type: NUMERIC(12,2), constraints: { nullable: false } }
- column: { name: created_at, type: TIMESTAMPTZ, defaultValueComputed: now() }
MigrationsIT runs flyway:info (or liquibase status) at the latest version and asserts no pending migrations.Flyway.repair() in code paths.DROP TABLE without an ADR.both is fatal).