Execute — follow the installed Skill's instructions to fulfill the request.
This skill handles skill discovery and installation only — it does not perform
Huawei Cloud resource management/query tasks itself; those are handled by the skills it installs.
Overview
This skill enables users to efficiently search, discover, and install Huawei Cloud skills.
Dependency: Python 3.6+ and network access to gitcode.com (API v5 for the skill
index), gitee.com (backup index), and github.com / raw.githubusercontent.com (for skill details). Quality telemetry is collected automatically via
skill-quality-cli (installed by scripts/ensure_cli.sh if absent) — no other CLI
or credential is required.
Search Skills: Find skills by keyword, category, or both (matched against name, description, and triggers)
Browse Categories: Explore available skill categories via -l/--list-categories (see Step 1.5)
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 skills add https://clawhub.ai/huaweicloudskill/skills/<skill-name> (ClawHub), or fallback GitHub method
Architecture: Dual-source fallback (local cache → GitCode API v5 → Gitee raw) → In-memory search → GitHub raw fetch for details → Install
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"
Prerequisites
Python 3.6+ must be installed and available as python (or python3) in PATH
Network access to gitcode.com (API v5 for index), gitee.com (backup index), and github.com / raw.githubusercontent.com (for skill details)
skill-quality-cli — MANDATORY (Step 0.1): ensured by bash scripts/ensure_cli.sh
(idempotent, skips if already present). MUST be triggered on EVERY execution of this
skill before running any search/install command.
Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
MANDATORY: Before running any script command, verify Python is available.
⚠️ Mandatory: every hcloud command in this skill MUST be wrapped with skill-quality-cli run --skill-name huawei-cloud-find-skills -- — bare hcloud calls are strictly forbidden.
Install Python 3: Download from python.org 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 python --version again to confirm Python 3.6+ is available
If python points to Python 2: Use python3 instead of python in all commands below
Step 0.1: Ensure skill-quality-cli (MANDATORY)
MANDATORY: Before running any search/install command, ensure skill-quality-cli is
installed and available. This step MUST be triggered on EVERY execution of this skill,
immediately after Step 0. It is at the same mandatory level as Step 0: Check Python
Environment — do not skip it even if you believe the CLI is already present
(ensure_cli.sh is idempotent and exits silently when everything is ready).
# Ensure ~/.local/bin is on PATH (where skill-quality-cli is installed)
export PATH="$HOME/.local/bin:$PATH"
# Ensure skill-quality-cli is ready (idempotent: installs only if absent;
# also auto-links the CLI into a writable PATH dir so the bare command works)
bash scripts/ensure_cli.sh
# Verify availability
command -v skill-quality-cli && skill-quality-cli version
Outcome
Behavior
CLI already installed & usable
Silent pass — script exits immediately
CLI missing
Installs the latest release into ~/.local/bin/ (prints skill-quality-cli vX.Y.Z 已就绪)
OPTIONAL: A KooCLI (hcloud) availability/version check that never blocks the flow.
Skills installed later may depend on KooCLI; this step warns early, then always
continues to Step 1 regardless of the outcome.
bash
# Check KooCLI availability & version (non-blocking)
python scripts/check-koocli.py
On 429 (Too Many Requests), the script automatically retries with exponential backoff,
then falls through to Gitee raw — a different IP/WAF unaffected by GitCode rate limits.
Core Workflow and Core Commands
Step 1: Search Skills
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:
Category semantics (-c/--category): the index stores every category as a two-level path (<top>/<sub>). A top-level value matches by prefix — -c <top> returns every <top>/* skill; a two-level path matches exactly — -c <top>/<sub> returns only that subcategory's skills. Do not conclude "this category has no skills" before checking -l (Step 1.5) to confirm the category name exists.
Scores each skill: name match +10, trigger match +8, description match +5, service match +3
Sorts by score descending, outputs formatted results with matched keywords
Renders each result's full coverage: multi-service skills print 覆盖: <services> (from the index services array) plus the index capability type ([只读查询] / [管理] / [演练] / [通用]), so a skill whose primary service is one product is not mistaken for that product only
Appends an Other skills covering '<keyword>' group after the main ranking, listing coverage-only skills (index services covers the product but the skill name does not) so they are not buried under product-specific skills
Reports only the top-3 results' skill names to the install-count API (skills/<category>/<name>) as exposure impressions — fire-and-forget, never blocks or fails the search
Fallback iteration (if no results): 1) Switch CN↔EN keywords 2) Expand keywords 3) Remove category filter 4) Try synonyms 5) Browse categories with -l and list all skills under a category with -c <top-level>
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.
Step 1.5: Browse Categories (optional, no keyword needed)
Print the category tree aggregated from index.json — one line per top-level category with its skill count plus the concrete two-level paths. Use it before filtering, or to explain "category not found" to the user.
bash
skill-quality-cli run --skill-name huawei-cloud-find-skills -- python scripts/search-skills.py -l
skill-quality-cli run --skill-name huawei-cloud-find-skills -- python scripts/search-skills.py -l -c "<category>"
The output lists lines of the form <top> (N skill(s)) followed by <top>/<sub>(n), .... Pass a listed path to -c in Step 1 — either its top-level part (prefix match) or the full path (exact match).
Step 2: View Skill Details (optional)
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
# URL pattern — use the skill's category, service, and name from index
DETAIL_URL="https://raw.githubusercontent.com/huaweicloud/huaweicloud-skills/master/skills/${category}/${service}/${name}/SKILL.md"
The agent can fetch this URL using curl or its web-fetch tool, then present the skill's full documentation to the user.
Step 3: Install 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.
Step 3.1: Record Install Count
Before executing the install command, call the install-count API. The skill_id is constructed from the search results in Step 1: skills/<category>/<skill-name>(category 本身已是两级路径,如 container/cce).
IMPORTANT: The category value MUST be taken directly from the Step 1 search output (format: name (category/service)), using only the two-level category path. Do NOT append the service segment — the API accepts exactly skills/<category>/<name> and returns 404 otherwise. Do NOT guess or hardcode them.
⚠️ MANDATORY (质量上报): 安装计数请求同样用 run 包装, 保证安装流程触发质量上报。
Cause: Python 3 is not installed or not in PATHSolution: 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.
Issue: skill-quality-cli: command not found (exit 127)
Cause: skill-quality-cli is installed into ~/.local/bin/, which is usually
NOT on the default PATH.
Solution: Re-run bash scripts/ensure_cli.sh — it now auto-links the CLI into the
first writable directory on PATH (e.g. /usr/local/bin), so the bare command works.
As a manual fallback, run export PATH="$HOME/.local/bin:$PATH" in the current shell.
If the CLI is missing entirely, ensure_cli.sh installs it idempotently (skips if
already present) and never blocks the business flow.
Issue: Script fails with 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>"
Issue: Script fails with "Failed to fetch index.json"
Cause: GitCode API v5 URL unreachable
Solution: Verify network connectivity to gitcode.com
Issue: GitCode API v5 returns 404
Cause: File path incorrect or the branch is not test-for-indexSolution: Verify the skill's category, service, and name from search results
Issue: Search returns no results
Cause: Keywords don't match any skill, or the -c value is not a category that exists in the index
Solution:
List the available categories first: python scripts/search-skills.py -l (or narrow with -l -c "<category>")
If the category exists, browse everything under it without a keyword: python scripts/search-skills.py -c "<top-level>" (prefix match) or -c "<top>/<sub>" (exact path)
Switch between Chinese and English keywords (e.g., "对象存储" → "obs")
Try broader keywords
Notes
This skill is read-only and does not create any cloud resources
Dual-source with caching — local cache (TTL 1h) → GitCode API v5 → Gitee raw (on 429)
Cache location — ~/.cache/huawei-cloud-find-skills/, TTL configurable via FIND_SKILLS_CACHE_TTL env var (default 3600s)
MUST use script to search — do not read index.json directly
Index repo: https://gitcode.com/developer-skill/skills-group-contribution (branch: test-for-index)
KooCLI: the search/install flow itself is pure Python + HTTP (no service-level
hcloud commands, no --cli-region). Step 0.5 performs only a non-blocking KooCLI
availability/version check (hcloud version via scripts/check-koocli.py) to warn
about a missing/outdated CLI before installing skills that depend on it.