huaweicloud-devkit 1.0.2-next.3 → 1.0.3-dev.0

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 (97) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +139 -163
  4. package/README.zh-CN.md +139 -161
  5. package/bin/setup.cjs +8 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +14 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +44 -47
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +44 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +43 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +44 -44
  13. package/plugins/huaweicloud-core/.mcp.json +15 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +44 -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 +99 -99
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +199 -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 +101 -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 +190 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +124 -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 +56 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +97 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +29 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +23 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +185 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +133 -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 +55 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +131 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +58 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +71 -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 +65 -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 +122 -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 +127 -133
  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 +26 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +100 -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 +224 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +134 -139
  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 +76 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +59 -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 +47 -51
  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 +128 -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 +95 -110
  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 +19 -19
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +27 -27
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +60 -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 +87 -105
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +95 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +265 -265
  80. package/plugins/huaweicloud-core/src/mcp-server.mjs +129 -129
  81. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +137 -137
  82. package/plugins/huaweicloud-core/src/safety-policy.mjs +302 -302
  83. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +87 -91
  84. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +153 -162
  85. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +105 -112
  86. package/plugins/huaweicloud-core/src/search-market.mjs +169 -174
  87. package/plugins/huaweicloud-core/src/setup-cli.mjs +1594 -2017
  88. package/plugins/huaweicloud-core/src/tools.mjs +993 -1008
  89. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +427 -427
  90. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +132 -132
  91. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +227 -227
  92. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +202 -202
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +158 -158
  94. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  95. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
  96. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +0 -155
  97. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +0 -87
@@ -1,63 +1,63 @@
1
- ---
2
- name: huawei-waf-aad
3
- description: "Use when configuring Web Application Firewall (WAF) policies/rules, or Anti-DDoS (AAD) protection on Huawei Cloud. Triggers: WAF, AAD, firewall, DDoS, web protection, IP blacklist, rate limiting, CC attack. NOT for: security groups (use huawei-vpc), CTS audit (use huawei-cts)."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud WAF / AAD
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Always run `hcloud WAF <Operation> --help` before constructing commands to discover exact parameter names and requirements. For AAD operations, use `hcloud AAD --help`.
12
-
13
- ## Overview
14
-
15
- Domain expertise for WAF and Anti-DDoS. Covers WAF policy/rules, AAD protection, IP whitelist/blacklist, and rate limiting.
16
-
17
- ## Critical Warnings
18
-
19
- | Trap | Why |
20
- |------|-----|
21
- | WAF needs CNAME redirect | DNS must point to WAF endpoint, not server IP |
22
- | Premium instance required | Cloud WAF needs a dedicated/premium WAF instance |
23
- | AAD Standard vs Enterprise | Standard protects single IP. Enterprise protects entire IP ranges |
24
- | Rule order matters | WAF rules evaluated top-to-bottom within a policy |
25
-
26
- ## Common Workflows
27
-
28
- ### WAF
29
-
30
- | Task | Operation |
31
- |------|-----------|
32
- | List WAF instances | `ListInstances --cli-region=<r> --project_id=<p>` |
33
- | List policies | `ListPolicies --cli-region=<r> --project_id=<p>` |
34
- | Create custom rule | `BatchCreateCustomRule --cli-region=<r> --project_id=<p>` |
35
- | Create IP blacklist | `BatchCreateWhiteblackipRule --cli-region=<r> --project_id=<p>` |
36
- | Create CC rule | `BatchCreateCcRule --cli-region=<r> --project_id=<p>` |
37
- | Create geo rule | `BatchCreateGeoIpRule --cli-region=<r> --project_id=<p>` |
38
-
39
- ### AAD
40
-
41
- ```bash
42
- hcloud AAD ListInstances --cli-region=<r> --project_id=<p>
43
- hcloud AAD CreateInstance --cli-region=<r> --project_id=<p>
44
- ```
45
-
46
- ## Troubleshooting
47
-
48
- | Error | Fix |
49
- |-------|-----|
50
- | Website unreachable after WAF | Check CNAME record points to WAF endpoint |
51
- | WAF blocking legitimate traffic | Check rules order, adjust false positive settings |
52
- | AAD not responding | Standard AAD only protects single EIP. Check EIP binding |
53
-
54
- ## Security
55
-
56
- - MUST use WAF for all public-facing web applications
57
- - SHOULD enable AAD for DDoS protection
58
- - MUST test WAF rules in report-only mode before blocking
59
-
60
- ## Cross-Skill References
61
-
62
- - **EIP**: See `huawei-vpc` for elastic IP binding
63
- - **DNS/CNAME**: Configure via your DNS provider
1
+ ---
2
+ name: huawei-waf-aad
3
+ description: "Use when configuring Web Application Firewall (WAF) policies/rules, or Anti-DDoS (AAD) protection on Huawei Cloud. Triggers: WAF, AAD, firewall, DDoS, web protection, IP blacklist, rate limiting, CC attack. NOT for: security groups (use huawei-vpc), CTS audit (use huawei-cts)."
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud WAF / AAD
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Always run `hcloud WAF <Operation> --help` before constructing commands to discover exact parameter names and requirements. For AAD operations, use `hcloud AAD --help`.
12
+
13
+ ## Overview
14
+
15
+ Domain expertise for WAF and Anti-DDoS. Covers WAF policy/rules, AAD protection, IP whitelist/blacklist, and rate limiting.
16
+
17
+ ## Critical Warnings
18
+
19
+ | Trap | Why |
20
+ |------|-----|
21
+ | WAF needs CNAME redirect | DNS must point to WAF endpoint, not server IP |
22
+ | Premium instance required | Cloud WAF needs a dedicated/premium WAF instance |
23
+ | AAD Standard vs Enterprise | Standard protects single IP. Enterprise protects entire IP ranges |
24
+ | Rule order matters | WAF rules evaluated top-to-bottom within a policy |
25
+
26
+ ## Common Workflows
27
+
28
+ ### WAF
29
+
30
+ | Task | Operation |
31
+ |------|-----------|
32
+ | List WAF instances | `ListInstances --cli-region=<r> --project_id=<p>` |
33
+ | List policies | `ListPolicies --cli-region=<r> --project_id=<p>` |
34
+ | Create custom rule | `BatchCreateCustomRule --cli-region=<r> --project_id=<p>` |
35
+ | Create IP blacklist | `BatchCreateWhiteblackipRule --cli-region=<r> --project_id=<p>` |
36
+ | Create CC rule | `BatchCreateCcRule --cli-region=<r> --project_id=<p>` |
37
+ | Create geo rule | `BatchCreateGeoIpRule --cli-region=<r> --project_id=<p>` |
38
+
39
+ ### AAD
40
+
41
+ ```bash
42
+ hcloud AAD ListInstances --cli-region=<r> --project_id=<p>
43
+ hcloud AAD CreateInstance --cli-region=<r> --project_id=<p>
44
+ ```
45
+
46
+ ## Troubleshooting
47
+
48
+ | Error | Fix |
49
+ |-------|-----|
50
+ | Website unreachable after WAF | Check CNAME record points to WAF endpoint |
51
+ | WAF blocking legitimate traffic | Check rules order, adjust false positive settings |
52
+ | AAD not responding | Standard AAD only protects single EIP. Check EIP binding |
53
+
54
+ ## Security
55
+
56
+ - MUST use WAF for all public-facing web applications
57
+ - SHOULD enable AAD for DDoS protection
58
+ - MUST test WAF rules in report-only mode before blocking
59
+
60
+ ## Cross-Skill References
61
+
62
+ - **EIP**: See `huawei-vpc` for elastic IP binding
63
+ - **DNS/CNAME**: Configure via your DNS provider
@@ -1,56 +1,56 @@
1
- ---
2
- name: huaweicloud-api-and-sdk
3
- description: Huawei Cloud API and SDK guidance for application development. Use when writing code that calls Huawei Cloud services, choosing SDKs, building API requests, handling project_id, endpoint, auth, pagination, retries, error codes, or request IDs.
4
- ---
5
-
6
- # Huawei Cloud API And SDK
7
-
8
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
9
-
10
- Use this skill when the deliverable is application code, API integration, or precise request construction.
11
-
12
- ## Critical Warnings
13
-
14
- | Trap | Why |
15
- |------|-----|
16
- | `project_id` in path for most services | Many Huawei Cloud APIs require `project_id` in the URL path. Get it from IAM or KooCLI profile |
17
- | Pagination is not automatic | APIs return paginated results. Always check for `next_marker` or `page_info` to avoid partial data |
18
- | AK/SK signing algorithm | Huawei Cloud uses HMAC-SHA256 signing with specific header ordering. Use SDK, don't implement manually |
19
- | Endpoint varies by service and region | Always verify at https://developer.huaweicloud.com/endpoint |
20
- | Error response in `body` not HTTP status | Many errors return HTTP 200 with error details in the JSON body. Check `error_code` or `error_msg` fields |
21
-
22
- ## API Workflow
23
-
24
- 1. Identify service, region, endpoint, API version, and whether `project_id` is required in the path.
25
- 2. Verify the exact request body and response schema from official API documentation.
26
- 3. Handle pagination explicitly. Do not assume a single page.
27
- 4. Preserve `request_id` from errors and responses for troubleshooting.
28
- 5. Classify operation risk before running a live call.
29
- 6. For write APIs, produce a dry plan and ask the user before execution.
30
-
31
- ## SDK Workflow
32
-
33
- 1. Pick the SDK that matches the user's application language and existing dependency style.
34
- 2. Use the official SDK client for the target service.
35
- 3. Keep credentials out of source code. Use environment, profile, workload identity, or runtime secret injection.
36
- 4. Add timeout, retry, and pagination handling.
37
- 5. Return typed or structured results instead of unbounded raw logs.
38
-
39
- ## Troubleshooting
40
-
41
- | Error | Root Cause -> Fix |
42
- |-------|-------------------|
43
- | Invalid project_id | Wrong or missing project_id in URL path. Use `hcloud IAM KeystoneListProjects` or KooCLI profile |
44
- | 401/AuthFailure | Expired AK/SK or wrong signing algorithm. Regenerate AK/SK or check SDK version |
45
- | 403/Forbidden | IAM permission missing. Check user/role has required action permissions |
46
- | Empty results | Pagination missing — add `limit` and check `marker` |
47
- | Endpoint not reachable | Wrong region/service endpoint. Verify at developer.huaweicloud.com/endpoint |
48
-
49
- ## Terraform Priority
50
-
51
- Terraform Provider is low priority in V1. Mention it when the user needs reviewed, repeatable infrastructure changes. Do not default to Terraform for quick discovery or app-level SDK integration.
52
-
53
- ## Cross-Skill References
54
-
55
- - **CLI setup**: See `huaweicloud-cli-and-auth` for KooCLI credential setup
56
- - **Safety**: See `huaweicloud-safety` for write operation approval flow
1
+ ---
2
+ name: huaweicloud-api-and-sdk
3
+ description: Huawei Cloud API and SDK guidance for application development. Use when writing code that calls Huawei Cloud services, choosing SDKs, building API requests, handling project_id, endpoint, auth, pagination, retries, error codes, or request IDs.
4
+ ---
5
+
6
+ # Huawei Cloud API And SDK
7
+
8
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
9
+
10
+ Use this skill when the deliverable is application code, API integration, or precise request construction.
11
+
12
+ ## Critical Warnings
13
+
14
+ | Trap | Why |
15
+ |------|-----|
16
+ | `project_id` in path for most services | Many Huawei Cloud APIs require `project_id` in the URL path. Get it from IAM or KooCLI profile |
17
+ | Pagination is not automatic | APIs return paginated results. Always check for `next_marker` or `page_info` to avoid partial data |
18
+ | AK/SK signing algorithm | Huawei Cloud uses HMAC-SHA256 signing with specific header ordering. Use SDK, don't implement manually |
19
+ | Endpoint varies by service and region | Always verify at https://developer.huaweicloud.com/endpoint |
20
+ | Error response in `body` not HTTP status | Many errors return HTTP 200 with error details in the JSON body. Check `error_code` or `error_msg` fields |
21
+
22
+ ## API Workflow
23
+
24
+ 1. Identify service, region, endpoint, API version, and whether `project_id` is required in the path.
25
+ 2. Verify the exact request body and response schema from official API documentation.
26
+ 3. Handle pagination explicitly. Do not assume a single page.
27
+ 4. Preserve `request_id` from errors and responses for troubleshooting.
28
+ 5. Classify operation risk before running a live call.
29
+ 6. For write APIs, produce a dry plan and ask the user before execution.
30
+
31
+ ## SDK Workflow
32
+
33
+ 1. Pick the SDK that matches the user's application language and existing dependency style.
34
+ 2. Use the official SDK client for the target service.
35
+ 3. Keep credentials out of source code. Use environment, profile, workload identity, or runtime secret injection.
36
+ 4. Add timeout, retry, and pagination handling.
37
+ 5. Return typed or structured results instead of unbounded raw logs.
38
+
39
+ ## Troubleshooting
40
+
41
+ | Error | Root Cause -> Fix |
42
+ |-------|-------------------|
43
+ | Invalid project_id | Wrong or missing project_id in URL path. Use `hcloud IAM KeystoneListProjects` or KooCLI profile |
44
+ | 401/AuthFailure | Expired AK/SK or wrong signing algorithm. Regenerate AK/SK or check SDK version |
45
+ | 403/Forbidden | IAM permission missing. Check user/role has required action permissions |
46
+ | Empty results | Pagination missing — add `limit` and check `marker` |
47
+ | Endpoint not reachable | Wrong region/service endpoint. Verify at developer.huaweicloud.com/endpoint |
48
+
49
+ ## Terraform Priority
50
+
51
+ Terraform Provider is low priority in V1. Mention it when the user needs reviewed, repeatable infrastructure changes. Do not default to Terraform for quick discovery or app-level SDK integration.
52
+
53
+ ## Cross-Skill References
54
+
55
+ - **CLI setup**: See `huaweicloud-cli-and-auth` for KooCLI credential setup
56
+ - **Safety**: See `huaweicloud-safety` for write operation approval flow
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud API And SDK"
3
- short_description: "Build correct Huawei Cloud API requests and SDK integrations."
4
- default_prompt: "Use $huaweicloud-api-and-sdk to plan this Huawei Cloud API or SDK integration."
1
+ interface:
2
+ display_name: "Huawei Cloud API And SDK"
3
+ short_description: "Build correct Huawei Cloud API requests and SDK integrations."
4
+ default_prompt: "Use $huaweicloud-api-and-sdk to plan this Huawei Cloud API or SDK integration."
@@ -1,51 +1,47 @@
1
- ---
2
- name: huaweicloud-capability-discovery
3
- description: Discover Huawei Cloud capabilities for an agent task. Use when the user asks what Huawei Cloud service, Skill, CLI command, API, SDK, or document should be used, or when a request is scenario-shaped and needs capability selection before implementation.
4
- ---
5
-
6
- # Huawei Cloud Capability Discovery
7
-
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Use this skill to turn vague developer intent into a precise Huawei Cloud capability path.
12
-
13
- ## Workflow
14
-
15
- 1. Classify the goal: application hosting, compute, container, serverless, storage, database, network, security, observability, AI, data, migration, cost, or troubleshooting.
16
- 2. Search Huawei Cloud Skills first when the task is scenario-based or operational.
17
- 3. Use official docs for exact service limits, API request/response fields, regions, and pricing-sensitive behavior.
18
- 4. Prefer KooCLI for local read-only discovery after auth is configured.
19
- 5. Before using KooCLI, discover exact operation names with `hcloud <Service> --help`; do not guess from intuition. Examples: list ECS instances with `ECS ListServersDetails`, create ECS with `ECS CreateServers`, inspect images through `IMS GlanceShowImage`.
20
- 6. Prefer SDK docs when the deliverable is application code.
21
- 7. Prefer MCP only when an approved Huawei Cloud MCP tool exists for the needed operation.
22
- 8. Treat Terraform as a secondary V1 path for reviewed IaC, not the default.
23
- 9. When no built-in devkit skill matches, browse the community skill marketplace at https://github.com/huaweicloud/huaweicloud-skills. Fetch the index from https://raw.githubusercontent.com/huaweicloud/huaweicloud-skills/master/skills-index/index.json.
24
-
25
- ## Deployment Target Options
26
-
27
- When the intent is to **deploy, host, or preview a web app or static website** and the developer has not named a target, do NOT default to OBS or any single service. Present the options and let the developer choose, recommending the sandbox first: ① huawei-sandbox (recommended temporary runtime, instant preview URL) ② huawei-obs (long-term static hosting/CDN) ③ huawei-ecs ④ huawei-cce. Only follow an explicit target when the developer names one.
28
-
29
- ## Region Intent
30
-
31
- - Extract region intent from the user's words before querying. Examples: Singapore -> `ap-southeast-3` first, Hong Kong -> `ap-southeast-2`, Beijing -> `cn-north-4`, Shanghai -> `cn-east-3`.
32
- - Target operation region wins over reference-resource uncertainty. If the user says "buy ECS in Singapore, reference SSY", inspect Singapore first.
33
- - No blind all-region scans. If the reference resource location is unknown and the target region is not enough, ask the user for the region instead of scanning unrelated regions.
34
- - For unfamiliar names, check Huawei Cloud API Explorer or official endpoint documentation for the region and service endpoint mapping.
35
-
36
- ## Output Format
37
-
38
- When routing a task, return:
39
-
40
- - `intent`: one concise sentence
41
- - `recommended_path`: Skills, CLI, API, SDK, MCP, or Terraform
42
- - `why`: why this path is shortest and safest
43
- - `next_action`: exact next command, document lookup, or code file to inspect
44
- - `risk`: read-only, write, secret, permission, cost, or public exposure
45
-
46
- ## Avoid
47
-
48
- - Do not guess a service when Huawei Cloud Skills or official docs should be checked.
49
- - Do not load many service references. Pick the next one that matches the intent.
50
- - Do not propose write operations before the user has seen the plan.
51
- - Do not query every region just to find a reference resource.
1
+ ---
2
+ name: huaweicloud-capability-discovery
3
+ description: Discover Huawei Cloud capabilities for an agent task. Use when the user asks what Huawei Cloud service, Skill, CLI command, API, SDK, or document should be used, or when a request is scenario-shaped and needs capability selection before implementation.
4
+ ---
5
+
6
+ # Huawei Cloud Capability Discovery
7
+
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Use this skill to turn vague developer intent into a precise Huawei Cloud capability path.
12
+
13
+ ## Workflow
14
+
15
+ 1. Classify the goal: application hosting, compute, container, serverless, storage, database, network, security, observability, AI, data, migration, cost, or troubleshooting.
16
+ 2. Search Huawei Cloud Skills first when the task is scenario-based or operational.
17
+ 3. Use official docs for exact service limits, API request/response fields, regions, and pricing-sensitive behavior.
18
+ 4. Prefer KooCLI for local read-only discovery after auth is configured.
19
+ 5. Before using KooCLI, discover exact operation names with `hcloud <Service> --help`; do not guess from intuition. Examples: list ECS instances with `ECS ListServersDetails`, create ECS with `ECS CreateServers`, inspect images through `IMS GlanceShowImage`.
20
+ 6. Prefer SDK docs when the deliverable is application code.
21
+ 7. Prefer MCP only when an approved Huawei Cloud MCP tool exists for the needed operation.
22
+ 8. Treat Terraform as a secondary V1 path for reviewed IaC, not the default.
23
+ 9. When no built-in devkit skill matches, browse the community skill marketplace at https://github.com/huaweicloud/huaweicloud-skills. Fetch the index from https://raw.githubusercontent.com/huaweicloud/huaweicloud-skills/master/skills-index/index.json.
24
+
25
+ ## Region Intent
26
+
27
+ - Extract region intent from the user's words before querying. Examples: Singapore -> `ap-southeast-3` first, Hong Kong -> `ap-southeast-2`, Beijing -> `cn-north-4`, Shanghai -> `cn-east-3`.
28
+ - Target operation region wins over reference-resource uncertainty. If the user says "buy ECS in Singapore, reference SSY", inspect Singapore first.
29
+ - No blind all-region scans. If the reference resource location is unknown and the target region is not enough, ask the user for the region instead of scanning unrelated regions.
30
+ - For unfamiliar names, check Huawei Cloud API Explorer or official endpoint documentation for the region and service endpoint mapping.
31
+
32
+ ## Output Format
33
+
34
+ When routing a task, return:
35
+
36
+ - `intent`: one concise sentence
37
+ - `recommended_path`: Skills, CLI, API, SDK, MCP, or Terraform
38
+ - `why`: why this path is shortest and safest
39
+ - `next_action`: exact next command, document lookup, or code file to inspect
40
+ - `risk`: read-only, write, secret, permission, cost, or public exposure
41
+
42
+ ## Avoid
43
+
44
+ - Do not guess a service when Huawei Cloud Skills or official docs should be checked.
45
+ - Do not load many service references. Pick the next one that matches the intent.
46
+ - Do not propose write operations before the user has seen the plan.
47
+ - Do not query every region just to find a reference resource.
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud Capability Discovery"
3
- short_description: "Find the right Huawei Cloud capability path for a developer task."
4
- default_prompt: "Use $huaweicloud-capability-discovery to route this scenario to Huawei Cloud capabilities."
1
+ interface:
2
+ display_name: "Huawei Cloud Capability Discovery"
3
+ short_description: "Find the right Huawei Cloud capability path for a developer task."
4
+ default_prompt: "Use $huaweicloud-capability-discovery to route this scenario to Huawei Cloud capabilities."
@@ -1,128 +1,128 @@
1
- ---
2
- name: huaweicloud-cli-and-auth
3
- description: Safe Huawei Cloud KooCLI usage and authentication guidance. Use when working with hcloud, KooCLI, profiles, AK/SK, regions, projects, endpoints, CLI output, credential errors, or local Huawei Cloud account context.
4
- ---
5
-
6
- # Huawei Cloud CLI And Auth
7
-
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Use KooCLI `hcloud` for local inspection and reviewed operations. Never ask the user to paste AK/SK, SK, tokens, passwords, or credential files into chat.
12
-
13
- ## Install KooCLI
14
-
15
- Official guide: `https://support.huaweicloud.com/qs-hcli/hcli_02_003.html`.
16
-
17
- ### Windows
18
- 1. Download and unzip: `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-windows-amd64.zip`
19
- 2. Extract to `%USERPROFILE%\hcloud`, add to user `PATH`
20
- 3. Verify: `hcloud version`
21
-
22
- ### Linux (amd64 / arm64)
23
- One-liner (recommended):
24
- ```bash
25
- curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
26
- ```
27
- Or manual download:
28
- ```bash
29
- # amd64
30
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
31
- tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
32
- # arm64
33
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz"
34
- tar -zxvf huaweicloud-cli-linux-arm64.tar.gz
35
- ```
36
- Move to PATH: `mv $(pwd)/hcloud ~/.local/bin/`
37
- Verify: `hcloud version`
38
-
39
- ### macOS (amd64 / arm64)
40
- One-liner (recommended):
41
- ```bash
42
- curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
43
- ```
44
- Or manual download:
45
- ```bash
46
- # amd64
47
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-amd64.tar.gz"
48
- tar -zxvf huaweicloud-cli-mac-amd64.tar.gz
49
- # arm64 (Apple Silicon)
50
- curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-arm64.tar.gz"
51
- tar -zxvf huaweicloud-cli-mac-arm64.tar.gz
52
- ```
53
- Move to PATH: `mv $(pwd)/hcloud /usr/local/bin/`
54
- Verify: `hcloud version`
55
-
56
- Agent processes find executables through `PATH`. If OpenCode/Codex cannot find `hcloud`, restart after updating `PATH`, or set `HCLOUD_BIN`.
57
-
58
- ## Configure Credentials Outside Chat
59
-
60
- **NEVER let AK/SK enter shell history. This is the #1 credential leak vector.**
61
-
62
- - Create AK/SK in the Huawei Cloud console under `My Credentials -> Access Keys`.
63
- - **Unified credentials** (preferred): `npx huaweicloud-devkit auth init`. This is the DevKit's primary auth path; `hcloud configure init` only covers KooCLI.
64
- - **KooCLI only, interactive** (SAFE): `hcloud configure init` — prompts for AK/SK via terminal input. Values do NOT enter shell history.
65
- - **Non-interactive** (DANGEROUS — AK/SK in shell history): `hcloud configure set --cli-access-key=<AK> --cli-secret-key=<SK> --cli-region=<region>`. Only use in ephemeral CI/CD shells. User must execute outside agent chat.
66
- - If MCP is available, use `huaweicloud_show_profile_redacted` to check status without ever seeing credentials.
67
- - Never paste AK/SK, passwords, tokens, or profile files into the agent conversation.
68
- - KooCLI stores credentials in `~/.hcloud/config.json`, NOT environment variables. `HCLOUD_ACCESS_KEY` / `HCLOUD_SECRET_KEY` / `HCLOUD_REGION` env vars are NOT read by KooCLI 7.x.
69
-
70
- ## Safe Flow
71
-
72
- 1. Check whether `hcloud` is installed.
73
- 2. **KooCLI first-run privacy agreement**: On a fresh KooCLI install, `hcloud` blocks with `同意并继续使用(y)/不同意并退出(N)` and fails with `[USE_ERROR]您输入的是无效字符` in non-interactive mode. Detection: check command output for these strings. Ask the user: "KooCLI needs to accept its privacy agreement. May I accept it on your behalf?" If the user agrees, run `huaweicloud_run_readonly_command` with `args=["version"]` and `stdin="y\n"`. This accepts the agreement once, after which hcloud works normally.
74
- 3. Ask the user to configure credentials outside the agent conversation when setup is needed.
75
- 4. Inspect profile and region only through redacted tooling.
76
- 5. Discover exact operation names with `hcloud <Service> --help` before guessing. Example: ECS instance listing is commonly `ECS ListServersDetails`; ECS creation is commonly `ECS CreateServers`; image lookup may be under `IMS GlanceShowImage`.
77
- 6. Use `--cli-output=json` for machine-readable responses when supported.
78
- 7. For resource operations, include `--cli-region`, `--cli-profile`, and service-specific project information when required.
79
- 8. Classify every command before running it:
80
- - Read-only: `List*`, `Show*`, `Get*`, `Describe*`.
81
- - Write: `Create*`, `Delete*`, `Update*`, `Resize*`, `Start*`, `Stop*`, `Authorize*`, and similar.
82
- - Secret: any operation returning secret string, binary secret, token, or password.
83
- 9. For write operations, show the exact command and ask for explicit approval.
84
-
85
- ## KooCLI Syntax Notes
86
-
87
- - Prefer `--param=value`; KooCLI 7.x may reject some space-separated parameter forms.
88
- - Array-style parameters use 1-based indexes, for example `--server.nics.1.subnet_id=<subnet-id>`, not `.0`.
89
- - For ECS creation, first inspect help: `hcloud ECS CreateServers --help`.
90
- - Minimal create shape to refine after help lookup:
91
-
92
- ```bash
93
- hcloud ECS CreateServers --cli-region=<region> --server.name=<name> --server.flavorRef=<flavor-id> --server.imageRef=<image-id> --server.nics.1.subnet_id=<subnet-id> --server.root_volume.volumetype=<type>
94
- ```
95
-
96
- If a command needs an `adminPass` or other password field, do not leave plaintext secrets in shell history. Prefer local-only input or runtime injection.
97
-
98
- ## Output Formatting
99
-
100
- ```bash
101
- # JSON format (recommended for Agent)
102
- hcloud <Service> <Op> --cli-output=json
103
-
104
- # Table format (manual viewing)
105
- hcloud <Service> <Op> --cli-output=table
106
-
107
- # JMESPath filtering (extract specific fields)
108
- hcloud <Service> <ListOp> --cli-output=json --cli-query "items[?status=='ACTIVE'].{ID:id,Name:name}"
109
-
110
- # Debug mode (when commands fail)
111
- hcloud <Service> <Op> --cli-debug=true
112
- ```
113
-
114
- ## Preferred Toolkit Tools
115
-
116
- - `huaweicloud_check_cli`
117
- - `huaweicloud_show_profile_redacted`
118
- - `huaweicloud_plan_cli_command`
119
- - `huaweicloud_run_readonly_command`
120
- - `huaweicloud_list_operations`
121
- - `huaweicloud_run_approved_command`
122
-
123
- ## Do Not Run Directly
124
-
125
- - Raw `hcloud configure show/list/get/export` in agent tools.
126
- - Commands reading `.hcloud` or `.huaweicloud` files.
127
- - Commands dumping cloud credential environment variables.
128
- - Secret value reads such as CSMS `ShowSecretVersion`.
1
+ ---
2
+ name: huaweicloud-cli-and-auth
3
+ description: Safe Huawei Cloud KooCLI usage and authentication guidance. Use when working with hcloud, KooCLI, profiles, AK/SK, regions, projects, endpoints, CLI output, credential errors, or local Huawei Cloud account context.
4
+ ---
5
+
6
+ # Huawei Cloud CLI And Auth
7
+
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Use KooCLI `hcloud` for local inspection and reviewed operations. Never ask the user to paste AK/SK, SK, tokens, passwords, or credential files into chat.
12
+
13
+ ## Install KooCLI
14
+
15
+ Official guide: `https://support.huaweicloud.com/qs-hcli/hcli_02_003.html`.
16
+
17
+ ### Windows
18
+ 1. Download and unzip: `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-windows-amd64.zip`
19
+ 2. Extract to `%USERPROFILE%\hcloud`, add to user `PATH`
20
+ 3. Verify: `hcloud version`
21
+
22
+ ### Linux (amd64 / arm64)
23
+ One-liner (recommended):
24
+ ```bash
25
+ curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
26
+ ```
27
+ Or manual download:
28
+ ```bash
29
+ # amd64
30
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
31
+ tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
32
+ # arm64
33
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz"
34
+ tar -zxvf huaweicloud-cli-linux-arm64.tar.gz
35
+ ```
36
+ Move to PATH: `mv $(pwd)/hcloud ~/.local/bin/`
37
+ Verify: `hcloud version`
38
+
39
+ ### macOS (amd64 / arm64)
40
+ One-liner (recommended):
41
+ ```bash
42
+ curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
43
+ ```
44
+ Or manual download:
45
+ ```bash
46
+ # amd64
47
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-amd64.tar.gz"
48
+ tar -zxvf huaweicloud-cli-mac-amd64.tar.gz
49
+ # arm64 (Apple Silicon)
50
+ curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-arm64.tar.gz"
51
+ tar -zxvf huaweicloud-cli-mac-arm64.tar.gz
52
+ ```
53
+ Move to PATH: `mv $(pwd)/hcloud /usr/local/bin/`
54
+ Verify: `hcloud version`
55
+
56
+ Agent processes find executables through `PATH`. If OpenCode/Codex cannot find `hcloud`, restart after updating `PATH`, or set `HCLOUD_BIN`.
57
+
58
+ ## Configure Credentials Outside Chat
59
+
60
+ **NEVER let AK/SK enter shell history. This is the #1 credential leak vector.**
61
+
62
+ - Create AK/SK in the Huawei Cloud console under `My Credentials -> Access Keys`.
63
+ - **Unified credentials** (preferred): `npx huaweicloud-devkit auth init`. This is the DevKit's primary auth path; `hcloud configure init` only covers KooCLI.
64
+ - **KooCLI only, interactive** (SAFE): `hcloud configure init` — prompts for AK/SK via terminal input. Values do NOT enter shell history.
65
+ - **Non-interactive** (DANGEROUS — AK/SK in shell history): `hcloud configure set --cli-access-key=<AK> --cli-secret-key=<SK> --cli-region=<region>`. Only use in ephemeral CI/CD shells. User must execute outside agent chat.
66
+ - If MCP is available, use `huaweicloud_show_profile_redacted` to check status without ever seeing credentials.
67
+ - Never paste AK/SK, passwords, tokens, or profile files into the agent conversation.
68
+ - KooCLI stores credentials in `~/.hcloud/config.json`, NOT environment variables. `HCLOUD_ACCESS_KEY` / `HCLOUD_SECRET_KEY` / `HCLOUD_REGION` env vars are NOT read by KooCLI 7.x.
69
+
70
+ ## Safe Flow
71
+
72
+ 1. Check whether `hcloud` is installed.
73
+ 2. **KooCLI first-run privacy agreement**: On a fresh KooCLI install, `hcloud` blocks with `同意并继续使用(y)/不同意并退出(N)` and fails with `[USE_ERROR]您输入的是无效字符` in non-interactive mode. Detection: check command output for these strings. Ask the user: "KooCLI needs to accept its privacy agreement. May I accept it on your behalf?" If the user agrees, run `huaweicloud_run_readonly_command` with `args=["version"]` and `stdin="y\n"`. This accepts the agreement once, after which hcloud works normally.
74
+ 3. Ask the user to configure credentials outside the agent conversation when setup is needed.
75
+ 4. Inspect profile and region only through redacted tooling.
76
+ 5. Discover exact operation names with `hcloud <Service> --help` before guessing. Example: ECS instance listing is commonly `ECS ListServersDetails`; ECS creation is commonly `ECS CreateServers`; image lookup may be under `IMS GlanceShowImage`.
77
+ 6. Use `--cli-output=json` for machine-readable responses when supported.
78
+ 7. For resource operations, include `--cli-region`, `--cli-profile`, and service-specific project information when required.
79
+ 8. Classify every command before running it:
80
+ - Read-only: `List*`, `Show*`, `Get*`, `Describe*`.
81
+ - Write: `Create*`, `Delete*`, `Update*`, `Resize*`, `Start*`, `Stop*`, `Authorize*`, and similar.
82
+ - Secret: any operation returning secret string, binary secret, token, or password.
83
+ 9. For write operations, show the exact command and ask for explicit approval.
84
+
85
+ ## KooCLI Syntax Notes
86
+
87
+ - Prefer `--param=value`; KooCLI 7.x may reject some space-separated parameter forms.
88
+ - Array-style parameters use 1-based indexes, for example `--server.nics.1.subnet_id=<subnet-id>`, not `.0`.
89
+ - For ECS creation, first inspect help: `hcloud ECS CreateServers --help`.
90
+ - Minimal create shape to refine after help lookup:
91
+
92
+ ```bash
93
+ hcloud ECS CreateServers --cli-region=<region> --server.name=<name> --server.flavorRef=<flavor-id> --server.imageRef=<image-id> --server.nics.1.subnet_id=<subnet-id> --server.root_volume.volumetype=<type>
94
+ ```
95
+
96
+ If a command needs an `adminPass` or other password field, do not leave plaintext secrets in shell history. Prefer local-only input or runtime injection.
97
+
98
+ ## Output Formatting
99
+
100
+ ```bash
101
+ # JSON format (recommended for Agent)
102
+ hcloud <Service> <Op> --cli-output=json
103
+
104
+ # Table format (manual viewing)
105
+ hcloud <Service> <Op> --cli-output=table
106
+
107
+ # JMESPath filtering (extract specific fields)
108
+ hcloud <Service> <ListOp> --cli-output=json --cli-query "items[?status=='ACTIVE'].{ID:id,Name:name}"
109
+
110
+ # Debug mode (when commands fail)
111
+ hcloud <Service> <Op> --cli-debug=true
112
+ ```
113
+
114
+ ## Preferred Toolkit Tools
115
+
116
+ - `huaweicloud_check_cli`
117
+ - `huaweicloud_show_profile_redacted`
118
+ - `huaweicloud_plan_cli_command`
119
+ - `huaweicloud_run_readonly_command`
120
+ - `huaweicloud_list_operations`
121
+ - `huaweicloud_run_approved_command`
122
+
123
+ ## Do Not Run Directly
124
+
125
+ - Raw `hcloud configure show/list/get/export` in agent tools.
126
+ - Commands reading `.hcloud` or `.huaweicloud` files.
127
+ - Commands dumping cloud credential environment variables.
128
+ - Secret value reads such as CSMS `ShowSecretVersion`.
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud CLI And Auth"
3
- short_description: "Use KooCLI safely without exposing credentials."
4
- default_prompt: "Use $huaweicloud-cli-and-auth to check KooCLI setup safely."
1
+ interface:
2
+ display_name: "Huawei Cloud CLI And Auth"
3
+ short_description: "Use KooCLI safely without exposing credentials."
4
+ default_prompt: "Use $huaweicloud-cli-and-auth to check KooCLI setup safely."