lhm-report-diagnose
БесплатноЗапускает вложенные скриптыНе проверенDiagnoses the failed tables and fields in an LHM data validation batch and outputs structured diagnosis results.
от aliyun★ 303 звезды на GitHubОб этом скилле
lhm-report-diagnose
Diagnoses the details of failed tables and fields in a specified LHM data validation batch. Supports two output forms: grouped by field or a flat list.
Steps
- Read the command-line arguments: batch ID, output grouping mode, and region.
- Before execution, run
lhm-common check --profile data-validationfirst to confirm the preconditions are met. - Call
build_client_from_config()to build the LHM client (the network layer goes through the aliyun CLI, read from data_validation_config.yaml, with CLI arguments taking precedence). - Redirect
sys.stdouttoio.StringIO, calldiagnose_failed()to obtain the diagnosis results, then restore stdout. - Output JSON:
{"ok": true, "diagnosis": [...] or {...}}.
Pitfalls
- Not redirecting stdout pollutes the JSON: although
diagnose_failed()does not print directly, stdout must be redirected to strictly guarantee that external systems can parse the output. - Confusing batch_id with task_id: the diagnosis interface must use
batch_id; do not passtask_id. - Credentials: resolved through the default credential chain (environment variables / RAM Role /
~/.alibabacloud/credentials); the script never accepts AK/SK as command-line arguments. - Semantics of group_by_field: defaults to
False, returning a flat list; when set toTrue, results are grouped by table → field, which is convenient for aggregating and viewing differences.
Verification
python -m py_compile atomic-skills/lhm-report-diagnose/scripts/run.pypasses.- After running the script, stdout is valid JSON and contains JSON content only.
- When credentials are missing or the
batch_iddoes not exist, stderr outputs{"ok": false, "error": "..."}and exit(1).
Input/Output Examples
python atomic-skills/lhm-report-diagnose/scripts/run.py \
--batch-id 12345 \
--region hangzhou
Output (flat list):
{
"ok": true,
"diagnosis": [
{
"table": "src_db.orders",
"type": "STEP",
"detail": {
"src_count": 1000,
"dst_count": 999,
"is_consistent": 0
}
}
]
}
Grouped by field:
python atomic-skills/lhm-report-diagnose/scripts/run.py \
--batch-id 12345 \
--group-by-field \
--region hangzhou
Output:
{
"ok": true,
"diagnosis": {
"src_db.orders": {
"summary": {"total": 1, "pass": 0, "fail": 1},
"steps": [...],
"columns": {
"amount": {"pass": 0, "fail": 1, "metrics": [...]}
}
}
}
}
Установить lhm-report-diagnose в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lhm-report-diagnose?
Diagnoses the failed tables and fields in an LHM data validation batch and outputs structured diagnosis results.
Как установить скилл lhm-report-diagnose?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lhm-report-diagnose запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic