huawei-cloud-find-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese[!IMPORTANT] For any Huawei Cloud query or management task:
- Search — use this skill (
) to find the relevant Skill.huawei-cloud-find-skills- Install — install the matched Skill (see Step 3).
- Execute — follow the installed Skill's instructions to fulfill the request.
[!IMPORTANT] 针对任何华为云查询或管理任务:
- 搜索 — 使用本Skill(
)查找相关Skill。huawei-cloud-find-skills- 安装 — 安装匹配的Skill(参见步骤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 (GitCode default),
npx skills add, or fallback GitHub methodnpx clawhub install
Architecture: GitCode API v5 ( + ) → HTTP GET (base64 decode) → In-memory search → GitHub raw fetch for details → Install
index.jsoncn-en-map.json本Skill支持用户:
- 搜索Skill:通过关键词、类目或两者结合(匹配名称、描述和触发词)查找Skill
- 浏览类目:探索可用的Skill类目
- 查看Skill详情:从GitHub获取特定Skill的完整SKILL.md内容
- 安装Skill:引导用户通过(默认GitCode方式)、
npx skills add或备用GitHub方法安装Skillnpx clawhub install
架构:GitCode API v5( + )→ HTTP GET(base64解码)→ 内存搜索 → GitHub原始内容获取详情 → 安装
index.jsoncn-en-map.jsonUse 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 (or
python) inpython3PATH - Network access to (API v5 for index) and
gitcode.com/github.com(for skill details)raw.githubusercontent.com
- 必须安装Python 3.6+,且在中可通过
PATH(或python)调用python3 - 能够访问(用于获取索引的API v5)和
gitcode.com/github.com(用于获取Skill详情)raw.githubusercontent.com
Step 0: Check Python Environment
步骤0:检查Python环境
MANDATORY: Before running any script command, verify Python is available.
bash
undefined必填:运行任何脚本命令前,请确认Python可用。
bash
undefinedCheck 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"- Verify after install: Run again to confirm Python 3.6+ is available
python --version - If points to Python 2: Use
pythoninstead ofpython3in all commands belowpython
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"- 安装后验证:再次运行确认Python 3.6+可用
python --version - 如果指向Python 2:在以下所有命令中使用
python替代python3python
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_BRANCHINDEX_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_BRANCHIndex 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=mainCore 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 (from AI-understood user intent) and optional , run the search script:
keywordcategorypowershell
undefined必填:Agent必须执行搜索脚本以搜索Skill索引。请勿直接读取JSON文件 — 务必使用脚本。
根据(AI理解的用户意图)和可选的,运行搜索脚本:
keywordcategorypowershell
undefinedPowerShell
PowerShell
python scripts/search-skills.py -k "<keyword>"
python scripts/search-skills.py -k "<keyword>" -c "<category>"
python scripts/search-skills.py -c "<category>"
```bashpython scripts/search-skills.py -k "<keyword>"
python scripts/search-skills.py -k "<keyword>" -c "<category>"
python scripts/search-skills.py -c "<category>"
```bashBash
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
undefinedURL 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 is constructed from the search results in Step 1: .
skill_idskills/<category>/<service>/<skill-name>IMPORTANT: Theandcategoryvalues MUST be taken directly from the Step 1 search output (format:service). Do NOT guess or hardcode them.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>\"}"This is a fire-and-forget request. Do NOT block the install flow on its success or failure.
执行安装命令前,调用安装计数API。由步骤1的搜索结果构造:。
skill_idskills/<category>/<service>/<skill-name>重要:和category值必须直接取自步骤1的搜索输出(格式:service)。请勿猜测或硬编码。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
undefinedbash
undefinedOption A: npx skills add from GitCode (default)
选项A:从GitCode安装(默认)
npx skills add https://gitcode.com/huaweicloud/huaweicloud-skills.git#master --skill <skill-name> -y
npx skills add https://gitcode.com/huaweicloud/huaweicloud-skills.git#master --skill <skill-name> -y
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
参数
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
| Optional | Search keyword (matched against name, description, triggers, service) | None |
| Optional | Category code for filtering (e.g., "computing", "storage", "network") | None |
| Required (Step 3) | Exact skill name for installing | None |
| 参数 | 必填/可选 | 描述 | 默认值 |
|---|---|---|---|
| 可选 | 搜索关键词(匹配名称、描述、触发词、服务) | 无 |
| 可选 | 用于筛选的类目代码(例如"computing", "storage", "network") | 无 |
| 必填(步骤3) | 用于安装的精确Skill名称 | 无 |
Reference Documentation
参考文档
| Document | Description |
|---|---|
GitCode API v5 | Skill index fetched via HTTP GET (base64 decoded) |
GitCode API v5 | Chinese-English keyword mapping fetched via HTTP GET (base64 decoded) |
| scripts/search-skills.py | Search script (Python) — fetches from GitCode API v5, expands keywords, scores, sorts |
| 文档 | 描述 |
|---|---|
GitCode API v5 | 通过HTTP GET获取的Skill索引(base64解码) |
GitCode API v5 | 通过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 fromwithout these.index.json
- Cloud infrastructure keywords (ecs, bms, vpc, obs, rds, ...) → likely ,
computing,network, etc.storage - 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问题:python
未被识别为命令
pythonCause: Python 3 is not installed or not in
Solution: Install Python 3.6+ and ensure it is added to . On Windows, re-run the installer and check "Add Python to PATH". Alternatively, use if available.
PATHPATHpython3原因:未安装Python 3或未将其添加到
解决方案:安装Python 3.6+并确保其添加到。在Windows上,重新运行安装程序并勾选"Add Python to PATH"。或者,如果可用,使用。
PATHPATHpython3Issue: Script fails with SyntaxError: invalid syntax
SyntaxError: invalid syntax问题:脚本报错SyntaxError: invalid syntax
SyntaxError: invalid syntaxCause: System points to Python 2.x (the script requires Python 3.6+)
Solution: Run with explicitly:
pythonpython3python3 scripts/search-skills.py -k "<keyword>"原因:系统的指向Python 2.x(脚本要求Python 3.6+)
解决方案:显式使用运行:
pythonpython3python3 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.comIssue: GitCode API v5 returns 404
问题:GitCode API v5返回404
Cause: File path incorrect or default branch is not
Solution: Verify the skill's , , and from search results
maincategoryservicename原因:文件路径错误或默认分支不是
解决方案:从搜索结果中验证Skill的、和
maincategoryservicenameIssue: Search returns no results
问题:搜索无结果
Cause: Keywords don't match any skill
Solution:
- Try broader keywords
- Switch between Chinese and English keywords (e.g., "对象存储" → "obs")
- List all skills:
python scripts/search-skills.py -c "computing"
原因:关键词不匹配任何Skill
解决方案:
- 尝试更宽泛的关键词
- 切换中英文关键词(例如"对象存储" → "obs")
- 列出所有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: (branch:
https://gitcode.com/2501_91318609/skills-for-index)main - Skills repo: (branch:
https://github.com/huaweicloud/huaweicloud-skills)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