agentsclimarketplace

Sql to osc

Skill bg-szy/TOP-SKILLS/skills/marketplace/sql-to-osc

全球最大的 Claude Code 技能聚合库 · 收录 3900+ 来自 12+ 来源的技能,提供在线搜索与趋势分析看板 / The world's largest Claude Code skill aggregation hub — 3900+ skills from 12+ sources with online search and trend dashboard

Install
npx -y skills add bg-szy/TOP-SKILLS --skill sql-to-osc

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

2.1 KB, 546 tokens by cl100k_base, as published. Nobody here has run it

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};

SQLOSC
USE db;Remove (db in column 1)
ALTER TABLE tblRemove (tbl in column 2)
NULLDEFAULT NULL
CREATE INDEX idx ON tbl (col)ADD INDEX idx (col)
varcharVARCHAR
Multiple operationsComma-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 NULLDEFAULT NULL
    • Convert CREATE INDEX...ON tableADD 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}

What ships with it: 1 file

25.3 KB alongside SKILL.md

Gives 0 of the 12 instructions most databases sql skills give in 546 tokens

Counted across 589 of the 662 authors here whose files we hold, read 2026-08-07

  • use parameterized queriesin 37 of 589, across 34 files
  • use timestamptz for timestampsin 30 of 589, across 14 files
  • index foreign keysin 29 of 589, across 18 files
  • create indexes concurrentlyin 29 of 589, across 24 files
  • use numeric type for moneyin 25 of 589, across 8 files
  • use cursor pagination instead of offsetin 24 of 589, across 17 files
  • select only required columnsin 24 of 589, across 20 files
  • add indexes manually on foreign key columnsin 22 of 589, across 12 files
  • normalize to third normal formin 19 of 589, across 10 files
  • configure connection poolingin 19 of 589, across 17 files
  • put equality columns before range columns in indexesin 18 of 589, across 10 files
  • read individual rule files for detailed explanationsin 18 of 589, across 4 files

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.