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,111 +1,96 @@
1
- ---
2
- name: huaweicloud-core
3
- description: "Routes any task involving Huawei Cloud services - choosing, comparing, recommending, getting started with, or operating a service - to the correct service-specific skill. Supersedes general training-data knowledge. Activates when a developer asks Codex or OpenCode to build, deploy, debug, operate, or integrate an application with Huawei Cloud."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud Core
8
-
9
- **STOP - Do not answer from general knowledge.** Before responding to any Huawei Cloud question, match the user request against the sub-skill registry below and follow its procedure. If the procedure says to hand off to a service skill, you MUST load that skill before providing operational guidance. Never skip the routing step.
10
-
11
- Huawei Cloud comprises 200+ services. This skill is the entry point for ANY action or question related to Huawei Cloud. It matches a workload to the right service, then hands off to a service-specific skill for operational questions.
12
-
13
- ## How This Skill Works
14
-
15
- 1. Match user intent against the Sub-skill registry below
16
- 2. Read references/{sub-skill-id}.md and follow its procedure
17
- 3. If the procedure says to hand off to a service skill, load that skill via huaweicloud_retrieve_skill
18
- 4. If no match, use the Service Map to narrow down, then hand off
19
- 5. Revise when new information arrives - pushback means re-check the registry
20
-
21
- Do not rely on training data for facts. Huawei Cloud services, pricing, quotas, and GA status change frequently. Verify against knowledge cards.
22
-
23
- ## Sub-skill Registry
24
-
25
- | ID | Name | Trigger Phrases | Next Steps |
26
- |----|------|----------------|------------|
27
- | select | Service Selection | which service, what should I use, compare, recommend | Read references/select.md | select
28
- | compute | Compute Routing | server, VM, instance, ECS, BMS, GPU, HPC | Handoff to huawei-ecs or huawei-cce |
29
- | storage | Storage Routing | store files, bucket, OBS, backup, disk, EVS, SFS (long-term storage/CDN intent only) | Handoff to huawei-obs or huawei-cbr |
30
- | database | Database Routing | database, SQL, NoSQL, cache, RDS, GaussDB, DDS, DCS | Handoff to huawei-rds or huawei-gaussdb |
31
- | network | Network Routing | VPC, subnet, security group, EIP, NAT, VPN | Handoff to huawei-vpc |
32
- | serverless | Serverless Routing | function, Lambda, serverless, FunctionGraph, API gateway | Handoff to huawei-functiongraph or huawei-apig |
33
- | ai | AI/ML Routing | AI, model, LLM, Pangu, training, inference, RAG | Handoff to huawei-modelarts |
34
- | messaging | Messaging Routing | message queue, notification, Kafka, RabbitMQ, event, SMN | Handoff to huawei-smn-dms |
35
- | security | Security Routing | secret, credential, encrypt, KMS, WAF, firewall, DDoS | Handoff to huawei-dew or huawei-waf-aad |
36
- | observability | Observability Routing | monitor, alarm, log, audit, trace, Cloud Eye | Handoff to huawei-cloud-eye or huawei-cts |
37
- | billing | Billing Routing | cost, bill, budget, spending, invoice | Handoff to huawei-billing |
38
- | iam | IAM Routing | permission, policy, role, user, group, AK/SK | Handoff to huawei-iam |
39
- | deployment | Deployment Routing | deploy, host, publish, CI/CD, pipeline, release | CI/CD pipeline -> huawei-deployment; deploy/host/preview a web app or static website (no CI/CD target) -> present deployment-target options first, see "Deployment Target Options" below |
40
- | sandbox | Sandbox Routing | sandbox, DevStation, workspace, terminal, preview, temporary runtime | Handoff to huawei-sandbox |
41
- | cli | CLI and Auth Routing | install hcloud, configure KooCLI, AK/SK setup | Handoff to huaweicloud-cli-and-auth |
42
- | safety | Safety Routing | is this safe, approve command, risk review | Handoff to huaweicloud-safety |
43
- | troubleshoot | Troubleshooting Routing | error, bug, failed, AccessDenied, quota | Handoff to huaweicloud-troubleshooting |
44
- | api-sdk | API/SDK Routing | API call, SDK, REST, integration, code example | Handoff to huaweicloud-api-and-sdk |
45
- | report-issue | Issue Reporting | wrong service, you picked wrong, incorrect | Read references/report-issue.md |
46
-
47
- ## Service Map
48
-
49
- | Workload | Primary Service | Skill |
50
- |----------|----------------|-------|
51
- | Web application hosting | ECS | huawei-ecs |
52
- | Containerized microservices | CCE | huawei-cce |
53
- | Static file storage / CDN (long-term) | OBS | huawei-obs |
54
- | Relational database (MySQL/PG) | RDS | huawei-rds |
55
- | Distributed SQL database | GaussDB | huawei-gaussdb |
56
- | Document database (MongoDB API) | DDS | huawei-dds-dcs |
57
- | In-memory cache | DCS (Redis) | huawei-dds-dcs |
58
- | Serverless functions | FunctionGraph | huawei-functiongraph |
59
- | API management | APIG | huawei-apig |
60
- | AI model training/inference | ModelArts | huawei-modelarts |
61
- | Message queuing | DMS (Kafka/RabbitMQ) | huawei-smn-dms |
62
- | Push notifications | SMN | huawei-smn-dms |
63
- | Secret management | DEW (CSMS) | huawei-dew |
64
- | Key management | DEW (KMS) | huawei-dew |
65
- | DDoS protection | AAD | huawei-waf-aad |
66
- | Web firewall | WAF | huawei-waf-aad |
67
- | Monitoring dashboards | Cloud Eye (CES) | huawei-cloud-eye |
68
- | Audit trails | CTS | huawei-cts |
69
- | Backup / disaster recovery | CBR | huawei-cbr |
70
- | CI/CD pipeline | CloudDeploy | huawei-deployment |
71
- | Temporary runtime / web app preview | Sandbox (DevStation) | huawei-sandbox |
72
- | Getting started | Account setup | huaweicloud-cli-and-auth |
73
-
74
- ## Deployment Target Options
75
-
76
- When the intent is to **deploy, host, or preview a web app or static website** (no explicit target named), NEVER default to a single service such as OBS. Ask the developer to choose a target and present the options in this order:
77
-
78
- | # | Option | When to choose | Skill |
79
- |---|--------|----------------|-------|
80
- | 1 | **Sandbox (DevStation) — recommended** | Temporary runtime, quick preview, demo; instant public URL | huawei-sandbox |
81
- | 2 | OBS static website hosting | Long-term static hosting / CDN, no backend | huawei-obs |
82
- | 3 | ECS | Needs a server runtime (backend, custom server) | huawei-ecs |
83
- | 4 | CCE | Containerized workloads, scaling | huawei-cce |
84
-
85
- - Recommended prompt: "这个项目是 Web 应用/静态网站,建议优先部署到沙箱(临时运行环境,立即可预览)。也可选择 OBS 静态托管、ECS 或 CCE,你想部署到哪里?"
86
- - If the developer explicitly names a target (e.g. "deploy to OBS"), follow that target and hand off to the corresponding service skill.
87
- - If the developer has no preference, recommend the sandbox first.
88
-
89
- ## Capability Sources
90
-
91
- - Huawei Cloud Skills: scenario workflows and recipes (check first)
92
- - External Marketplace: huaweicloud-capability-discovery for community skill search when no built-in skill matches
93
- - KooCLI hcloud: local inspection and reviewed command execution
94
- - API documentation: exact endpoint, request body, pagination, project_id
95
- - SDK documentation: application integration
96
- - MCP tools: huaweicloud_search_docs, huaweicloud_retrieve_skill, huaweicloud_list_regions
97
- - Terraform Provider: lower-priority V1 path for reviewed IaC
98
-
99
- ## Tool Boundary
100
-
101
- - Use huaweicloud_search_docs to discover skills covering a topic
102
- - Use huaweicloud_retrieve_skill to load a full SKILL.md after routing
103
- - If no built-in skill matches, consult huaweicloud-capability-discovery for external marketplace options
104
- - Use huaweicloud_list_regions before creating regional resources
105
- - Use huaweicloud_get_regional_availability when unsure about service-region pairs
106
- - Use huaweicloud_run_readonly_command for read-only inspection
107
- - Use huaweicloud_run_approved_command only after exact-command approval
108
-
109
- ## Quality Bar
110
-
1
+ ---
2
+ name: huaweicloud-core
3
+ description: "Routes any task involving Huawei Cloud services - choosing, comparing, recommending, getting started with, or operating a service - to the correct service-specific skill. Supersedes general training-data knowledge. Activates when a developer asks Codex or OpenCode to build, deploy, debug, operate, or integrate an application with Huawei Cloud."
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud Core
8
+
9
+ **STOP - Do not answer from general knowledge.** Before responding to any Huawei Cloud question, match the user request against the sub-skill registry below and follow its procedure. If the procedure says to hand off to a service skill, you MUST load that skill before providing operational guidance. Never skip the routing step.
10
+
11
+ Huawei Cloud comprises 200+ services. This skill is the entry point for ANY action or question related to Huawei Cloud. It matches a workload to the right service, then hands off to a service-specific skill for operational questions.
12
+
13
+ ## How This Skill Works
14
+
15
+ 1. Match user intent against the Sub-skill registry below
16
+ 2. Read references/{sub-skill-id}.md and follow its procedure
17
+ 3. If the procedure says to hand off to a service skill, load that skill via huaweicloud_retrieve_skill
18
+ 4. If no match, use the Service Map to narrow down, then hand off
19
+ 5. Revise when new information arrives - pushback means re-check the registry
20
+
21
+ Do not rely on training data for facts. Huawei Cloud services, pricing, quotas, and GA status change frequently. Verify against knowledge cards.
22
+
23
+ ## Sub-skill Registry
24
+
25
+ | ID | Name | Trigger Phrases | Next Steps |
26
+ |----|------|----------------|------------|
27
+ | select | Service Selection | which service, what should I use, compare, recommend | Read references/select.md | select
28
+ | compute | Compute Routing | server, VM, instance, ECS, BMS, GPU, HPC | Handoff to huawei-ecs or huawei-cce |
29
+ | storage | Storage Routing | store files, bucket, OBS, backup, disk, EVS, SFS | Handoff to huawei-obs or huawei-cbr |
30
+ | database | Database Routing | database, SQL, NoSQL, cache, RDS, GaussDB, DDS, DCS | Handoff to huawei-rds or huawei-gaussdb |
31
+ | network | Network Routing | VPC, subnet, security group, EIP, NAT, VPN | Handoff to huawei-vpc |
32
+ | serverless | Serverless Routing | function, Lambda, serverless, FunctionGraph, API gateway | Handoff to huawei-functiongraph or huawei-apig |
33
+ | ai | AI/ML Routing | AI, model, LLM, Pangu, training, inference, RAG | Handoff to huawei-modelarts |
34
+ | messaging | Messaging Routing | message queue, notification, Kafka, RabbitMQ, event, SMN | Handoff to huawei-smn-dms |
35
+ | security | Security Routing | secret, credential, encrypt, KMS, WAF, firewall, DDoS | Handoff to huawei-dew or huawei-waf-aad |
36
+ | observability | Observability Routing | monitor, alarm, log, audit, trace, Cloud Eye | Handoff to huawei-cloud-eye or huawei-cts |
37
+ | billing | Billing Routing | cost, bill, budget, spending, invoice | Handoff to huawei-billing |
38
+ | iam | IAM Routing | permission, policy, role, user, group, AK/SK | Handoff to huawei-iam |
39
+ | deployment | Deployment Routing | deploy, CI/CD, pipeline, release | CI/CD pipeline -> huawei-deployment; deploy a web app or a GitHub repo (no CI/CD target) -> huawei-sandbox |
40
+ | sandbox | Sandbox Routing | sandbox, DevStation, workspace, terminal, preview, temporary runtime | Handoff to huawei-sandbox |
41
+ | cli | CLI and Auth Routing | install hcloud, configure KooCLI, AK/SK setup | Handoff to huaweicloud-cli-and-auth |
42
+ | safety | Safety Routing | is this safe, approve command, risk review | Handoff to huaweicloud-safety |
43
+ | troubleshoot | Troubleshooting Routing | error, bug, failed, AccessDenied, quota | Handoff to huaweicloud-troubleshooting |
44
+ | api-sdk | API/SDK Routing | API call, SDK, REST, integration, code example | Handoff to huaweicloud-api-and-sdk |
45
+ | report-issue | Issue Reporting | wrong service, you picked wrong, incorrect | Read references/report-issue.md |
46
+
47
+ ## Service Map
48
+
49
+ | Workload | Primary Service | Skill |
50
+ |----------|----------------|-------|
51
+ | Web application hosting | ECS | huawei-ecs |
52
+ | Containerized microservices | CCE | huawei-cce |
53
+ | Static file storage / CDN | OBS | huawei-obs |
54
+ | Relational database (MySQL/PG) | RDS | huawei-rds |
55
+ | Distributed SQL database | GaussDB | huawei-gaussdb |
56
+ | Document database (MongoDB API) | DDS | huawei-dds-dcs |
57
+ | In-memory cache | DCS (Redis) | huawei-dds-dcs |
58
+ | Serverless functions | FunctionGraph | huawei-functiongraph |
59
+ | API management | APIG | huawei-apig |
60
+ | AI model training/inference | ModelArts | huawei-modelarts |
61
+ | Message queuing | DMS (Kafka/RabbitMQ) | huawei-smn-dms |
62
+ | Push notifications | SMN | huawei-smn-dms |
63
+ | Secret management | DEW (CSMS) | huawei-dew |
64
+ | Key management | DEW (KMS) | huawei-dew |
65
+ | DDoS protection | AAD | huawei-waf-aad |
66
+ | Web firewall | WAF | huawei-waf-aad |
67
+ | Monitoring dashboards | Cloud Eye (CES) | huawei-cloud-eye |
68
+ | Audit trails | CTS | huawei-cts |
69
+ | Backup / disaster recovery | CBR | huawei-cbr |
70
+ | CI/CD pipeline | CloudDeploy | huawei-deployment |
71
+ | Temporary runtime / web app preview | Sandbox (DevStation) | huawei-sandbox |
72
+ | Getting started | Account setup | huaweicloud-cli-and-auth |
73
+
74
+ ## Capability Sources
75
+
76
+ - Huawei Cloud Skills: scenario workflows and recipes (check first)
77
+ - External Marketplace: huaweicloud-capability-discovery for community skill search when no built-in skill matches
78
+ - KooCLI hcloud: local inspection and reviewed command execution
79
+ - API documentation: exact endpoint, request body, pagination, project_id
80
+ - SDK documentation: application integration
81
+ - MCP tools: huaweicloud_search_docs, huaweicloud_retrieve_skill, huaweicloud_list_regions
82
+ - Terraform Provider: lower-priority V1 path for reviewed IaC
83
+
84
+ ## Tool Boundary
85
+
86
+ - Use huaweicloud_search_docs to discover skills covering a topic
87
+ - Use huaweicloud_retrieve_skill to load a full SKILL.md after routing
88
+ - If no built-in skill matches, consult huaweicloud-capability-discovery for external marketplace options
89
+ - Use huaweicloud_list_regions before creating regional resources
90
+ - Use huaweicloud_get_regional_availability when unsure about service-region pairs
91
+ - Use huaweicloud_run_readonly_command for read-only inspection
92
+ - Use huaweicloud_run_approved_command only after exact-command approval
93
+
94
+ ## Quality Bar
95
+
111
96
  Prefer short, precise instructions with commands the developer can run. Give source names and exact fields to verify. Avoid inventing service behavior. When uncertain, route to Huawei Cloud Skills or official API/SDK documentation.
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud Core"
3
- short_description: "Route Huawei Cloud tasks to Skills, CLI, API, SDK, MCP, or Terraform."
4
- default_prompt: "Use $huaweicloud-core to choose the right Huawei Cloud capability path."
1
+ interface:
2
+ display_name: "Huawei Cloud Core"
3
+ short_description: "Route Huawei Cloud tasks to Skills, CLI, API, SDK, MCP, or Terraform."
4
+ default_prompt: "Use $huaweicloud-core to choose the right Huawei Cloud capability path."
@@ -1,20 +1,20 @@
1
- # Issue Reporting Procedure
2
-
3
- Use when the user reports an issue with a previous routing decision.
4
-
5
- ## Procedure
6
-
7
- 1. Acknowledge the feedback without defensiveness
8
- 2. Re-check the Sub-skill registry for a better match
9
- 3. If a different service is clearly right, load that skill
10
- 4. If unclear, broaden the search: use huaweicloud_search_docs
11
- 5. Document the mismatch so the registry can be improved
12
-
13
- ## Common Corrections
14
-
15
- | Wrong Routing | Likely Correct |
16
- |---------------|---------------|
17
- | ECS for containers | CCE |
18
- | OBS for block storage | EVS (via huawei-ecs) |
19
- | RDS for cache | DCS (via huawei-dds-dcs) |
1
+ # Issue Reporting Procedure
2
+
3
+ Use when the user reports an issue with a previous routing decision.
4
+
5
+ ## Procedure
6
+
7
+ 1. Acknowledge the feedback without defensiveness
8
+ 2. Re-check the Sub-skill registry for a better match
9
+ 3. If a different service is clearly right, load that skill
10
+ 4. If unclear, broaden the search: use huaweicloud_search_docs
11
+ 5. Document the mismatch so the registry can be improved
12
+
13
+ ## Common Corrections
14
+
15
+ | Wrong Routing | Likely Correct |
16
+ |---------------|---------------|
17
+ | ECS for containers | CCE |
18
+ | OBS for block storage | EVS (via huawei-ecs) |
19
+ | RDS for cache | DCS (via huawei-dds-dcs) |
20
20
  | FunctionGraph for long-running tasks | ECS or CCE |
@@ -1,28 +1,28 @@
1
- # Service Selection Procedure
2
-
3
- Use when the user asks which service to use or compares services.
4
-
5
- ## Decision Flow
6
-
7
- 1. Classify workload: compute, storage, database, network, serverless, AI, messaging, security, observability
8
- 2. Check Service Map in huaweicloud-core SKILL.md
9
- 3. If multiple services match, ask clarifying questions:
10
- - Expected scale (small demo vs production)
11
- - Data model (relational vs document vs key-value)
12
- - Latency requirements
13
- - Budget constraints
14
- 4. Present top 1-2 recommendations with rationale
15
- 5. Hand off to the selected service skill
16
-
17
- ## Example: I need a database
18
-
19
- Ask:
20
- - What type of data? Structured (tables) or flexible (documents)?
21
- - What scale? Small app or enterprise?
22
- - Do you need SQL queries?
23
-
24
- Route based on answers:
25
- - SQL + standard scale -> huawei-rds
26
- - SQL + massive scale / distributed -> huawei-gaussdb
27
- - Document model (MongoDB-compatible) -> huawei-dds-dcs
1
+ # Service Selection Procedure
2
+
3
+ Use when the user asks which service to use or compares services.
4
+
5
+ ## Decision Flow
6
+
7
+ 1. Classify workload: compute, storage, database, network, serverless, AI, messaging, security, observability
8
+ 2. Check Service Map in huaweicloud-core SKILL.md
9
+ 3. If multiple services match, ask clarifying questions:
10
+ - Expected scale (small demo vs production)
11
+ - Data model (relational vs document vs key-value)
12
+ - Latency requirements
13
+ - Budget constraints
14
+ 4. Present top 1-2 recommendations with rationale
15
+ 5. Hand off to the selected service skill
16
+
17
+ ## Example: I need a database
18
+
19
+ Ask:
20
+ - What type of data? Structured (tables) or flexible (documents)?
21
+ - What scale? Small app or enterprise?
22
+ - Do you need SQL queries?
23
+
24
+ Route based on answers:
25
+ - SQL + standard scale -> huawei-rds
26
+ - SQL + massive scale / distributed -> huawei-gaussdb
27
+ - Document model (MongoDB-compatible) -> huawei-dds-dcs
28
28
  - Cache / key-value -> huawei-dds-dcs (DCS)
@@ -1,60 +1,60 @@
1
- ---
2
- name: huaweicloud-safety
3
- description: Huawei Cloud safety policy for agents. Use when handling credentials, secrets, IAM, public exposure, billing, destructive actions, scaling, write operations, hooks, command approval, output redaction, or risk review.
4
- ---
5
-
6
- # Huawei Cloud Safety
7
-
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Use this skill before any Huawei Cloud action that may expose secrets, change resources, affect cost, change IAM, or expose a network endpoint.
12
-
13
- ## Rules
14
-
15
- 1. Never ask the user to paste AK/SK, SK, tokens, passwords, private keys, or credential files.
16
- 2. Never read local `.hcloud` or `.huaweicloud` credential files into the agent context.
17
- 3. Never call APIs or CLI operations that return secret values directly into the agent context.
18
- 4. Always classify operations before execution:
19
- - read-only
20
- - write
21
- - secret
22
- - IAM/security
23
- - cost/payment
24
- - public exposure
25
- 5. For any non-read-only operation, show the exact planned change and wait for explicit user approval.
26
- 6. Redact secrets from command output, errors, JSON, logs, and generated reports.
27
- 7. If a command contains `adminPass`, `password`, token, or any secret-like field, warn that plaintext can remain in shell history. Prefer local-only input, runtime injection, or user-side execution.
28
-
29
- ## Enforcement Layers
30
-
31
- - Hooks: `hooks/huaweicloud-safety.py` can block risky tool calls on platforms that support plugin hooks.
32
- - MCP wrapper: the Node MCP server applies the same safety policy for Codex/OpenCode paths that do not enforce hooks.
33
- - Skills: this document teaches agents the rule before they act.
34
-
35
- ## Write Execution Boundary
36
-
37
- - Default path: use `huaweicloud_plan_cli_command` to produce a reviewed command block, then let the user or host agent execute it after approval.
38
- - Approved tool path: use `huaweicloud_run_approved_command` only when the exact planned command has been shown and the user explicitly approved that exact command.
39
- - After a write, verify with `huaweicloud_run_readonly_command` or another read-only check.
40
-
41
- ## Proactive Hook Checks
42
-
43
- Before executing, deploying, or handing generated cloud artifacts to the user, run the matching check when available:
44
-
45
- - `huaweicloud_hook_check_command` for shell or KooCLI command text.
46
- - `huaweicloud_hook_check_artifacts` for generated policy, IaC, config, workflow, or deployment files.
47
- - `huaweicloud_hook_check_deploy_plan` for sandbox, preview, FunctionGraph, ECS, CCE, APIG, OBS, IAM, or cost-affecting plans.
48
-
49
- If the result is `deny`, repair the command, artifact, or deployment plan before execution. If the result is `warn`, show the warning to the user and repair or ask for explicit confirmation.
50
-
51
- ## Static Analysis Boundary
52
-
53
- Hook checks inspect the command or plan text that is available before execution. If a command builds cloud parameters through shell variables, string concatenation, subshells, encoded payloads, or generated scripts, first expand the final command into reviewable text and run `huaweicloud_hook_check_command` on that final form. When the final values cannot be determined, stop and ask the user to review the expanded command or use `huaweicloud_plan_cli_command` before execution.
54
-
55
- ## Safe Alternatives
56
-
57
- - Use redacted profile inspection instead of raw `hcloud configure show`.
58
- - Use runtime secret injection instead of fetching secret values into chat.
59
- - Use read-only verification after a write.
60
- - Prefer reviewed IaC for durable infrastructure changes.
1
+ ---
2
+ name: huaweicloud-safety
3
+ description: Huawei Cloud safety policy for agents. Use when handling credentials, secrets, IAM, public exposure, billing, destructive actions, scaling, write operations, hooks, command approval, output redaction, or risk review.
4
+ ---
5
+
6
+ # Huawei Cloud Safety
7
+
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Use this skill before any Huawei Cloud action that may expose secrets, change resources, affect cost, change IAM, or expose a network endpoint.
12
+
13
+ ## Rules
14
+
15
+ 1. Never ask the user to paste AK/SK, SK, tokens, passwords, private keys, or credential files.
16
+ 2. Never read local `.hcloud` or `.huaweicloud` credential files into the agent context.
17
+ 3. Never call APIs or CLI operations that return secret values directly into the agent context.
18
+ 4. Always classify operations before execution:
19
+ - read-only
20
+ - write
21
+ - secret
22
+ - IAM/security
23
+ - cost/payment
24
+ - public exposure
25
+ 5. For any non-read-only operation, show the exact planned change and wait for explicit user approval.
26
+ 6. Redact secrets from command output, errors, JSON, logs, and generated reports.
27
+ 7. If a command contains `adminPass`, `password`, token, or any secret-like field, warn that plaintext can remain in shell history. Prefer local-only input, runtime injection, or user-side execution.
28
+
29
+ ## Enforcement Layers
30
+
31
+ - Hooks: `hooks/huaweicloud-safety.py` can block risky tool calls on platforms that support plugin hooks.
32
+ - MCP wrapper: the Node MCP server applies the same safety policy for Codex/OpenCode paths that do not enforce hooks.
33
+ - Skills: this document teaches agents the rule before they act.
34
+
35
+ ## Write Execution Boundary
36
+
37
+ - Default path: use `huaweicloud_plan_cli_command` to produce a reviewed command block, then let the user or host agent execute it after approval.
38
+ - Approved tool path: use `huaweicloud_run_approved_command` only when the exact planned command has been shown and the user explicitly approved that exact command.
39
+ - After a write, verify with `huaweicloud_run_readonly_command` or another read-only check.
40
+
41
+ ## Proactive Hook Checks
42
+
43
+ Before executing, deploying, or handing generated cloud artifacts to the user, run the matching check when available:
44
+
45
+ - `huaweicloud_hook_check_command` for shell or KooCLI command text.
46
+ - `huaweicloud_hook_check_artifacts` for generated policy, IaC, config, workflow, or deployment files.
47
+ - `huaweicloud_hook_check_deploy_plan` for sandbox, preview, FunctionGraph, ECS, CCE, APIG, OBS, IAM, or cost-affecting plans.
48
+
49
+ If the result is `deny`, repair the command, artifact, or deployment plan before execution. If the result is `warn`, show the warning to the user and repair or ask for explicit confirmation.
50
+
51
+ ## Static Analysis Boundary
52
+
53
+ Hook checks inspect the command or plan text that is available before execution. If a command builds cloud parameters through shell variables, string concatenation, subshells, encoded payloads, or generated scripts, first expand the final command into reviewable text and run `huaweicloud_hook_check_command` on that final form. When the final values cannot be determined, stop and ask the user to review the expanded command or use `huaweicloud_plan_cli_command` before execution.
54
+
55
+ ## Safe Alternatives
56
+
57
+ - Use redacted profile inspection instead of raw `hcloud configure show`.
58
+ - Use runtime secret injection instead of fetching secret values into chat.
59
+ - Use read-only verification after a write.
60
+ - Prefer reviewed IaC for durable infrastructure changes.
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud Safety"
3
- short_description: "Keep Huawei Cloud agent operations safe and redacted."
4
- default_prompt: "Use $huaweicloud-safety to review this Huawei Cloud operation."
1
+ interface:
2
+ display_name: "Huawei Cloud Safety"
3
+ short_description: "Keep Huawei Cloud agent operations safe and redacted."
4
+ default_prompt: "Use $huaweicloud-safety to review this Huawei Cloud operation."
@@ -1,83 +1,83 @@
1
- ---
2
- name: huaweicloud-troubleshooting
3
- description: Troubleshoot Huawei Cloud CLI, API, SDK, deployment, permission, region, quota, endpoint, and resource errors. Use when commands fail, APIs return errors, resources are missing, or the user needs a structured diagnosis.
4
- ---
5
-
6
- # Huawei Cloud Troubleshooting
7
-
8
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
9
-
10
- Use evidence before fixes. Do not guess service behavior when request IDs, region, project_id, and exact errors can identify the issue.
11
-
12
- ## Critical Warnings
13
-
14
- | Trap | Why |
15
- |------|-----|
16
- | Error in response body, not HTTP status | Many APIs return HTTP 200 with error in JSON body. Always check `error_code` and `error_msg` |
17
- | Missing `project_id` is common | New users often omit project_id from API path or CLI. Get it from `IAM KeystoneListProjects` |
18
- | Sandbox may block hcloud | OpenCode/Codex sandbox can block hcloud metadata files in `~/.hcloud/`. Use `dangerouslyDisableSandbox` or Bash tool |
19
- | KooCLI param prefix varies | VPC params need `--vpc.x`, ECS params need `--server.x`, ALWAYS check `--help` first |
20
-
21
- ## Workflow
22
-
23
- 1. Capture the redacted error message, service, operation, region, project_id, and request_id.
24
- 2. Classify likely cause:
25
- - auth or permission
26
- - wrong region or endpoint
27
- - wrong project_id
28
- - missing resource
29
- - quota or account limit
30
- - invalid request body
31
- - service-side failure
32
- 3. Run the smallest read-only check that can prove or disprove the cause.
33
- 4. Compare with official API/SDK docs or Huawei Cloud Skills if the operation contract is uncertain.
34
- 5. Propose one fix at a time.
35
- 6. Verify with read-only observation after the fix.
36
-
37
- ## Common Checks
38
-
39
- | Check | Command |
40
- |-------|---------|
41
- | Authentication | `hcloud configure list` (redacted) |
42
- | Region | Match CLI region, endpoint, and resource region |
43
- | Project ID | `hcloud IAM KeystoneListProjects` |
44
- | Pagination | Add `--limit=100` and check `marker` |
45
- | Quota | Check service quotas in console or API |
46
- | IAM Permission | Verify user/role has required action — see `huawei-iam` skill |
47
- | KooCLI version | `hcloud version` |
48
-
49
- ## Common Error Codes
50
-
51
- | Error | Likely Cause | Fix |
52
- |-------|-------------|-----|
53
- | AuthFailure / 401 | AK/SK invalid or expired | Regenerate AK/SK, re-run `npx huaweicloud-devkit auth init` |
54
- | AccessDenied / 403 | IAM permission missing | Check `huawei-iam` skill, add required policy action |
55
- | NoSuchKey / 404 | Resource not found | Verify resource ID, region, and project_id |
56
- | QuotaExceeded | Account limit reached | Request quota increase in console |
57
- | [USE_ERROR] 不正确的参数 | Wrong param name | Run `--help`, check `--param=value` format and nested prefix |
58
- | Ecs.0005 | Flavor-image mismatch | Check image `__support_*` against flavor virtualization type |
59
- | FSS.0400 | FunctionGraph latest version error | Strip `:latest` from function URN |
60
- | FSS.1417 | DEDICATEDGATEWAY missing params | Add instance_id, group_id, protocol, env_name, env_id |
61
- | APIC.7201 | Missing security_group_id | Add `--security_group_id` param for APIG CreateInstanceV2 |
62
- | [NETWORK_ERROR] | Transient network failure | Retry with `maxRetries` param or wait and retry |
63
-
64
- ## KooCLI Error Types
65
-
66
- KooCLI classifies errors into 5 types. The error type prefix in the message guides initial diagnosis:
67
-
68
- | Type | Meaning | First Check |
69
- |------|---------|-------------|
70
- | `[NETWORK_ERROR]` | HTTP request exception | Network connectivity, firewall, endpoint reachability |
71
- | `[CLI_ERROR]` | KooCLI internal error | Contact KooCLI support |
72
- | `[USE_ERROR]` | Incorrect command parameters | Run `--help`, check param names and format |
73
- | `[OPENAPI_ERROR]` | Cloud service API error | Check service docs, contact service support |
74
- | `[APIE_ERROR]` | API Explorer metadata error | Contact API Explorer support |
75
-
76
- Enable debug with `--cli-debug=true` to see the underlying HTTP request/response and pinpoint network or endpoint issues.
77
-
78
- ## Cross-Skill References
79
-
80
- - **IAM permissions**: See `huawei-iam`
81
- - **CLI auth setup**: See `huaweicloud-cli-and-auth`
82
- - **ECS specific errors**: See `huawei-ecs`
83
- - **FunctionGraph specific**: See `huawei-functiongraph`
1
+ ---
2
+ name: huaweicloud-troubleshooting
3
+ description: Troubleshoot Huawei Cloud CLI, API, SDK, deployment, permission, region, quota, endpoint, and resource errors. Use when commands fail, APIs return errors, resources are missing, or the user needs a structured diagnosis.
4
+ ---
5
+
6
+ # Huawei Cloud Troubleshooting
7
+
8
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
9
+
10
+ Use evidence before fixes. Do not guess service behavior when request IDs, region, project_id, and exact errors can identify the issue.
11
+
12
+ ## Critical Warnings
13
+
14
+ | Trap | Why |
15
+ |------|-----|
16
+ | Error in response body, not HTTP status | Many APIs return HTTP 200 with error in JSON body. Always check `error_code` and `error_msg` |
17
+ | Missing `project_id` is common | New users often omit project_id from API path or CLI. Get it from `IAM KeystoneListProjects` |
18
+ | Sandbox may block hcloud | OpenCode/Codex sandbox can block hcloud metadata files in `~/.hcloud/`. Use `dangerouslyDisableSandbox` or Bash tool |
19
+ | KooCLI param prefix varies | VPC params need `--vpc.x`, ECS params need `--server.x`, ALWAYS check `--help` first |
20
+
21
+ ## Workflow
22
+
23
+ 1. Capture the redacted error message, service, operation, region, project_id, and request_id.
24
+ 2. Classify likely cause:
25
+ - auth or permission
26
+ - wrong region or endpoint
27
+ - wrong project_id
28
+ - missing resource
29
+ - quota or account limit
30
+ - invalid request body
31
+ - service-side failure
32
+ 3. Run the smallest read-only check that can prove or disprove the cause.
33
+ 4. Compare with official API/SDK docs or Huawei Cloud Skills if the operation contract is uncertain.
34
+ 5. Propose one fix at a time.
35
+ 6. Verify with read-only observation after the fix.
36
+
37
+ ## Common Checks
38
+
39
+ | Check | Command |
40
+ |-------|---------|
41
+ | Authentication | `hcloud configure list` (redacted) |
42
+ | Region | Match CLI region, endpoint, and resource region |
43
+ | Project ID | `hcloud IAM KeystoneListProjects` |
44
+ | Pagination | Add `--limit=100` and check `marker` |
45
+ | Quota | Check service quotas in console or API |
46
+ | IAM Permission | Verify user/role has required action — see `huawei-iam` skill |
47
+ | KooCLI version | `hcloud version` |
48
+
49
+ ## Common Error Codes
50
+
51
+ | Error | Likely Cause | Fix |
52
+ |-------|-------------|-----|
53
+ | AuthFailure / 401 | AK/SK invalid or expired | Regenerate AK/SK, re-run `npx huaweicloud-devkit auth init` |
54
+ | AccessDenied / 403 | IAM permission missing | Check `huawei-iam` skill, add required policy action |
55
+ | NoSuchKey / 404 | Resource not found | Verify resource ID, region, and project_id |
56
+ | QuotaExceeded | Account limit reached | Request quota increase in console |
57
+ | [USE_ERROR] 不正确的参数 | Wrong param name | Run `--help`, check `--param=value` format and nested prefix |
58
+ | Ecs.0005 | Flavor-image mismatch | Check image `__support_*` against flavor virtualization type |
59
+ | FSS.0400 | FunctionGraph latest version error | Strip `:latest` from function URN |
60
+ | FSS.1417 | DEDICATEDGATEWAY missing params | Add instance_id, group_id, protocol, env_name, env_id |
61
+ | APIC.7201 | Missing security_group_id | Add `--security_group_id` param for APIG CreateInstanceV2 |
62
+ | [NETWORK_ERROR] | Transient network failure | Retry with `maxRetries` param or wait and retry |
63
+
64
+ ## KooCLI Error Types
65
+
66
+ KooCLI classifies errors into 5 types. The error type prefix in the message guides initial diagnosis:
67
+
68
+ | Type | Meaning | First Check |
69
+ |------|---------|-------------|
70
+ | `[NETWORK_ERROR]` | HTTP request exception | Network connectivity, firewall, endpoint reachability |
71
+ | `[CLI_ERROR]` | KooCLI internal error | Contact KooCLI support |
72
+ | `[USE_ERROR]` | Incorrect command parameters | Run `--help`, check param names and format |
73
+ | `[OPENAPI_ERROR]` | Cloud service API error | Check service docs, contact service support |
74
+ | `[APIE_ERROR]` | API Explorer metadata error | Contact API Explorer support |
75
+
76
+ Enable debug with `--cli-debug=true` to see the underlying HTTP request/response and pinpoint network or endpoint issues.
77
+
78
+ ## Cross-Skill References
79
+
80
+ - **IAM permissions**: See `huawei-iam`
81
+ - **CLI auth setup**: See `huaweicloud-cli-and-auth`
82
+ - **ECS specific errors**: See `huawei-ecs`
83
+ - **FunctionGraph specific**: See `huawei-functiongraph`
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Huawei Cloud Troubleshooting"
3
- short_description: "Diagnose Huawei Cloud errors using evidence and read-only checks."
4
- default_prompt: "Use $huaweicloud-troubleshooting to diagnose this Huawei Cloud error."
1
+ interface:
2
+ display_name: "Huawei Cloud Troubleshooting"
3
+ short_description: "Diagnose Huawei Cloud errors using evidence and read-only checks."
4
+ default_prompt: "Use $huaweicloud-troubleshooting to diagnose this Huawei Cloud error."