lhm-common
БесплатноЗапускает вложенные скриптыНе проверенShared foundation for LHM skills. Provides unified configuration management (data_validation_config.yaml), precondition checks (resource group / service agent…
от aliyun★ 303 звезды на GitHubОб этом скилле
lhm-common — LHM Shared Skill Foundation
Positioning
Shared infrastructure for all LHM skills, replacing the former lhm-preflight-check and lhm-client-builder.
Core capabilities:
- Centralized configuration: Region/resource group/service agent/data sources are stored uniformly in
~/.lhm/data_validation_config.yaml(AK/SK are NOT stored here — they are resolved by the aliyun CLI default credential chain: environment variables / RAM Role /~/.alibabacloud/credentials) - Standardized pre-checks: each business Skill declares a profile, and preconditions are validated automatically before execution
- Human-friendly guidance: the
setupcommand walks the user through the full configuration step by step
Runtime Environment
- Python venv:
~/.qoderwork/skills/data-validation-skill/.venv/bin/python - Dependency:
pyyaml; the network layer requires the aliyun CLI + aliyun-cli-lhm plugin (request models are provided by the localscripts/lhm_models.py, no extra SDK install needed) - Script path:
~/.qoderwork/skills/data-validation-skill/atomic-skills/lhm-common/scripts/run.py
Steps
1. First-Use Guided Setup
When the user asks for help configuring LHM (the Chinese trigger phrases are declared in the frontmatter description) or runs any LHM skill for the first time:
python run.py setup
The output contains a guided structure of 6 steps. Steps 1/2/4 have prompt_fields (ask the user and write the values in); steps 3/5 are console operations (manual_step); step 6 is automatic verification. For each step with prompt_fields, ask the user one by one and write the values with setup-write.
# Write the values provided by the user (AK/SK are not collected; only Region is configured here)
python run.py setup-write '{"api.region":"hangzhou"}'
Each step is written to data_validation_config.yaml immediately after completion, so exiting midway does not lose any filled-in content.
Guidance documents are loaded on demand:
guides/setup-overview.md— first-time configuration overviewguides/resource-group-config.md— detailed steps for resource group configurationguides/agent-config.md— detailed steps for service agent configurationguides/data-source-config.md— data source configuration guide
2. Pre-Execution Check
Before executing any business Skill, run:
python run.py check --profile data-validation
Check the ready field:
true→ the business Skill may proceedfalse→ show thefix_guideof the correspondingblocking_itemsand guide the user to fix them
3. Build the Client
python run.py client # read from data_validation_config.yaml
python run.py client --region singapore # override region
4. Configuration Management
python run.py config list # list all configuration (AK masked)
python run.py config get api.region # read a field
python run.py config set api.region singapore # set a field
python run.py config add-ds --alias mc --ds-id 123 --ds-name "订单库" --ds-type MaxCompute
python run.py config remove-ds --alias mc # remove a data source
python run.py config show --alias mc # view data source details
Profile Definitions
Each business Skill declares the profile it needs:
| Profile | Mandatory checks | Optional checks |
|---|---|---|
data-validation |
cli_environment, api_connectivity, resource_group, agent, data_sources, engine_binding | — |
sql-convert |
cli_environment, api_connectivity | resource_group |
schedule |
cli_environment, api_connectivity | resource_group, data_sources |
Check item implementations:
cli_environment— verify the aliyun CLI binary and the aliyun-cli-lhm plugin manifest are presentapi_connectivity— callGetDataCheckTaskList(page_size=1)to verify reachability (credentials resolved by the aliyun CLI default credential chain)resource_group— callGetLhmDWResourceGroupStatus(region_id)to query the statusagent— callGetLhmAgentStatus(agent_type=1)to query the online statusdata_sources— currently pending_api; only verifies that data source definitions exist in the config fileengine_binding— verify that a validation engine can be determined for data sources that require one
Pitfalls
- The
response.body.dataofGetLhmDWResourceGroupStatusandGetLhmAgentStatusis a plain string (not JSON); compare it directly - Agent status is considered available only when it is
Online; resource group status is considered healthy only when it isNormal - The
checkcommand automatically updates theresource_group.lhm_binding_statusandagent.agent_statuscaches in data_validation_config.yaml - In the output of
config list, access_key_secret is automatically masked (only the first 4 characters shown) - The
data_sourcescheck item currently al
Установить lhm-common в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lhm-common?
Shared foundation for LHM skills. Provides unified configuration management (data_validation_config.yaml), precondition checks (resource group / service agent / data sources / API connectivity), guided configuration (setup), and client building. All LHM business Skills should invoke the check subcommand to verify preconditions before execution. Also triggers when the user asks to configure LHM, e.g. "帮我配置 LHM" (help me configure LHM).
Как установить скилл lhm-common?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lhm-common запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic