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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +178 -138
  4. package/README.zh-CN.md +176 -138
  5. package/bin/setup.cjs +10 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +11 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +60 -44
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
  13. package/plugins/huaweicloud-core/.mcp.json +13 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
  15. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  16. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  17. package/plugins/huaweicloud-core/safety/policy.json +76 -100
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
  19. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
  20. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  21. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  22. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
  24. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
  26. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  27. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  28. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
  34. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  35. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
  40. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  41. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  42. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  43. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
  44. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  45. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
  46. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
  47. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  48. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
  49. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
  50. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
  52. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
  53. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  54. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
  56. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  57. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
  58. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
  60. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
  61. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  62. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
  63. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  64. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
  65. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  66. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
  67. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  68. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
  69. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  70. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
  73. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  74. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  75. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  76. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  80. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
  81. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  82. package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
  83. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
  84. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
  85. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
  86. package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
  87. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
  88. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
  89. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
  90. package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
  91. package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
  92. package/plugins/huaweicloud-core/src/tools.mjs +463 -111
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
  95. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
  96. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
  97. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
  98. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  99. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
@@ -1,124 +1,171 @@
1
- #!/usr/bin/env node
2
- import { Buffer } from 'node:buffer';
3
-
4
- const INDEX_URL = 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main';
5
- const CN_EN_MAP_URL = 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main';
6
-
7
- const GENERIC_KEYWORDS = new Set([
8
- '华为云', 'huawei', 'huawei cloud', '云', 'cloud', '技能', 'skill', 'skills',
9
- '所有', 'all', '全部', '有什么', '有哪些', '相关', '列表', 'list',
10
- '查找', '搜索', '发现', '浏览', 'find', 'search', 'discover', 'browse',
11
- 'show', 'explore', 'agent', '市场', 'market', '类目', 'category', '安装', 'install',
12
- ]);
13
-
14
- async function fetchJson(url, label) {
15
- const resp = await fetch(url, { headers: { 'User-Agent': 'huaweicloud-devkit/1.0' } });
16
- const data = await resp.json();
17
- if (data?.encoding === 'base64' && data.content) {
18
- return JSON.parse(Buffer.from(data.content, 'base64').toString('utf8'));
19
- }
20
- return data;
21
- }
22
-
23
- function isGeneric(kw) {
24
- const k = kw.toLowerCase().trim();
25
- return GENERIC_KEYWORDS.has(k) || /华为云|huawei/i.test(k);
26
- }
27
-
28
- function expandKeywords(raw, cnEnMap) {
29
- if (!raw) return [[], []];
30
- const parts = raw.replace(/[,;]/g, ' ').split(/\s+/).filter(Boolean);
31
- const expanded = [...parts];
32
- for (const p of parts) {
33
- const lower = p.toLowerCase();
34
- if (cnEnMap[p]) expanded.push(cnEnMap[p]);
35
- for (const [cn, en] of Object.entries(cnEnMap)) {
36
- if (en === lower) expanded.push(cn);
37
- }
38
- }
39
- const unique = [...new Set(expanded)].sort();
40
- return [unique.filter((kw) => !isGeneric(kw)), unique.filter((kw) => isGeneric(kw))];
41
- }
42
-
43
- function scoreSkill(skill, specificKws, genericKws) {
44
- if (!specificKws.length && !genericKws.length) return [1, []];
45
- let total = 0;
46
- const matched = [];
47
- const nl = (skill.name || '').toLowerCase();
48
- const dl = (skill.description || '').toLowerCase();
49
- const sl = (skill.service || '').toLowerCase();
50
- const tl = (skill.triggers || []).map((t) => (t || '').toLowerCase());
51
-
52
- for (const kw of specificKws) {
53
- const k = kw.toLowerCase();
54
- let s = 0;
55
- if (nl.includes(k)) s += 10;
56
- else if (tl.some((t) => t.includes(k))) s += 8;
57
- else if (dl.includes(k)) s += 5;
58
- else if (sl.includes(k)) s += 3;
59
- if (s > 0) { total += s; matched.push(kw); }
60
- }
61
- for (const kw of genericKws) {
62
- const k = kw.toLowerCase();
63
- let s = 0;
64
- if (nl.includes(k)) s += 10;
65
- else if (tl.some((t) => t.includes(k))) s += 4;
66
- else if (dl.includes(k)) s += 2;
67
- else if (sl.includes(k)) s += 1;
68
- if (s > 0) { total += s; matched.push(kw); }
69
- }
70
- if (!specificKws.length && total === 0) {
71
- total = 1;
72
- if (dl.length > 20) total += 1;
73
- if (tl.length) total += 1;
74
- }
75
- return [total, matched];
76
- }
77
-
78
- async function main() {
79
- const keyword = process.argv.slice(2).filter((a) => !a.startsWith('-')).join(' ') || '';
80
- const catIdx = process.argv.indexOf('-c');
81
- const category = catIdx >= 0 ? process.argv[catIdx + 1] || '' : '';
82
-
83
- try {
84
- const [idx, cnEnMap] = await Promise.all([
85
- fetchJson(INDEX_URL, 'index'),
86
- fetchJson(CN_EN_MAP_URL, 'cn-en-map'),
87
- ]);
88
-
89
- if (!keyword && !category) {
90
- console.log(`Categories: ${(idx.categories || []).join(', ')}`);
91
- console.log('Usage: node search-skills.mjs <keyword> [-c <category>]');
92
- return;
93
- }
94
-
95
- const [specificKws, genericKws] = expandKeywords(keyword, cnEnMap);
96
- const hasSpecific = specificKws.length > 0;
97
-
98
- const results = [];
99
- for (const skill of idx.skills || []) {
100
- if (category && skill.category !== category) continue;
101
- const [score, matched] = scoreSkill(skill, specificKws, genericKws);
102
- if (hasSpecific && score === 0) continue;
103
- const desc = (skill.description || '').slice(0, 150);
104
- results.push({ score, name: skill.name, category: skill.category, service: skill.service, description: desc + (skill.description?.length > 150 ? '...' : ''), triggers: (skill.triggers || []).slice(0, 5), matched });
105
- }
106
- results.sort((a, b) => b.score - a.score);
107
-
108
- if (!results.length) {
109
- console.log(`No results. Try broader keywords, remove category filter, or switch CN↔EN.`);
110
- return;
111
- }
112
-
113
- console.log(`Found ${results.length} skill(s):`);
114
- for (const r of results) {
115
- console.log(` [${r.score}pts] ${r.name} (${r.category}/${r.service})${r.matched.length ? ' matched: ' + r.matched.join(',') : ''}`);
116
- console.log(` ${r.description}`);
117
- }
118
- } catch (e) {
119
- console.error(`Error: ${e.message}`);
120
- process.exit(1);
121
- }
122
- }
123
-
124
- main();
1
+ import { Buffer } from 'node:buffer';
2
+
3
+ const INDEX_URL =
4
+ 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main';
5
+ const CN_EN_MAP_URL =
6
+ 'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main';
7
+
8
+ const GENERIC_KEYWORDS = new Set([
9
+ '华为云',
10
+ 'huawei',
11
+ 'huawei cloud',
12
+ '云',
13
+ 'cloud',
14
+ '技能',
15
+ 'skill',
16
+ 'skills',
17
+ '所有',
18
+ 'all',
19
+ '全部',
20
+ '有什么',
21
+ '有哪些',
22
+ '相关',
23
+ '列表',
24
+ 'list',
25
+ '查找',
26
+ '搜索',
27
+ '发现',
28
+ '浏览',
29
+ 'find',
30
+ 'search',
31
+ 'discover',
32
+ 'browse',
33
+ 'show',
34
+ 'explore',
35
+ 'agent',
36
+ '市场',
37
+ 'market',
38
+ '类目',
39
+ 'category',
40
+ '安装',
41
+ 'install',
42
+ ]);
43
+
44
+ async function fetchJson(url, _label) {
45
+ const resp = await fetch(url, { headers: { 'User-Agent': 'huaweicloud-devkit/1.0' } });
46
+ const data = await resp.json();
47
+ if (data?.encoding === 'base64' && data.content) {
48
+ return JSON.parse(Buffer.from(data.content, 'base64').toString('utf8'));
49
+ }
50
+ return data;
51
+ }
52
+
53
+ function isGeneric(kw) {
54
+ const k = kw.toLowerCase().trim();
55
+ return GENERIC_KEYWORDS.has(k) || /华为云|huawei/i.test(k);
56
+ }
57
+
58
+ function expandKeywords(raw, cnEnMap) {
59
+ if (!raw) return [[], []];
60
+ const parts = raw.replace(/[,;]/g, ' ').split(/\s+/).filter(Boolean);
61
+ const expanded = [...parts];
62
+ for (const p of parts) {
63
+ const lower = p.toLowerCase();
64
+ if (cnEnMap[p]) expanded.push(cnEnMap[p]);
65
+ for (const [cn, en] of Object.entries(cnEnMap)) {
66
+ if (en === lower) expanded.push(cn);
67
+ }
68
+ }
69
+ const unique = [...new Set(expanded)].sort();
70
+ return [unique.filter((kw) => !isGeneric(kw)), unique.filter((kw) => isGeneric(kw))];
71
+ }
72
+
73
+ function scoreSkill(skill, specificKws, genericKws) {
74
+ if (!specificKws.length && !genericKws.length) return [1, []];
75
+ let total = 0;
76
+ const matched = [];
77
+ const nl = (skill.name || '').toLowerCase();
78
+ const dl = (skill.description || '').toLowerCase();
79
+ const sl = (skill.service || '').toLowerCase();
80
+ const tl = (skill.triggers || []).map((t) => (t || '').toLowerCase());
81
+
82
+ for (const kw of specificKws) {
83
+ const k = kw.toLowerCase();
84
+ let s = 0;
85
+ if (nl.includes(k)) s += 10;
86
+ else if (tl.some((t) => t.includes(k))) s += 8;
87
+ else if (dl.includes(k)) s += 5;
88
+ else if (sl.includes(k)) s += 3;
89
+ if (s > 0) {
90
+ total += s;
91
+ matched.push(kw);
92
+ }
93
+ }
94
+ for (const kw of genericKws) {
95
+ const k = kw.toLowerCase();
96
+ let s = 0;
97
+ if (nl.includes(k)) s += 10;
98
+ else if (tl.some((t) => t.includes(k))) s += 4;
99
+ else if (dl.includes(k)) s += 2;
100
+ else if (sl.includes(k)) s += 1;
101
+ if (s > 0) {
102
+ total += s;
103
+ matched.push(kw);
104
+ }
105
+ }
106
+ if (!specificKws.length && total === 0) {
107
+ total = 1;
108
+ if (dl.length > 20) total += 1;
109
+ if (tl.length) total += 1;
110
+ }
111
+ return [total, matched];
112
+ }
113
+
114
+ async function main() {
115
+ const keyword =
116
+ process.argv
117
+ .slice(2)
118
+ .filter((a) => !a.startsWith('-'))
119
+ .join(' ') || '';
120
+ const catIdx = process.argv.indexOf('-c');
121
+ const category = catIdx >= 0 ? process.argv[catIdx + 1] || '' : '';
122
+
123
+ try {
124
+ const [idx, cnEnMap] = await Promise.all([fetchJson(INDEX_URL, 'index'), fetchJson(CN_EN_MAP_URL, 'cn-en-map')]);
125
+
126
+ if (!keyword && !category) {
127
+ console.log(`Categories: ${(idx.categories || []).join(', ')}`);
128
+ console.log('Usage: node search-skills.mjs <keyword> [-c <category>]');
129
+ return;
130
+ }
131
+
132
+ const [specificKws, genericKws] = expandKeywords(keyword, cnEnMap);
133
+ const hasSpecific = specificKws.length > 0;
134
+
135
+ const results = [];
136
+ for (const skill of idx.skills || []) {
137
+ if (category && skill.category !== category) continue;
138
+ const [score, matched] = scoreSkill(skill, specificKws, genericKws);
139
+ if (hasSpecific && score === 0) continue;
140
+ const desc = (skill.description || '').slice(0, 150);
141
+ results.push({
142
+ score,
143
+ name: skill.name,
144
+ category: skill.category,
145
+ service: skill.service,
146
+ description: desc + (skill.description?.length > 150 ? '...' : ''),
147
+ triggers: (skill.triggers || []).slice(0, 5),
148
+ matched,
149
+ });
150
+ }
151
+ results.sort((a, b) => b.score - a.score);
152
+
153
+ if (!results.length) {
154
+ console.log(`No results. Try broader keywords, remove category filter, or switch CN↔EN.`);
155
+ return;
156
+ }
157
+
158
+ console.log(`Found ${results.length} skill(s):`);
159
+ for (const r of results) {
160
+ console.log(
161
+ ` [${r.score}pts] ${r.name} (${r.category}/${r.service})${r.matched.length ? ' matched: ' + r.matched.join(',') : ''}`,
162
+ );
163
+ console.log(` ${r.description}`);
164
+ }
165
+ } catch (e) {
166
+ console.error(`Error: ${e.message}`);
167
+ process.exit(1);
168
+ }
169
+ }
170
+
171
+ main();
@@ -1,55 +1,55 @@
1
- ---
2
- name: huawei-cts
3
- description: "Use when managing Cloud Trace Service (CTS) audit logs, trackers, and traces on Huawei Cloud. Triggers: CTS, Cloud Trace, audit log, tracker, trace, operation record. NOT for: CES monitoring alarms (use huawei-cloud-eye), log analysis (use LTS)."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud CTS
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Always run `hcloud CTS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
-
13
- ## Overview
14
-
15
- Domain expertise for Cloud Trace Service. Covers trackers, traces, notifications, and resource tags.
16
-
17
- ## Critical Warnings
18
-
19
- | Trap | Why |
20
- |------|-----|
21
- | Tracker required for traces | Must create a tracker before traces are recorded |
22
- | OBS bucket prerequisite | Tracker needs an OBS bucket for log delivery |
23
- | 7-day retention default | Trace data retained 7 days by default. Create LTS tracker for longer retention |
24
- | Organization tracker | Cross-account auditing requires organization tracker |
25
-
26
- ## Common Workflows
27
-
28
- | Task | Operation |
29
- |------|-----------|
30
- | List operations | `ListOperations --cli-region=<r> --project_id=<p>` |
31
- | List traces | `ListTraces --cli-region=<r> --project_id=<p>` |
32
- | Create tracker | `CreateTracker --cli-region=<r> --project_id=<p>` |
33
- | List trackers | `ListTrackers --cli-region=<r> --project_id=<p>` |
34
- | Delete tracker | `DeleteTracker --cli-region=<r> --project_id=<p>` |
35
- | Create notification | `CreateNotification --cli-region=<r> --project_id=<p>` |
36
- | List notifications | `ListNotifications --cli-region=<r> --project_id=<p>` |
37
- | List trace resources | `ListTraceResources --cli-region=<r> --project_id=<p>` |
38
-
39
- Discover exact parameters with `--help` before executing any command.
40
-
41
- ## Troubleshooting
42
-
43
- | Error | Fix |
44
- |-------|-----|
45
- | No traces found | Check tracker is created and enabled. Filter by time range |
46
- | Tracker creation fails | Ensure OBS bucket exists and has correct permissions |
47
-
48
- ## Security
49
-
50
- - SHOULD enable CTS for all production accounts
51
- - MUST use OBS server-side encryption for trace logs
52
-
53
- ## Cross-Skill References
54
-
55
- - **OBS**: See `huawei-obs` for tracker log delivery bucket
1
+ ---
2
+ name: huawei-cts
3
+ description: 'Use when managing Cloud Trace Service (CTS) audit logs, trackers, and traces on Huawei Cloud. Triggers: CTS, Cloud Trace, audit log, tracker, trace, operation record. NOT for: CES monitoring alarms (use huawei-cloud-eye), log analysis (use LTS).'
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud CTS
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Always run `hcloud CTS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
12
+
13
+ ## Overview
14
+
15
+ Domain expertise for Cloud Trace Service. Covers trackers, traces, notifications, and resource tags.
16
+
17
+ ## Critical Warnings
18
+
19
+ | Trap | Why |
20
+ | --------------------------- | ------------------------------------------------------------------------------ |
21
+ | Tracker required for traces | Must create a tracker before traces are recorded |
22
+ | OBS bucket prerequisite | Tracker needs an OBS bucket for log delivery |
23
+ | 7-day retention default | Trace data retained 7 days by default. Create LTS tracker for longer retention |
24
+ | Organization tracker | Cross-account auditing requires organization tracker |
25
+
26
+ ## Common Workflows
27
+
28
+ | Task | Operation |
29
+ | -------------------- | ------------------------------------------------------ |
30
+ | List operations | `ListOperations --cli-region=<r> --project_id=<p>` |
31
+ | List traces | `ListTraces --cli-region=<r> --project_id=<p>` |
32
+ | Create tracker | `CreateTracker --cli-region=<r> --project_id=<p>` |
33
+ | List trackers | `ListTrackers --cli-region=<r> --project_id=<p>` |
34
+ | Delete tracker | `DeleteTracker --cli-region=<r> --project_id=<p>` |
35
+ | Create notification | `CreateNotification --cli-region=<r> --project_id=<p>` |
36
+ | List notifications | `ListNotifications --cli-region=<r> --project_id=<p>` |
37
+ | List trace resources | `ListTraceResources --cli-region=<r> --project_id=<p>` |
38
+
39
+ Discover exact parameters with `--help` before executing any command.
40
+
41
+ ## Troubleshooting
42
+
43
+ | Error | Fix |
44
+ | ---------------------- | ---------------------------------------------------------- |
45
+ | No traces found | Check tracker is created and enabled. Filter by time range |
46
+ | Tracker creation fails | Ensure OBS bucket exists and has correct permissions |
47
+
48
+ ## Security
49
+
50
+ - SHOULD enable CTS for all production accounts
51
+ - MUST use OBS server-side encryption for trace logs
52
+
53
+ ## Cross-Skill References
54
+
55
+ - **OBS**: See `huawei-obs` for tracker log delivery bucket
@@ -1,70 +1,70 @@
1
- ---
2
- name: huawei-dds-dcs
3
- description: "Use when creating or managing Document Database Service (DDS/MongoDB-compatible) or Distributed Cache Service (DCS/Redis/Memcached) on Huawei Cloud. Triggers: DDS, DCS, MongoDB, Redis, Memcached, document DB, cache, replica set, sharding. NOT for: RDS (use huawei-rds), GaussDB (use huawei-gaussdb)."
4
- version: 1
5
- ---
6
-
7
- # Huawei Cloud DDS / DCS
8
-
9
- **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
-
11
- Always run `hcloud DDS <Operation> --help` or `hcloud DCS <Operation> --help` before constructing commands.
12
-
13
- ## DDS (Document Database Service — MongoDB Compatible)
14
-
15
- ## DDS Critical Warnings
16
-
17
- | Trap | Why |
18
- |------|-----|
19
- | Requires 3-node replica | Minimum production deployment needs 3 nodes |
20
- | Shard key permanent | Once selected, shard key cannot be changed |
21
- | Storage auto-scaling off | Enable before storage fills |
22
-
23
- ### Common Workflows
24
-
25
- | Task | Operation |
26
- |------|-----------|
27
- | List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
28
- | Create instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
29
- | Delete instance | `DeleteInstance --cli-region=<r> --project_id=<p>` |
30
- | Add readonly node | `AddReadonlyNode --cli-region=<r> --project_id=<p>` |
31
- | Add shard | `AddShardingNode --cli-region=<r> --project_id=<p>` |
32
- | Create backup | `CreateBackup --cli-region=<r> --project_id=<p>` |
33
-
34
- Discover exact parameters with `--help` before executing any command.
35
-
36
- ## DCS (Distributed Cache Service — Redis/Memcached)
37
-
38
- ## DCS Critical Warnings
39
-
40
- | Trap | Why |
41
- |------|-----|
42
- | Redis password required | Cannot create Redis instance without password |
43
- | Memcached no password | Memcached has no auth — only accessible within VPC |
44
- | Cache persistence costs | AOF/RDB persistence uses additional storage |
45
-
46
- ### Common Workflows
47
-
48
- | Task | Operation |
49
- |------|-----------|
50
- | List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
51
- | Create Redis instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
52
- | Delete instance | `DeleteInstances --cli-region=<r> --project_id=<p>` |
53
- | Restart instance | `RestartInstance --cli-region=<r> --project_id=<p>` |
54
- | Show node information | `BatchShowNodesInformation --cli-region=<r> --project_id=<p>` |
55
- | Create custom template | `CreateCustomTemplate --cli-region=<r> --project_id=<p>` |
56
-
57
- Discover exact parameters with `--help` before executing any command.
58
-
59
- ## Troubleshooting
60
-
61
- | Error | Fix |
62
- |-------|-----|
63
- | DDS instance creation fails | Check 3-node minimum, VPC/subnet availability |
64
- | DCS connection refused | Redis instances need password. Memcached only accessible within VPC |
65
- | DCS auto-expire not working | Enable auto-expire scan task for Redis |
66
-
67
- ## Cross-Skill References
68
-
69
- - **VPC/Subnet**: See `huawei-vpc` for instance networking
70
- - **Backup/CBR**: See `huawei-cbr` for backup management
1
+ ---
2
+ name: huawei-dds-dcs
3
+ description: 'Use when creating or managing Document Database Service (DDS/MongoDB-compatible) or Distributed Cache Service (DCS/Redis/Memcached) on Huawei Cloud. Triggers: DDS, DCS, MongoDB, Redis, Memcached, document DB, cache, replica set, sharding. NOT for: RDS (use huawei-rds), GaussDB (use huawei-gaussdb).'
4
+ version: 1
5
+ ---
6
+
7
+ # Huawei Cloud DDS / DCS
8
+
9
+ **STOP - Do not answer from general knowledge.** Follow the procedure below.
10
+
11
+ Always run `hcloud DDS <Operation> --help` or `hcloud DCS <Operation> --help` before constructing commands.
12
+
13
+ ## DDS (Document Database Service — MongoDB Compatible)
14
+
15
+ ## DDS Critical Warnings
16
+
17
+ | Trap | Why |
18
+ | ------------------------ | ------------------------------------------- |
19
+ | Requires 3-node replica | Minimum production deployment needs 3 nodes |
20
+ | Shard key permanent | Once selected, shard key cannot be changed |
21
+ | Storage auto-scaling off | Enable before storage fills |
22
+
23
+ ### Common Workflows
24
+
25
+ | Task | Operation |
26
+ | ----------------- | --------------------------------------------------- |
27
+ | List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
28
+ | Create instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
29
+ | Delete instance | `DeleteInstance --cli-region=<r> --project_id=<p>` |
30
+ | Add readonly node | `AddReadonlyNode --cli-region=<r> --project_id=<p>` |
31
+ | Add shard | `AddShardingNode --cli-region=<r> --project_id=<p>` |
32
+ | Create backup | `CreateBackup --cli-region=<r> --project_id=<p>` |
33
+
34
+ Discover exact parameters with `--help` before executing any command.
35
+
36
+ ## DCS (Distributed Cache Service — Redis/Memcached)
37
+
38
+ ## DCS Critical Warnings
39
+
40
+ | Trap | Why |
41
+ | ----------------------- | -------------------------------------------------- |
42
+ | Redis password required | Cannot create Redis instance without password |
43
+ | Memcached no password | Memcached has no auth — only accessible within VPC |
44
+ | Cache persistence costs | AOF/RDB persistence uses additional storage |
45
+
46
+ ### Common Workflows
47
+
48
+ | Task | Operation |
49
+ | ---------------------- | ------------------------------------------------------------- |
50
+ | List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
51
+ | Create Redis instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
52
+ | Delete instance | `DeleteInstances --cli-region=<r> --project_id=<p>` |
53
+ | Restart instance | `RestartInstance --cli-region=<r> --project_id=<p>` |
54
+ | Show node information | `BatchShowNodesInformation --cli-region=<r> --project_id=<p>` |
55
+ | Create custom template | `CreateCustomTemplate --cli-region=<r> --project_id=<p>` |
56
+
57
+ Discover exact parameters with `--help` before executing any command.
58
+
59
+ ## Troubleshooting
60
+
61
+ | Error | Fix |
62
+ | --------------------------- | ------------------------------------------------------------------- |
63
+ | DDS instance creation fails | Check 3-node minimum, VPC/subnet availability |
64
+ | DCS connection refused | Redis instances need password. Memcached only accessible within VPC |
65
+ | DCS auto-expire not working | Enable auto-expire scan task for Redis |
66
+
67
+ ## Cross-Skill References
68
+
69
+ - **VPC/Subnet**: See `huawei-vpc` for instance networking
70
+ - **Backup/CBR**: See `huawei-cbr` for backup management