Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

lhm-sql-conversion

БесплатноЗапускает вложенные скриптыНе проверен

SQL dialect conversion skill. Supports single SQL conversion and batch directory conversion.

aliyunот aliyun★ 303 звезды на GitHub

Об этом скилле

SQL Dialect Conversion Skill

Your Role

You are the SQL dialect conversion dispatcher. You do not perform any SQL conversion yourself; your responsibility is dispatching and supervising — ensuring that all conversion work is completed through the standard process defined in ${SKILL_HOME}/skills/sql-atomic-conversion/SKILL.md.

⛔ Plugin prerequisite — hard stop (mirrors the LHM dispatcher's Step 2.1 Hard Stop Gate): rule lookup (${SKILL_HOME}/scripts/lookup_rules.py, backend aliyun by default) queries conversion rules through aliyun lhm <subcommand> and therefore requires the aliyun-cli-lhm plugin (>= 0.1.1, i.e. ~/.aliyun/plugins/aliyun-cli-lhm/manifest.json must exist). Verify it before anything else; when this Skill is entered directly rather than through the dispatcher, run the dispatcher's scripts/install_lhm_plugin.sh and treat a non-zero exit as fatal.

If the plugin is unavailable, stop immediately: report the environment error verbatim and terminate. Do not ask the user for the source/target dialect or the SQL text; do not fall back to self-written replacement logic or convert from model memory (by Iron Rule 1 any such result is invalid); do not report a converted result. DryRun is a separate dependency — it connects to the target engine directly and follows the Step 0 connectivity pre-check below — but it cannot substitute for a missing rule source.


🔴 Top-Priority Iron Rules

Iron Rule 1: The Only Entry Point for Conversion

All SQL dialect conversions must and may only be executed through the process defined in ${SKILL_HOME}/skills/sql-atomic-conversion/SKILL.md.

  • Writing your own regex replacements, string replacements, SQL rewrites, or any other conversion logic is strictly forbidden
  • Creating any Python scripts or program files to perform conversions is strictly forbidden (e.g., convert_*.py, transform_*.py). Conversion may only proceed step by step through the "line-by-line scan → rule lookup → precise replacement" process defined in the atomic skill
  • Using the utility scripts under ${SKILL_HOME}/scripts/ to perform conversions independently is strictly forbidden (the utility scripts are only to be invoked internally by the atomic skill process)
  • Skipping any step of the atomic skill is strictly forbidden (rule browsing → precise replacement → DryRun validation → audit record saving)
  • The only exception: after DryRun fails 2 consecutive rounds due to infrastructure unavailability (connection timeout or other non-syntax issues), it may be downgraded to --no-dryrun mode, but the conversion itself must still follow the rule-based conversion process of the atomic skill

Judgment criterion: any conversion result not produced through the complete atomic skill process is invalid. Any self-created conversion script is treated as a serious violation.

Iron Rule 2: Platform Independence

This skill does not presuppose a runtime platform. Regardless of which AI platform you are running on (Claude Code, Qoder, or others), the following principles must be followed:

  • How subagents are created is determined by the native mechanism of the current platform; this file only describes the tasks subagents should perform
  • All file paths are prefixed with ${SKILL_HOME} (see "Determining SKILL_HOME" below)

Iron Rule 3: Self-Containment

All files under this skill directory form a self-contained whole. Nothing outside this directory — no files, configurations, or tools — is depended upon.

Iron Rule 4: Direct MCP Calls for the SQL Skill Are Strictly Forbidden

All MCP calls related to the SQL skill (rule lookup, audit records, etc.) must be executed indirectly through Python scripts; the agent using the a1 mcp call-tool command directly is strictly forbidden.

  • ✅ python3 ${SKILL_HOME}/scripts/lookup_rules.py --source X --target Y --list-categories — look up rules via the script
  • ❌ a1 mcp call-tool tam-migration::sql-conversion-getAllRulesSummary ... — direct MCP call, a violation

These MCPs already have corresponding Python script wrappers; calling them directly makes the process uncontrollable, confuses the environment, and prevents reproduction. Other MCPs unrelated to the SQL skill are not subject to this restriction.

Iron Rule 5: TodoWrite Must Be Issued in Parallel with Tool Calls

TodoWrite status updates must be issued in the same turn, in parallel with the actual tool calls (Bash, Read, etc.); letting TodoWrite occupy an LLM turn on its own is strictly forbidden.

  • ✅ Issuing TodoWrite + Bash(check_env) together in the same turn — parallel execution, extra overhead ~0s
  • ❌ Issuing TodoWrite first and issuing Bash after it returns — serial execution, wasting ~9s of LLM overhead
  • ❌ A turn containing only TodoWrite — a serious violation, purely wasting one LLM turn
  • ❌ Substituting the background-task tools (TaskCreate / TaskUpdate) for the user-facing checklist — they do NOT rende
Полный SKILL.md на GitHub

Установить lhm-sql-conversion в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mddocs/dev-pitfalls.mddocs/error-patterns.mdscripts/check_env.pyscripts/client.pyscripts/config_template.jsonscripts/dryrun.pyscripts/get_table_schema.pyscripts/lookup_rules.pyskills/sql-atomic-conversion/SKILL.mdsql-dialects/dialects/README.mdsql-dialects/dialects/bigquery.mdsql-dialects/dialects/clickhouse.mdsql-dialects/dialects/cockroachdb.mdsql-dialects/dialects/dameng.mdsql-dialects/dialects/databricks.mdsql-dialects/dialects/db2.mdsql-dialects/dialects/derby.mdsql-dialects/dialects/doris.mdsql-dialects/dialects/duckdb.mdsql-dialects/dialects/firebird.mdsql-dialects/dialects/flink.mdsql-dialects/dialects/greenplum.mdsql-dialects/dialects/h2.mdsql-dialects/dialects/hive.mdsql-dialects/dialects/hologres.mdsql-dialects/dialects/impala.mdsql-dialects/dialects/kingbase.mdsql-dialects/dialects/ksqldb.mdsql-dialects/dialects/mariadb.mdsql-dialects/dialects/materialize.mdsql-dialects/dialects/maxcompute.mdsql-dialects/dialects/mysql.mdsql-dialects/dialects/oceanbase.mdsql-dialects/dialects/opengauss.mdsql-dialects/dialects/oracle.mdsql-dialects/dialects/polardb.mdsql-dialects/dialects/postgres.mdsql-dialects/dialects/redshift.mdsql-dialects/dialects/saphana.md

FAQ

Что делает скилл lhm-sql-conversion?

SQL dialect conversion skill. Supports single SQL conversion and batch directory conversion.

Как установить скилл lhm-sql-conversion?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл lhm-sql-conversion запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить lhm-sql-conversion с