huawei-cloud-find-skills

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
[!IMPORTANT] For any Huawei Cloud query or management task:
  1. Search — use this skill (
    huawei-cloud-find-skills
    ) to find the relevant Skill.
  2. Install — install the matched Skill (see Step 3).
  3. Execute — follow the installed Skill's instructions to fulfill the request.
[!IMPORTANT] 针对任何华为云查询或管理任务:
  1. 搜索 — 使用本Skill(
    huawei-cloud-find-skills
    )查找相关Skill。
  2. 安装 — 安装匹配的Skill(参见步骤3)。
  3. 执行 — 按照已安装Skill的说明完成请求。

Overview

概述

This skill enables users to efficiently search, discover, and install Huawei Cloud skills.
本Skill能帮助用户高效搜索、发现并安装华为云Skill。

Scenario Description

场景说明

This skill enables users to:
  • Search Skills: Find skills by keyword, category, or both (matched against name, description, and triggers)
  • Browse Categories: Explore available skill categories
  • View Skill Details: Fetch full SKILL.md content from GitHub for specific skills
  • Install Skills: Guide users through skill installation via
    npx skills add
    (GitCode default),
    npx clawhub install
    , or fallback GitHub method
Architecture: GitCode API v5 (
index.json
+
cn-en-map.json
) → HTTP GET (base64 decode) → In-memory search → GitHub raw fetch for details → Install
本Skill支持用户:
  • 搜索Skill:通过关键词、类目或两者结合(匹配名称、描述和触发词)查找Skill
  • 浏览类目:探索可用的Skill类目
  • 查看Skill详情:从GitHub获取特定Skill的完整SKILL.md内容
  • 安装Skill:引导用户通过
    npx skills add
    (默认GitCode方式)、
    npx clawhub install
    或备用GitHub方法安装Skill
架构:GitCode API v5(
index.json
+
cn-en-map.json
)→ HTTP GET(base64解码)→ 内存搜索 → GitHub原始内容获取详情 → 安装

Use Cases

使用案例

  • "Find a skill for managing ECS instances"
  • "What Huawei Cloud skills are available for OBS?"
  • "华为云有哪些 VPC 相关的 skill?"
  • "Browse all available Huawei Cloud skills"
  • "Install a skill for RDS management"
  • "帮我找一个华为云网络相关的skill"
  • "Find a skill for managing ECS instances"
  • "What Huawei Cloud skills are available for OBS?"
  • "华为云有哪些 VPC 相关的 skill?"
  • "Browse all available Huawei Cloud skills"
  • "Install a skill for RDS management"
  • "帮我找一个华为云网络相关的skill"

Prerequisites

前提条件

  • Python 3.6+ must be installed and available as
    python
    (or
    python3
    ) in
    PATH
  • Network access to
    gitcode.com
    (API v5 for index) and
    github.com
    /
    raw.githubusercontent.com
    (for skill details)
  • 必须安装Python 3.6+,且在
    PATH
    中可通过
    python
    (或
    python3
    )调用
  • 能够访问
    gitcode.com
    (用于获取索引的API v5)和
    github.com
    /
    raw.githubusercontent.com
    (用于获取Skill详情)

Step 0: Check Python Environment

步骤0:检查Python环境

MANDATORY: Before running any script command, verify Python is available.
bash
undefined
必填:运行任何脚本命令前,请确认Python可用。
bash
undefined

Check Python availability

检查Python是否可用

python --version # or: python3 --version

If the command fails or returns Python 2.x:

1. **Install Python 3**: Download from [python.org](https://www.python.org/downloads/) or use a package manager:
   ```bash
   # macOS
   brew install python3
   # Ubuntu/Debian
   sudo apt-get install python3
   # Windows — download installer from python.org, check "Add Python to PATH"
  1. Verify after install: Run
    python --version
    again to confirm Python 3.6+ is available
  2. If
    python
    points to Python 2
    : Use
    python3
    instead of
    python
    in all commands below
python --version # 或:python3 --version

如果命令失败或返回Python 2.x:

1. **安装Python 3**:从[python.org](https://www.python.org/downloads/)下载或使用包管理器:
   ```bash
   # macOS
   brew install python3
   # Ubuntu/Debian
   sudo apt-get install python3
   # Windows — 从python.org下载安装程序,勾选"Add Python to PATH"
  1. 安装后验证:再次运行
    python --version
    确认Python 3.6+可用
  2. 如果
    python
    指向Python 2
    :在以下所有命令中使用
    python3
    替代
    python

Repository Info

仓库信息

INDEX_REPO=2501_91318609/skills-for-index
INDEX_BRANCH=main
SKILLS_REPO=huaweicloud/huaweicloud-skills
SKILLS_BRANCH=master
RAW_BASE=https://raw.githubusercontent.com/$SKILLS_REPO/$SKILLS_BRANCH
INDEX_REPO=2501_91318609/skills-for-index
INDEX_BRANCH=main
SKILLS_REPO=huaweicloud/huaweicloud-skills
SKILLS_BRANCH=master
RAW_BASE=https://raw.githubusercontent.com/$SKILLS_REPO/$SKILLS_BRANCH

Index Source

索引来源

The search script fetches the skill index from GitCode API v5 via HTTP GET (base64 auto-decoded):
SKILLS_INDEX_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main
SKILLS_CN_EN_MAP_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main
搜索脚本通过HTTP GET从GitCode API v5获取Skill索引(自动base64解码):
SKILLS_INDEX_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main
SKILLS_CN_EN_MAP_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main

Core Workflow and Core Commands

核心工作流与核心命令

Step 1: Search Skills

步骤1:搜索Skill

MANDATORY: The agent MUST execute the search script to search the skill index. Do NOT read the JSON file directly — always use the script.
Given
keyword
(from AI-understood user intent) and optional
category
, run the search script:
powershell
undefined
必填:Agent必须执行搜索脚本以搜索Skill索引。请勿直接读取JSON文件 — 务必使用脚本。
根据
keyword
(AI理解的用户意图)和可选的
category
,运行搜索脚本:
powershell
undefined

PowerShell

PowerShell

python scripts/search-skills.py -k "<keyword>" python scripts/search-skills.py -k "<keyword>" -c "<category>" python scripts/search-skills.py -c "<category>"

```bash
python scripts/search-skills.py -k "<keyword>" python scripts/search-skills.py -k "<keyword>" -c "<category>" python scripts/search-skills.py -c "<category>"

```bash

Bash

Bash

python scripts/search-skills.py -k "<keyword>" python scripts/search-skills.py -k "<keyword>" -c "<category>" python scripts/search-skills.py -c "<category>"

→ [scripts/search-skills.py](scripts/search-skills.py) (Python — cross-platform)

**What the script does**:
1. Fetches `index.json` and `cn-en-map.json` via HTTP GET from GitCode API v5 (auto-decodes base64 content)
2. Expands keywords via `cn-en-map.json` (bidirectional CN↔EN, e.g., "ECS" → "ECS, 弹性云服务器, 云服务器")
3. Scores each skill: name match **+10**, trigger match **+8**, description match **+5**, service match **+3**
4. Sorts by score descending, outputs formatted results with matched keywords

**Fallback iteration** (if no results): 1) Switch CN↔EN keywords 2) Expand keywords 3) Remove category filter 4) Try synonyms 5) List all skills

The process should persist until the skill is found or its absence is confirmed. In the event of total failure, notify the user of the specific steps that were attempted.
python scripts/search-skills.py -k "<keyword>" python scripts/search-skills.py -k "<keyword>" -c "<category>" python scripts/search-skills.py -c "<category>"

→ [scripts/search-skills.py](scripts/search-skills.py)(Python — 跨平台)

**脚本功能**:
1. 通过HTTP GET从GitCode API v5获取`index.json`和`cn-en-map.json`(自动解码base64内容)
2. 通过`cn-en-map.json`扩展关键词(中英文双向映射,例如"ECS" → "ECS, 弹性云服务器, 云服务器")
3. 为每个Skill打分:名称匹配**+10**,触发词匹配**+8**,描述匹配**+5**,服务匹配**+3**
4. 按分数降序排序,输出包含匹配关键词的格式化结果

**备用迭代流程**(无结果时):1) 切换中英文关键词 2) 扩展关键词 3) 移除类目筛选 4) 尝试同义词 5) 列出所有Skill

该流程应持续执行,直到找到Skill或确认其不存在。若完全失败,需告知用户已尝试的具体步骤。

Step 2: View Skill Details (optional)

步骤2:查看Skill详情(可选)

Fetch the full SKILL.md content from GitHub for intent validation. Skip this step if the search results from Step 1 are sufficiently informative.
bash
undefined
从GitHub获取完整的SKILL.md内容以验证意图。如果步骤1的搜索结果信息足够,可跳过此步骤。
bash
undefined

URL pattern — use the skill's category, service, and name from index

URL格式 — 使用索引中的Skill类目、服务和名称


The agent can fetch this URL using `curl` or its web-fetch tool, then present the skill's full documentation to the user.

Agent可使用`curl`或其网页获取工具获取该URL,然后向用户展示Skill的完整文档。

Step 3: Install Skill

步骤3:安装Skill

MANDATORY: Before installing, the agent MUST call the install-count API to record the installation. Then use one of the install commands below. Option A is the default; Option C is a fallback when Option A is unavailable.
必填:安装前,Agent必须调用安装计数API记录安装情况。然后使用以下安装命令之一。选项A为默认方式;当选项A不可用时,使用选项C作为备用。

Step 3.1: Record Install Count

步骤3.1:记录安装计数

Before executing the install command, call the install-count API. The
skill_id
is constructed from the search results in Step 1:
skills/<category>/<service>/<skill-name>
.
IMPORTANT: The
category
and
service
values MUST be taken directly from the Step 1 search output (format:
name (category/service)
). Do NOT guess or hardcode them.
bash
curl -s -X POST "https://devdata2.huaweicloud.com/rest/developer/fwdo/rest/developer/servlet/hdskillservice/v1/obs/findcounts/increment" -H "Accept: application/json, text/plain, */*" -H "Content-Type: application/json" -H "Origin: https://skills.huaweicloud.com" -H "Referer: https://skills.huaweicloud.com/" -d "{\"skill_id\":\"skills/<category>/<service>/<skill-name>\"}"
This is a fire-and-forget request. Do NOT block the install flow on its success or failure.
执行安装命令前,调用安装计数API。
skill_id
由步骤1的搜索结果构造:
skills/<category>/<service>/<skill-name>
重要
category
service
值必须直接取自步骤1的搜索输出(格式:
name (category/service)
)。请勿猜测或硬编码。
bash
curl -s -X POST "https://devdata2.huaweicloud.com/rest/developer/fwdo/rest/developer/servlet/hdskillservice/v1/obs/findcounts/increment" -H "Accept: application/json, text/plain, */*" -H "Content-Type: application/json" -H "Origin: https://skills.huaweicloud.com" -H "Referer: https://skills.huaweicloud.com/" -d "{\"skill_id\":\"skills/<category>/<service>/<skill-name>\"}"
这是一个“即发即弃”的请求。请勿因请求成功或失败而阻塞安装流程。

Step 3.2: Execute Install Command

步骤3.2:执行安装命令

bash
undefined
bash
undefined

Option A: npx skills add from GitCode (default)

选项A:从GitCode安装(默认)

Option B: npx clawhub install (OpenClaw ecosystem)

选项B:npx clawhub install(OpenClaw生态)

npx clawhub install <skill-name> -y
npx clawhub install <skill-name> -y

Option C (fallback): npx skills add from GitHub

选项C(备用):从GitHub安装

npx skills add huaweicloud/huaweicloud-skills --skill <skill-name> -y

If all installation attempts fail, report the error message to the user. Do NOT attempt any method outside the commands above.
npx skills add huaweicloud/huaweicloud-skills --skill <skill-name> -y

如果所有安装尝试均失败,需向用户报告错误信息。请勿尝试上述命令之外的任何方法。

Parameters

参数

ParameterRequired/OptionalDescriptionDefault
Keyword
OptionalSearch keyword (matched against name, description, triggers, service)None
Category
OptionalCategory code for filtering (e.g., "computing", "storage", "network")None
skill-name
Required (Step 3)Exact skill name for installingNone
参数必填/可选描述默认值
Keyword
可选搜索关键词(匹配名称、描述、触发词、服务)
Category
可选用于筛选的类目代码(例如"computing", "storage", "network")
skill-name
必填(步骤3)用于安装的精确Skill名称

Reference Documentation

参考文档

DocumentDescription
GitCode API v5
index.json
Skill index fetched via HTTP GET (base64 decoded)
GitCode API v5
cn-en-map.json
Chinese-English keyword mapping fetched via HTTP GET (base64 decoded)
scripts/search-skills.pySearch script (Python) — fetches from GitCode API v5, expands keywords, scores, sorts
文档描述
GitCode API v5
index.json
通过HTTP GET获取的Skill索引(base64解码)
GitCode API v5
cn-en-map.json
通过HTTP GET获取的中英文关键词映射(base64解码)
scripts/search-skills.py搜索脚本(Python)—— 从GitCode API v5获取数据、扩展关键词、打分、排序

Search Heuristics

搜索启发法

Optional reference for keyword-to-category hints. The agent can infer categories from
index.json
without these.
  • Cloud infrastructure keywords (ecs, bms, vpc, obs, rds, ...) → likely
    computing
    ,
    network
    ,
    storage
    , etc.
  • Tool keywords (cli, terraform, koo) → likely
    devtools
  • Management keywords (monitoring, alarm, log) → likely
    monitoring
可选的关键词到类目提示参考。Agent可从
index.json
中推断类目,无需依赖这些提示。
  • 云基础设施关键词(ecs, bms, vpc, obs, rds, ...)→ 可能属于
    computing
    network
    storage
    等类目
  • 工具关键词(cli, terraform, koo)→ 可能属于
    devtools
    类目
  • 管理关键词(monitoring, alarm, log)→ 可能属于
    monitoring
    类目

Troubleshooting

故障排除

Issue:
python
is not recognized as a command

问题:
python
未被识别为命令

Cause: Python 3 is not installed or not in
PATH
Solution: Install Python 3.6+ and ensure it is added to
PATH
. On Windows, re-run the installer and check "Add Python to PATH". Alternatively, use
python3
if available.
原因:未安装Python 3或未将其添加到
PATH
解决方案:安装Python 3.6+并确保其添加到
PATH
。在Windows上,重新运行安装程序并勾选"Add Python to PATH"。或者,如果可用,使用
python3

Issue: Script fails with
SyntaxError: invalid syntax

问题:脚本报错
SyntaxError: invalid syntax

Cause: System
python
points to Python 2.x (the script requires Python 3.6+) Solution: Run with
python3
explicitly:
python3 scripts/search-skills.py -k "<keyword>"
原因:系统的
python
指向Python 2.x(脚本要求Python 3.6+) 解决方案:显式使用
python3
运行:
python3 scripts/search-skills.py -k "<keyword>"

Issue: Script fails with "Failed to fetch index.json"

问题:脚本报错"Failed to fetch index.json"

Cause: GitCode API v5 URL unreachable Solution: Verify network connectivity to
gitcode.com
原因:无法访问GitCode API v5 URL 解决方案:验证网络是否能连接到
gitcode.com

Issue: GitCode API v5 returns 404

问题:GitCode API v5返回404

Cause: File path incorrect or default branch is not
main
Solution: Verify the skill's
category
,
service
, and
name
from search results
原因:文件路径错误或默认分支不是
main
解决方案:从搜索结果中验证Skill的
category
service
name

Issue: Search returns no results

问题:搜索无结果

Cause: Keywords don't match any skill Solution:
  1. Try broader keywords
  2. Switch between Chinese and English keywords (e.g., "对象存储" → "obs")
  3. List all skills:
    python scripts/search-skills.py -c "computing"
原因:关键词不匹配任何Skill 解决方案
  1. 尝试更宽泛的关键词
  2. 切换中英文关键词(例如"对象存储" → "obs")
  3. 列出所有Skill:
    python scripts/search-skills.py -c "computing"

Notes

注意事项

  • This skill is read-only and does not create any cloud resources
  • No cache management needed — index is fetched fresh from GitCode API v5 each run
  • Network required — index data is hosted on GitCode, fetched via HTTP GET (base64 decoded)
  • MUST use script to search — do not read index.json directly
  • Index repo:
    https://gitcode.com/2501_91318609/skills-for-index
    (branch:
    main
    )
  • Skills repo:
    https://github.com/huaweicloud/huaweicloud-skills
    (branch:
    master
    )
  • 本Skill为只读,不会创建任何云资源
  • 无需缓存管理 — 每次运行都会从GitCode API v5获取最新索引
  • 需要网络 — 索引数据托管在GitCode,通过HTTP GET获取(base64解码)
  • 必须使用脚本搜索 — 请勿直接读取index.json
  • 索引仓库:
    https://gitcode.com/2501_91318609/skills-for-index
    (分支:
    main
  • Skill仓库:
    https://github.com/huaweicloud/huaweicloud-skills
    (分支:
    master