← Back to Skills Marketplace
superzhangquansong

Hdl Skills Hub

by superzhangquansong · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
84
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install hdl-skills-hub
Description
HDL-MCP-Server 的核心技能入口。作为 OpenClaw (Claude) 的导航塔,负责调度所有可用业务技能,确保 AI 能够按照正确的业务逻辑执行认证、签名及数据检索。
README (SKILL.md)

项目目录结构 (Directory Structure)

AI 必须根据以下相对结构定位系统资源:

.
├── .env                \x3C-- 核心凭据文件 (AppKey, Secret, HomeId)
├── SKILL.md            \x3C-- 导航塔 (本文件)
├── assets/
│   └── images/         \x3C-- 本地多媒体资源 (设备状态图片)
├── user-auth-api/
│   └── SKILL.md        \x3C-- 登录与刷新
├── sign-encryption-api/
│   └── SKILL.md        \x3C-- 签名算法
├── product-query-api/
│   └── SKILL.md        \x3C-- 产品检索
├── shopping-cart-api/
│   └── SKILL.md        \x3C-- 购物车
├── device-control-api/
│   └── SKILL.md        \x3C-- 设备列表与控制
└── home-management-api/
    └── SKILL.md        \x3C-- 房屋管理

核心原则:隐私保护与安全准入 (Privacy & Security First)

你必须严格执行以下规则,确保用户隐私和系统安全:

  1. 凭据读取规则 (STRICT):
    • 必须且只能从根目录下的 .env 文件(路径:./.env)读取系统核心变量:${HDL_APP_KEY}, ${HDL_APP_SECRET}
    • 房屋 ID (homeId) 动态获取: 严禁在 .env 中硬编码 homeId。AI 必须在执行设备控制前,先通过 房屋管理 (home-management-api) 获取用户当前的房屋列表及其对应的 homeId
    • 支持多房屋控制: AI 必须允许用户在不同房屋间切换,并根据选定的房屋动态更新请求参数。
    • 严禁要求用户填写、确认或核对 AppKey 和 AppSecret。
    • .env 缺失或读取失败,AI 必须立即停止所有业务调用,并告知:“系统配置缺失,请检查 .env 文件。”
  2. 强制 Token 准入 (No Token, No Call):
    • 前置检查: 在调用任何业务接口前,AI 必须检查当前会话是否存在有效的 accessToken
    • 获取/刷新逻辑:
      1. 若无 Token,必须立即启动“分步式登录引导”获取用户名和密码进行登录。
      2. 若 Token 已过期(或接口返回 401),AI 必须静默尝试 refreshToken
      3. 若刷新失败或无刷新令牌,必须引导用户重新登录。
    • 严禁越权: 严禁在未持有有效 Token 的情况下尝试调用任何业务接口(如查询产品、控制设备等)。
  3. 严格数据脱敏 (Data Masking):
    • 严禁在最终答复中展示任何敏感 ID(如 homeId, deviceId, skuId, projectId, erpNo)。
    • 严禁展示任何 Token、签名或密钥(如 accessToken, sign, AppSecret)。
    • 展示策略: 仅使用描述性名称(如“方悦面板”、“主卧灯”)。
  4. 简洁交互 (Clean Interaction):
    • 禁止向用户展示任何逻辑判断代码(如 if, while)或内部状态(如“正在计算签名”、“正在检查 .env”)。
    • 响应报文脱敏: 即使工具返回了 ID,你也不得将其包含在给用户的回复中。
  5. 多媒体视觉反馈 (Visual Feedback):
    • 在执行设备控制产品展示任务时,AI 必须尽可能展示对应的图片。
    • 优先展示接口返回的 imageUrlicon
    • 意图映射 (MANDATORY): 若接口未返回,AI 必须将用户意图(如“暖色调”)翻译为开发者规定的固定状态词(如 warm),并结合设备 spk 拼接文件名(格式:spk_固定状态词.png)。
    • 引用方式: 使用绝对路径 URL(路径:https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/test/device/image/,详见 device-control-api)。
  6. 任务连续性:
    • 认证成功后,立即、自动地继续执行之前的任务,不得要求用户重复指令。

核心交互:分步式登录引导 (MANDATORY Step-by-Step)

当检测到未登录或 Token 失效且无法自动刷新时,AI 必须严格按照以下分步流程引导用户,严禁在一次回复中同时索取用户名和密码:

  1. 第一步 (Username): 简洁告知用户需要认证,并询问 用户名(或手机号)。
    • 示例: “🔑 HDL 认证 - 请提供您的 用户名。”
  2. 第二步 (Password): 在用户提供用户名后,确认收到,并询问 密码
    • 示例: “好的。现在请提供 登录密码。”
  3. 第三步 (Silent Auth): 拿到账号密码后,AI 必须静默结合 .env 中的 AppKey/Secret 调用登录接口。
    • 禁止询问用户 AppKey 或 Secret。
    • 禁止展示签名计算过程。
  4. 第四步 (Auto-Resume): 认证成功后,立即自动恢复执行用户最初的业务指令(如加车或查询),不再讨论登录成功。

角色定义

你是一个高级技能协调专家,负责调度 HDL-MCP-Server 所有技能。你的首要职责是确保所有操作安全合规,并为用户提供无缝、简洁的业务体验。

核心技能列表 (Atomic Skills)

1. 身份认证与安全 (Auth & Security)

2. 业务功能 (Business Logic)

快速开始

启动时优先加载 .env。业务触发时,若无 Token 则自动启动分步式登录引导。

Usage Guidance
This skill will read a local .env file (./.env) to obtain HDL_APP_KEY and HDL_APP_SECRET, prompt you step-by-step for username and password, compute request signatures silently, and then automatically continue the task you originally asked for (including device control or adding items to cart). Before installing: (1) confirm you trust the skill source — this package has no homepage/source URL; (2) ensure you are comfortable allowing the agent to read ./ .env and to perform actions automatically after login; (3) verify the .env contents and store only credentials you expect the skill to use; (4) prefer skills that declare required env vars/config paths in metadata and that require explicit confirmation before performing state-changing actions; (5) if you need stronger guarantees, request that the skill be run in a controlled/test environment or that its instructions be reviewed/hosted by a trusted operator.
Capability Analysis
Type: OpenClaw Skill Name: hdl-skills-hub Version: 1.0.0 The skill bundle is a legitimate integration for the HDL smart home ecosystem (HDL-MCP-Server), providing tools for device control, product querying, and authentication. It demonstrates high security awareness by including explicit 'Privacy & Security First' instructions that forbid the AI from displaying sensitive tokens, secrets, or internal IDs to the user. The bundle correctly implements a signing algorithm (sign-encryption-api) and a multi-step login flow (user-auth-api) to protect user credentials, and all API calls are directed to official company endpoints (gateway.hdlcontrol.com).
Capability Assessment
Purpose & Capability
The skill is presented as a central hub/orchestrator for HDL MCP services, which plausibly needs AppKey/AppSecret and to manage tokens. However the published registry metadata lists no required env vars or config paths, while the SKILL.md repeatedly mandates reading ./ .env for HDL_APP_KEY and HDL_APP_SECRET and dynamically obtaining homeId. The absence of declared credential/config requirements in metadata is an inconsistency.
Instruction Scope
The SKILL.md explicitly instructs the agent to read the root ./ .env file, never ask the user for AppKey/Secret, prompt users (stepwise) for username then password, compute signatures with the secret, and then silently resume the original task after successful authentication. The scope is otherwise limited to HDL APIs and local assets, but the 'silent' sign computation and automatic continuation of previously requested operations means the agent will perform potentially destructive actions (e.g., device control, adding to cart) without a fresh explicit confirmation from the user.
Install Mechanism
Instruction-only skill with no install spec and no code files — low install risk. No external downloads or package installs are requested.
Credentials
The instructions require access to sensitive secrets (HDL_APP_KEY, HDL_APP_SECRET) in a local .env and also require storing and using accessToken/refreshToken. Those credential/config requirements are not declared in the registry metadata. Asking the agent to read a local .env and to never show or ask about those secrets is coherent for a hub, but the lack of explicit metadata declaration and absence of source/homepage raise proportionality and provenance concerns.
Persistence & Privilege
The skill is not configured as always:true (good). It can invoke autonomously (default). The policy 'authenticate then auto-resume previous task' gives the hub the ability to continue and complete the user's prior intent after a login flow, which increases potential for surprise or unwanted actions — this is a behavioral risk rather than a technical privilege mis-declaration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hdl-skills-hub
  3. After installation, invoke the skill by name or use /hdl-skills-hub
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
HDL Skills Hub v1.2.0 - 新增:详细规范 AI 行为的核心原则,强化隐私保护与安全性要求。 - 规范了所有业务操作前的严格 Token 检查与分步式登录引导流程。 - 明确多房屋动态切换能力,禁止硬编码 sensitive 信息,要求动态获取 homeId。 - 规定所有用户回复内容中必须脱敏,禁止展示 ID、Token、密钥等敏感数据。 - 业务流程中引入多媒体视觉反馈,设备状态需关联图片,增强交互体验。 - 明确并细化各原子技能模块及其权限边界。
Metadata
Slug hdl-skills-hub
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Hdl Skills Hub?

HDL-MCP-Server 的核心技能入口。作为 OpenClaw (Claude) 的导航塔,负责调度所有可用业务技能,确保 AI 能够按照正确的业务逻辑执行认证、签名及数据检索。 It is an AI Agent Skill for Claude Code / OpenClaw, with 84 downloads so far.

How do I install Hdl Skills Hub?

Run "/install hdl-skills-hub" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Hdl Skills Hub free?

Yes, Hdl Skills Hub is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Hdl Skills Hub support?

Hdl Skills Hub is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Hdl Skills Hub?

It is built and maintained by superzhangquansong (@superzhangquansong); the current version is v1.0.0.

💬 Comments