huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +178 -138
  4. package/README.zh-CN.md +176 -138
  5. package/bin/setup.cjs +10 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +11 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +60 -44
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
  13. package/plugins/huaweicloud-core/.mcp.json +13 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
  15. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  16. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  17. package/plugins/huaweicloud-core/safety/policy.json +76 -100
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
  19. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
  20. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  21. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  22. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
  24. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
  26. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  27. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  28. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
  34. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  35. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
  40. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  41. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  42. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  43. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
  44. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  45. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
  46. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
  47. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  48. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
  49. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
  50. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
  52. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
  53. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  54. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
  56. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  57. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
  58. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
  60. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
  61. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  62. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
  63. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  64. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
  65. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  66. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
  67. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  68. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
  69. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  70. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
  73. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  74. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  75. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  76. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  80. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
  81. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  82. package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
  83. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
  84. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
  85. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
  86. package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
  87. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
  88. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
  89. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
  90. package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
  91. package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
  92. package/plugins/huaweicloud-core/src/tools.mjs +463 -111
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
  95. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
  96. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
  97. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
  98. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  99. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
@@ -1,190 +1,191 @@
1
- ---
2
- name: huawei-cloud-find-skills
3
- description: |
4
- Invoke this skill to search, discover, browse, find and install any Huawei Cloud (华为云) agent skill.Triggers include: "华为云","华为云有什么skill","华为云相关skill","华为云agent skill 市场","华为云skill类目","explore Huawei Cloud skills","show Huawei Cloud skill categories","does a Huawei Cloud skill exist for...","which Huawei Cloud skills exist","搜索华为云技能","有没有管理ECS/OBS/RDS的skill","帮我找 XX 华为云skill","介绍 XX Skill 内容","华为云 XX Skill 具体做什么","安装华为云Skill".
5
- ---
6
-
7
- > [!IMPORTANT]
8
- > **For any Huawei Cloud query or management task:**
9
- > 1. **Search** — use this skill (`huawei-cloud-find-skills`) to find the relevant Skill.
10
- > 2. **Install** — install the matched Skill (see [Step 3](#step-3-install-skill)).
11
- > 3. **Execute** — follow the installed Skill's instructions to fulfill the request.
12
-
13
- # Huawei Cloud Agent Skills Search and Discovery
14
-
15
- This skill enables users to efficiently search, discover, and install Huawei Cloud skills.
16
-
17
- ## Scenario Description
18
-
19
- This skill enables users to:
20
-
21
- - **Search Skills**: Find skills by keyword, category, or both (matched against name, description, and triggers)
22
- - **Browse Categories**: Explore available skill categories
23
- - **View Skill Details**: Fetch full SKILL.md content from GitHub for specific skills
24
- - **Install Skills**: Guide users through skill installation via `npx skills add` (GitCode default), `npx clawhub install`, or fallback GitHub method
25
-
26
- **Architecture**: GitCode API v5 (`index.json` + `cn-en-map.json`) → HTTP GET (base64 decode) → In-memory search → GitHub raw fetch for details → Install
27
-
28
- ### Use Cases
29
-
30
- - "Find a skill for managing ECS instances"
31
- - "What Huawei Cloud skills are available for OBS?"
32
- - "华为云有哪些 VPC 相关的 skill?"
33
- - "Browse all available Huawei Cloud skills"
34
- - "Install a skill for RDS management"
35
- - "帮我找一个华为云网络相关的skill"
36
-
37
- ## Prerequisites
38
-
39
- - **Node.js >= 20** must be installed
40
- - **Network access** to `gitcode.com` (API v5 for index) and `github.com` / `raw.githubusercontent.com` (for skill details)
41
-
42
- ### Step 0: Check Python Environment
43
-
44
- > **MANDATORY**: Before running any script command, verify Python is available.
45
-
46
- ```bash
47
- # Check Python availability
48
- python --version # or: python3 --version
49
- ```
50
-
51
- If the command fails or returns Python 2.x:
52
-
53
- 1. **Install Python 3**: Download from [python.org](https://www.python.org/downloads/) or use a package manager:
54
- ```bash
55
- # macOS
56
- brew install python3
57
- # Ubuntu/Debian
58
- sudo apt-get install python3
59
- # Windows download installer from python.org, check "Add Python to PATH"
60
- ```
61
- 2. **Verify after install**: Run `python --version` again to confirm Python 3.6+ is available
62
- 3. **If `python` points to Python 2**: Use `python3` instead of `python` in all commands below
63
-
64
- ## Repository Info
65
-
66
- ```
67
- INDEX_REPO=2501_91318609/skills-for-index
68
- INDEX_BRANCH=main
69
- SKILLS_REPO=huaweicloud/huaweicloud-skills
70
- SKILLS_BRANCH=master
71
- RAW_BASE=https://raw.githubusercontent.com/$SKILLS_REPO/$SKILLS_BRANCH
72
- ```
73
-
74
- ## Index Source
75
-
76
- The search script fetches the skill index from GitCode API v5 via HTTP GET (base64 auto-decoded):
77
-
78
- ```
79
- SKILLS_INDEX_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main
80
- 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
81
- ```
82
-
83
-
84
- ## Core Workflow
85
-
86
- ### Step 1: Search Skills
87
-
88
- > **MANDATORY**: The agent MUST execute the search script to search the skill index. Do NOT read the JSON file directly — always use the script.
89
-
90
- Given `keyword` (from AI-understood user intent) and optional `category`, run the search script:
91
-
92
- ```bash
93
- node scripts/search-skills.mjs <keyword>
94
- node scripts/search-skills.mjs <keyword> -c <category>
95
- node scripts/search-skills.mjs -c <category>
96
- ```
97
-
98
- → [scripts/search-skills.mjs](scripts/search-skills.mjs) (Node.js — cross-platform)
99
-
100
- **What the script does**:
101
- 1. Fetches `index.json` and `cn-en-map.json` via HTTP GET from GitCode API v5 (auto-decodes base64 content)
102
- 2. Expands keywords via `cn-en-map.json` (bidirectional CN↔EN, e.g., "ECS" "ECS, 弹性云服务器, 云服务器")
103
- 3. Scores each skill: name match **+10**, trigger match **+8**, description match **+5**, service match **+3**
104
- 4. Sorts by score descending, outputs formatted results with matched keywords
105
-
106
- **Fallback iteration** (if no results): 1) Switch CN↔EN keywords 2) Expand keywords 3) Remove category filter 4) Try synonyms 5) List all skills
107
-
108
- 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.
109
-
110
- ### Step 2: View Skill Details (optional)
111
-
112
- Fetch the full SKILL.md content from GitHub for intent validation. Skip this step if the search results from Step 1 are sufficiently informative.
113
-
114
- ```bash
115
- # URL pattern — use the skill's category, service, and name from index
116
- DETAIL_URL="https://raw.githubusercontent.com/huaweicloud/huaweicloud-skills/master/skills/${category}/${service}/${name}/SKILL.md"
117
- ```
118
-
119
- The agent can fetch this URL using `curl` or its web-fetch tool, then present the skill's full documentation to the user.
120
-
121
- ### Step 3: Install Skill
122
-
123
- > **MANDATORY**: Use one of the commands below. Option A is the default; Option C is a fallback when Option A is unavailable.
124
-
125
- ```bash
126
- # Option A: npx skills add from GitCode (default)
127
- npx skills add https://gitcode.com/huaweicloud/huaweicloud-skills.git#master --skill <skill-name> -y
128
-
129
- # Option B: npx clawhub install (OpenClaw ecosystem)
130
- npx clawhub install <skill-name> -y
131
-
132
- # Option C (fallback): npx skills add from GitHub
133
- npx skills add huaweicloud/huaweicloud-skills --skill <skill-name> -y
134
- ```
135
-
136
- If all installation attempts fail, report the error message to the user. Do NOT attempt any method outside the commands above.
137
-
138
- ## Parameters
139
-
140
- | Parameter | Required/Optional | Description | Default |
141
- |-----------|-------------------|-------------|---------|
142
- | `Keyword` | Optional | Search keyword (matched against name, description, triggers, service) | None |
143
- | `Category` | Optional | Category code for filtering (e.g., "computing", "storage", "network") | None |
144
- | `skill-name` | Required (Step 3) | Exact skill name for installing | None |
145
-
146
-
147
- ## Reference Documentation
148
-
149
- | Document | Description |
150
- |----------|-------------|
151
- | GitCode API v5 `index.json` | Skill index fetched via HTTP GET (base64 decoded) |
152
- | GitCode API v5 `cn-en-map.json` | Chinese-English keyword mapping fetched via HTTP GET (base64 decoded) |
153
- | [scripts/search-skills.py](scripts/search-skills.py) | Search script (Python) — fetches from GitCode API v5, expands keywords, scores, sorts |
154
-
155
- ## Search Heuristics
156
-
157
- > Optional reference for keyword-to-category hints. The agent can infer categories from `index.json` without these.
158
-
159
- - Cloud infrastructure keywords (ecs, bms, vpc, obs, rds, ...) → likely `computing`, `network`, `storage`, etc.
160
- - Tool keywords (cli, terraform, koo) → likely `devtools`
161
- - Management keywords (monitoring, alarm, log) → likely `monitoring`
162
-
163
- ## Troubleshooting
164
-
165
- ### Issue: Script fails with "Failed to fetch index.json"
166
-
167
- **Cause**: GitCode API v5 URL unreachable
168
- **Solution**: Verify network connectivity to `gitcode.com`
169
-
170
- ### Issue: GitCode API v5 returns 404
171
-
172
- **Cause**: File path incorrect or default branch is not `main`
173
- **Solution**: Verify the skill's `category`, `service`, and `name` from search results
174
-
175
- ### Issue: Search returns no results
176
-
177
- **Cause**: Keywords don't match any skill
178
- **Solution**:
179
- 1. Try broader keywords
180
- 2. Switch between Chinese and English keywords (e.g., "对象存储" → "obs")
181
- 3. List all skills: `python scripts/search-skills.py -c "computing"`
182
-
183
- ## Notes
184
-
185
- - This skill is **read-only** and does not create any cloud resources
186
- - **No cache management needed** index is fetched fresh from GitCode API v5 each run
187
- - **Network required** — index data is hosted on GitCode, fetched via HTTP GET (base64 decoded)
188
- - **MUST use script to search** do not read index.json directly
189
- - Index repo: `https://gitcode.com/2501_91318609/skills-for-index` (branch: `main`)
190
- - Skills repo: `https://github.com/huaweicloud/huaweicloud-skills` (branch: `master`)
1
+ ---
2
+ name: huawei-cloud-find-skills
3
+ description: |
4
+ Invoke this skill to search, discover, browse, find and install any Huawei Cloud (华为云) agent skill.Triggers include: "华为云","华为云有什么skill","华为云相关skill","华为云agent skill 市场","华为云skill类目","explore Huawei Cloud skills","show Huawei Cloud skill categories","does a Huawei Cloud skill exist for...","which Huawei Cloud skills exist","搜索华为云技能","有没有管理ECS/OBS/RDS的skill","帮我找 XX 华为云skill","介绍 XX Skill 内容","华为云 XX Skill 具体做什么","安装华为云Skill".
5
+ ---
6
+
7
+ > [!IMPORTANT]
8
+ > **For any Huawei Cloud query or management task:**
9
+ >
10
+ > 1. **Search** — use this skill (`huawei-cloud-find-skills`) to find the relevant Skill.
11
+ > 2. **Install** — install the matched Skill (see [Step 3](#step-3-install-skill)).
12
+ > 3. **Execute** — follow the installed Skill's instructions to fulfill the request.
13
+
14
+ # Huawei Cloud Agent Skills Search and Discovery
15
+
16
+ This skill enables users to efficiently search, discover, and install Huawei Cloud skills.
17
+
18
+ ## Scenario Description
19
+
20
+ This skill enables users to:
21
+
22
+ - **Search Skills**: Find skills by keyword, category, or both (matched against name, description, and triggers)
23
+ - **Browse Categories**: Explore available skill categories
24
+ - **View Skill Details**: Fetch full SKILL.md content from GitHub for specific skills
25
+ - **Install Skills**: Guide users through skill installation via `npx skills add` (GitCode default), `npx clawhub install`, or fallback GitHub method
26
+
27
+ **Architecture**: GitCode API v5 (`index.json` + `cn-en-map.json`) → HTTP GET (base64 decode) → In-memory search → GitHub raw fetch for details → Install
28
+
29
+ ### Use Cases
30
+
31
+ - "Find a skill for managing ECS instances"
32
+ - "What Huawei Cloud skills are available for OBS?"
33
+ - "华为云有哪些 VPC 相关的 skill?"
34
+ - "Browse all available Huawei Cloud skills"
35
+ - "Install a skill for RDS management"
36
+ - "帮我找一个华为云网络相关的skill"
37
+
38
+ ## Prerequisites
39
+
40
+ - **Node.js >= 20** must be installed
41
+ - **Network access** to `gitcode.com` (API v5 for index) and `github.com` / `raw.githubusercontent.com` (for skill details)
42
+
43
+ ### Step 0: Check Python Environment
44
+
45
+ > **MANDATORY**: Before running any script command, verify Python is available.
46
+
47
+ ```bash
48
+ # Check Python availability
49
+ python --version # or: python3 --version
50
+ ```
51
+
52
+ If the command fails or returns Python 2.x:
53
+
54
+ 1. **Install Python 3**: Download from [python.org](https://www.python.org/downloads/) or use a package manager:
55
+ ```bash
56
+ # macOS
57
+ brew install python3
58
+ # Ubuntu/Debian
59
+ sudo apt-get install python3
60
+ # Windows — download installer from python.org, check "Add Python to PATH"
61
+ ```
62
+ 2. **Verify after install**: Run `python --version` again to confirm Python 3.6+ is available
63
+ 3. **If `python` points to Python 2**: Use `python3` instead of `python` in all commands below
64
+
65
+ ## Repository Info
66
+
67
+ ```
68
+ INDEX_REPO=2501_91318609/skills-for-index
69
+ INDEX_BRANCH=main
70
+ SKILLS_REPO=huaweicloud/huaweicloud-skills
71
+ SKILLS_BRANCH=master
72
+ RAW_BASE=https://raw.githubusercontent.com/$SKILLS_REPO/$SKILLS_BRANCH
73
+ ```
74
+
75
+ ## Index Source
76
+
77
+ The search script fetches the skill index from GitCode API v5 via HTTP GET (base64 auto-decoded):
78
+
79
+ ```
80
+ SKILLS_INDEX_URL=https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main
81
+ 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
82
+ ```
83
+
84
+ ## Core Workflow
85
+
86
+ ### Step 1: Search Skills
87
+
88
+ > **MANDATORY**: The agent MUST execute the search script to search the skill index. Do NOT read the JSON file directly — always use the script.
89
+
90
+ Given `keyword` (from AI-understood user intent) and optional `category`, run the search script:
91
+
92
+ ```bash
93
+ node scripts/search-skills.mjs <keyword>
94
+ node scripts/search-skills.mjs <keyword> -c <category>
95
+ node scripts/search-skills.mjs -c <category>
96
+ ```
97
+
98
+ → [scripts/search-skills.mjs](scripts/search-skills.mjs) (Node.js — cross-platform)
99
+
100
+ **What the script does**:
101
+
102
+ 1. Fetches `index.json` and `cn-en-map.json` via HTTP GET from GitCode API v5 (auto-decodes base64 content)
103
+ 2. Expands keywords via `cn-en-map.json` (bidirectional CN↔EN, e.g., "ECS" "ECS, 弹性云服务器, 云服务器")
104
+ 3. Scores each skill: name match **+10**, trigger match **+8**, description match **+5**, service match **+3**
105
+ 4. Sorts by score descending, outputs formatted results with matched keywords
106
+
107
+ **Fallback iteration** (if no results): 1) Switch CN↔EN keywords 2) Expand keywords 3) Remove category filter 4) Try synonyms 5) List all skills
108
+
109
+ 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.
110
+
111
+ ### Step 2: View Skill Details (optional)
112
+
113
+ Fetch the full SKILL.md content from GitHub for intent validation. Skip this step if the search results from Step 1 are sufficiently informative.
114
+
115
+ ```bash
116
+ # URL pattern — use the skill's category, service, and name from index
117
+ DETAIL_URL="https://raw.githubusercontent.com/huaweicloud/huaweicloud-skills/master/skills/${category}/${service}/${name}/SKILL.md"
118
+ ```
119
+
120
+ The agent can fetch this URL using `curl` or its web-fetch tool, then present the skill's full documentation to the user.
121
+
122
+ ### Step 3: Install Skill
123
+
124
+ > **MANDATORY**: Use one of the commands below. Option A is the default; Option C is a fallback when Option A is unavailable.
125
+
126
+ ```bash
127
+ # Option A: npx skills add from GitCode (default)
128
+ npx skills add https://gitcode.com/huaweicloud/huaweicloud-skills.git#master --skill <skill-name> -y
129
+
130
+ # Option B: npx clawhub install (OpenClaw ecosystem)
131
+ npx clawhub install <skill-name> -y
132
+
133
+ # Option C (fallback): npx skills add from GitHub
134
+ npx skills add huaweicloud/huaweicloud-skills --skill <skill-name> -y
135
+ ```
136
+
137
+ If all installation attempts fail, report the error message to the user. Do NOT attempt any method outside the commands above.
138
+
139
+ ## Parameters
140
+
141
+ | Parameter | Required/Optional | Description | Default |
142
+ | ------------ | ----------------- | --------------------------------------------------------------------- | ------- |
143
+ | `Keyword` | Optional | Search keyword (matched against name, description, triggers, service) | None |
144
+ | `Category` | Optional | Category code for filtering (e.g., "computing", "storage", "network") | None |
145
+ | `skill-name` | Required (Step 3) | Exact skill name for installing | None |
146
+
147
+ ## Reference Documentation
148
+
149
+ | Document | Description |
150
+ | ---------------------------------------------------- | ------------------------------------------------------------------------------------- |
151
+ | GitCode API v5 `index.json` | Skill index fetched via HTTP GET (base64 decoded) |
152
+ | GitCode API v5 `cn-en-map.json` | Chinese-English keyword mapping fetched via HTTP GET (base64 decoded) |
153
+ | [scripts/search-skills.py](scripts/search-skills.py) | Search script (Python) — fetches from GitCode API v5, expands keywords, scores, sorts |
154
+
155
+ ## Search Heuristics
156
+
157
+ > Optional reference for keyword-to-category hints. The agent can infer categories from `index.json` without these.
158
+
159
+ - Cloud infrastructure keywords (ecs, bms, vpc, obs, rds, ...) → likely `computing`, `network`, `storage`, etc.
160
+ - Tool keywords (cli, terraform, koo) → likely `devtools`
161
+ - Management keywords (monitoring, alarm, log) → likely `monitoring`
162
+
163
+ ## Troubleshooting
164
+
165
+ ### Issue: Script fails with "Failed to fetch index.json"
166
+
167
+ **Cause**: GitCode API v5 URL unreachable
168
+ **Solution**: Verify network connectivity to `gitcode.com`
169
+
170
+ ### Issue: GitCode API v5 returns 404
171
+
172
+ **Cause**: File path incorrect or default branch is not `main`
173
+ **Solution**: Verify the skill's `category`, `service`, and `name` from search results
174
+
175
+ ### Issue: Search returns no results
176
+
177
+ **Cause**: Keywords don't match any skill
178
+ **Solution**:
179
+
180
+ 1. Try broader keywords
181
+ 2. Switch between Chinese and English keywords (e.g., "对象存储" "obs")
182
+ 3. List all skills: `python scripts/search-skills.py -c "computing"`
183
+
184
+ ## Notes
185
+
186
+ - This skill is **read-only** and does not create any cloud resources
187
+ - **No cache management needed** — index is fetched fresh from GitCode API v5 each run
188
+ - **Network required** index data is hosted on GitCode, fetched via HTTP GET (base64 decoded)
189
+ - **MUST use script to search** — do not read index.json directly
190
+ - Index repo: `https://gitcode.com/2501_91318609/skills-for-index` (branch: `main`)
191
+ - Skills repo: `https://github.com/huaweicloud/huaweicloud-skills` (branch: `master`)