Command Palette

Search for a command to run...

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

lhm-sch-ds

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

Agent Playbook for LHM schedule data source management. Guides the user through data source creation, validation, OSS file upload, and connectivity testing…

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

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

LHM Schedule Data Source CLI & Agent Playbook

This Skill is Agent-driven. The lhm-sch-ds CLI exposes stateless single-step commands: each command makes exactly one API call, prints structured JSON status, and exits. There are no loops inside — the Agent is responsible for orchestrating step order, asking the user for decisions, and performing the OSS file upload (via curl). State (parsed configuration, data source name, new ID) is passed explicitly via command-line arguments; the CLI itself persists nothing.

Scope and Termination (Mandatory)

This skill covers data source management only — querying existing data sources, name validation, metadata upload, creation, and connectivity testing. It never plans, executes, or collects parameters for the schedule migration chain (exploration / conversion / deployment).

  • Terminal states: create succeeded; or the user-requested test-conn finished; or an existing data source was selected in Step 4. At a terminal state, report the result and stop.
  • Never solicit migration parameters. Do not ask for a source/target data source name, a SQL dialect conversion expression, or a migration config file path — not as a question, not as a "to continue with the migration ..." trailer on the final message, not as a suggested next step, and not as a fillable template.
  • Never report migration work as pending. Lines such as "exploration / conversion / deployment not executed" are outside this skill's scope and must not appear in its output.
  • Resumption is the caller's decision, not this skill's. When reached from the schedule-migration entry playbook, only that playbook decides whether a migration flow resumes — and it does so solely under the narrow exception in its Capability Selection Rule (migration already running, names already extracted, "data source does not exist" reported). A generic mention of migration in the original user request is not a reason to resume one.
  • Session stage: a data-source-only run prepares its session with setup_session.sh --stage ds, which does not require the migration source/target data source names. Their absence is expected — never treat it as a blocker, and never turn it into a question for the user.
  • One question, one concern. A clarification question asked by this skill may only concern data source parameters.

CLI Usage

Environment Prerequisites

The environment and credentials have already been prepared by lhm-sch-env at session start; this skill performs no environment validation whatsoever. Simply run the business commands — do not run validation scripts, do not run validate, and do not re-confirm credentials or prompt the user about configuration.

⛔ The one exception — the aliyun-cli-lhm plugin (hard stop): every command below reaches the service through aliyun lhm <command>, so the plugin (>= 0.1.1, i.e. ~/.aliyun/plugins/aliyun-cli-lhm/manifest.json exists) must be present. If it is not, stop before Step 0: report the environment error verbatim and terminate.

In particular, do not ask the user for dsName, dsType, or any other business parameter. The clarification rules further below are mandatory only once the plugin is confirmed available — while it is missing, every check / check-name / create / test-conn call is guaranteed to fail, so an answer collected now can never be used. Do not run uv tool install or lhm-sch-ds either: this CLI shells out to aliyun lhm, so a successful install is never proof that the flow can proceed.

Only when a command actually reports an environment-class error (e.g., credentials not found, command not found) should it be handed to lhm-sch-env; when relaying its guidance, never write secrets on behalf of the user, and never echo secret values.

Command Invocation

All commands are executed via lhm-sch-ds <command>.

Status Code & Exit Code Contract

Each single-step command outputs a JSON object with a status field to stdout and exits with an exit code; the Agent branches on them:

status Exit code Meaning Agent action
ok 0 Operation succeeded Use the payload and proceed to the next step
empty 0 check — no same-name data source found Continue with check-name → create
match 0 check — one or more existing data sources found Show matches to the user and ask which one to use
available 0 check-name — the name is available Continue with upload/create
exists 2 check-name — the name is taken or invalid Have the user provide a new name and rerun check-name
failed 2 Unrecoverable business/API error Report err_message and abort
(config error) 1 Missing credentials / invalid config file Fix the environment and retry

Commands

Полный SKILL.md на GitHub

Установить lhm-sch-ds в Claude Code и Claude Desktop

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

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

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

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

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

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

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

API.mddatasourceTemplate/airflow-datasource-template.mddatasourceTemplate/dolphinScheduler-datasource-template.mdinstall.shpyproject.tomlscripts/lhm_ds_cli/__init__.pyscripts/lhm_ds_cli/aliyun_cli.pyscripts/lhm_ds_cli/cli.pyscripts/lhm_ds_cli/client_helper.pyscripts/lhm_ds_cli/config.pyscripts/lhm_ds_cli/credentials.pyscripts/lhm_ds_cli/operations.pyscripts/lhm_ds_cli/validator.pyuninstall.sh

FAQ

Что делает скилл lhm-sch-ds?

Agent Playbook for LHM schedule data source management. Guides the user through data source creation, validation, OSS file upload, and connectivity testing. Triggers: create a data source, add a data source, validate a data source name, upload a metadata file, test connectivity, or any request related to LHM schedule data source management. Do not trigger for: schedule migration tasks, SQL conversion, DDL translation, or other non-data-source-management tasks.

Как установить скилл lhm-sch-ds?

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

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

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

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

Сравнить lhm-sch-ds с