Skip to content
Development
Skill

/sql-to-osc

SQL to OSC (Online Schema Change) conversion expert for Flyway migration scripts. Use when: (1) Converting SQL migration files to OSC format, (2) User mentions "OSC", "轉換 OSC", "osc.txt", or "Online Schema Change", (3) Working with Flyway ALTER TABLE/CREATE INDEX statements that

From plugin
claude-plugin-marketplace
295 skills18 agents14 commands

Claude Code

$ npx -y skills add DennisLiuCk/claude-plugin-marketplace --skill sql-to-osc --agent claude-code

SKILL.md

sql-to-osc.SKILL.md
name: sql-to-osc
description: |
  SQL to OSC (Online Schema Change) conversion expert for Flyway migration scripts.
  Use when: (1) Converting SQL migration files to OSC format, (2) User mentions "OSC", "轉換 OSC", "osc.txt", or "Online Schema Change", (3) Working with Flyway ALTER TABLE/CREATE INDEX statements that need OSC conversion.

SQL to OSC Conversion Expert

Convert Flyway SQL migration scripts to OSC format following project conventions.

Quick Reference

**OSC Format:** `{database}<TAB>{table}<TAB>{operations};`

| SQL | OSC | |-----|-----| | `USE db;` | Remove (db in column 1) | | `ALTER TABLE tbl` | Remove (tbl in column 2) | | `NULL` | `DEFAULT NULL` | | `CREATE INDEX idx ON tbl (col)` | `ADD INDEX idx (col)` | | `varchar` | `VARCHAR` | | Multiple operations | Comma-joined, no space |

Conversion Workflow

1. **Read source SQL** from `src/main/resources/db/migration/` 2. **Parse statements**: Extract database, table, operations 3. **Transform**:

  • Remove `USE` and `ALTER TABLE` wrappers
  • Convert `NULL` → `DEFAULT NULL`
  • Convert `CREATE INDEX...ON table` → `ADD INDEX...`
  • Uppercase data types

4. **Format output**: `{db}\t{table}\t{op1},{op2},...;` 5. **Write to** `src/main/resources/db/osc/osc-{YYYYMMDD}.txt` (e.g., `osc-20251212.txt`)

Output Requirements

  • **Encoding**: UTF-8 (no BOM)
  • **Line ending**: LF (`\n`)
  • **Separator**: TAB (`\t`) between columns
  • **Operations**: Comma (`,`) joined, NO space after comma
  • **Line ending**: Semicolon (`;`)

Example

**Input** (`V1.0__alter_my_table.sql`):

USE mydb;

ALTER TABLE MY_TABLE
    ADD COLUMN NEW_COL bigint(20) NULL AFTER EXISTING_COL;

CREATE INDEX MY_TABLE_NEW_COL_IDX ON MY_TABLE (NEW_COL);

**Output** (`osc-{YYYYMMDD}.txt`):

mydb	MY_TABLE	ADD COLUMN NEW_COL BIGINT(20) DEFAULT NULL AFTER EXISTING_COL,ADD INDEX MY_TABLE_NEW_COL_IDX (NEW_COL);

Conversion Summary Template

✓ 轉換完成

來源: {source_file}
輸出: src/main/resources/db/osc/osc-{YYYYMMDD}.txt

影響資料表: {tables}
操作統計:
  - ADD COLUMN: {count}
  - ADD INDEX: {count}
  - MODIFY COLUMN: {count}
Read more
@dennisliuck
Ships withclaude-plugin-marketplace

專為繁體中文使用者設計的 Claude Code 插件集合,提供開發、生產力、安全與學習等工具。

295 skills18 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
29
Star history of DennisLiuCk/claude-plugin-marketplace on GitHub, a chart by star-history.com

Other skills on claude-plugin-marketplace.

claude-opus-4-5-migration

claude-opus-4-5-migrat…

將提示詞和程式碼從 Claude Sonnet 4.0、Sonnet 4.5 或 Opus 4.1 遷移至 Opus 4.5。當使用者想要更新其程式碼庫、提示詞或 API 呼叫以使用 Opus 4.5 時使用。處理模型字串更新和針對已知 Opus 4.5…

frontend-design

frontend-design

創建具有高設計質量的獨特、生產級別的前端界面。當用戶要求構建網頁組件、頁面或應用程式時使用此技能。生成有創意、精緻的代碼,避免通用的 AI 美學。

issue-review

issue-review

系統化的問題分析專家技能,自動協調五個專門代理進行深度問題分析。 適用於: - 使用者或 PM 報告的線上問題 - 開發團隊反映的技術問題 - 測試發現的 bug - 生產環境告警和異常

skill-creator

skill-creator

建立新技能、修改和改進現有技能、衡量技能效能。當使用者想要從零開始建立技能、編輯或優化現有技能、執行評估測試、進行基準測試效能分析、或優化技能描述以提升觸發準確度時使用此技能。請確保在使用者提到建立技能、撰寫 skill、skill…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about sql-to-osc.

Which coding agents can use sql-to-osc?
sql-to-osc installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.