Huawei Ecs 标志

Huawei Ecs

组织
huaweicloud
huawei-ecs

Use when creating, configuring, managing, or troubleshooting ECS instances on Huawei Cloud. Covers instance creation (hcloud ECS CreateServers), flavor selection, image management, security groups, EIP binding, disk attachment, auto-scaling (AS), and troubleshooting. Triggers on: ECS, instance, flavor, image, security group, EIP, EVS, auto-scaling. NOT for: CCE container workloads (use huawei-cce), BMS bare metal servers. HC活动场景(ECS+Nginx部署后端服务)触发词: HC活动, 华为HC, HC大会, 活动部署, HC ECS, 活动流程, 部署后端, Nginx部署, Nodejs部署, 上线后端服务, 部署个人网站, /hc-activity/.

Add to TypingMind

概览

发布者huaweicloud
代码仓库huaweicloud-devkit
技能名称huawei-ecs
星标数
70
复刻数
12
附带文件
6
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 6 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 huaweicloud 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Huawei Ecs AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/huaweicloud/huaweicloud-devkit/tree/main/plugins/huaweicloud-core/skills/huawei-ecs
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-devkit.git /tmp/huaweicloud-devkit
mkdir -p .claude/skills
cp -r /tmp/huaweicloud-devkit/plugins/huaweicloud-core/skills/huawei-ecs .claude/skills/huawei-ecs
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Huawei Ecs,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Huawei Ecs。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Huawei Ecs 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Huawei Cloud ECS

STOP - Do not answer from general knowledge. Follow the procedure below.

Always run hcloud <Service> <Operation> --help before constructing commands to discover exact parameter names and requirements.

Overview

Domain expertise for Huawei Cloud Elastic Cloud Server (ECS). Covers instance lifecycle, flavor selection, image management, networking, storage attachment, auto-scaling, and troubleshooting.

Prerequisites

Before creating an ECS instance from scratch, you MUST have:

  • A VPC (see huawei-vpc)
  • A subnet with DNS configured (see huawei-vpc)
  • A security group with application ports open (see huawei-vpc)

Deployment routing guard: if this skill was reached via a DEPLOYMENT intent (creating resources to host an application), load the huawei-iac skill FIRST and follow its orchestration flow - UNCONDITIONALLY. Reusing an existing VPC does NOT make it single-resource: the purchase still involves billable resources (ECS, system disk, EIP, keypair, SG rules) that must pass the cost+balance gate, batch approval, and state tracking. Only create directly here if the user explicitly declines the orchestration flow or the user only wants a lifecycle operation on an EXISTING instance (query/reboot/resize/delete). Discovery already done (flavors, images, AZs) carries over.

Critical Warnings

TrapWhy
Flavor not in regionNot all flavors available everywhere. Check with ECS ListFlavors first
Security group denies allNew SGs deny ALL inbound. Must explicitly add rules
Reusing existing security groupExisting SGs may have 0.0.0.0/0 rules. Before referencing, run hcloud VPC ListSecurityGroupRules --security_group_id.1= to audit inbound rules
EIP bills when idleUnattached EIP still incurs charges
Stopped instance still billsPay-per-use instances bill when stopped (unless shutdown-no-billing flavor)
Disk survives instance deleteDeleting instance does NOT delete system disk by default

Flavor Selection Guide

Flavor families are region-dependent. Always run hcloud ECS ListFlavors --cli-region=<r> to discover available flavors before recommending.

ScenarioFamilyWhat to look for
Web app / microservicesGeneral-purpose (ac, s, sn, c)2-4 vCPU, 4-8 GB RAM
Database / big dataMemory-optimized (m, r)4-8 vCPU, 16-64 GB RAM
AI inferenceGPU (g, p)8+ vCPU, 64+ GB RAM + GPU
HPCHigh-IO (h, ir, i)8+ vCPU, local SSD

See references/flavors.md for discovery workflow. Do not hardcode flavor names — availability changes by region and over time.

Common Workflows

TaskCommandSteps
List flavorshcloud ECS ListFlavors --cli-region=references/flavors.md
Create instancehcloud ECS CreateServers --server.name= --server.flavorRef= --server.imageRef= --server.nics.1.subnet_id= --server.availability_zone=references/create-instance.md
Find by nameSee "How to search for instances" below
Bind EIPhcloud EIP AssociatePublicips --publicip_id= --publicip.associate_instance_id= --publicip.associate_instance_type=PORTGet port ID from hcloud ECS ListServersDetails --server_id=<id> → OS-EXT-IPS:port_id
Security group rulehcloud VPC CreateSecurityGroupRule --security_group_id= --direction= --protocol=see huawei-vpc
Attach diskhcloud ECS AttachServerVolume --server_id= --volumeAttachment.volumeId=references/evs.md
Delete instancehcloud ECS DeleteServers --servers.1.id= --delete_publicip=true --delete_volume=truereferences/create-instance.md
Reboot instancehcloud ECS BatchRebootServers --reboot.servers.1.id= --reboot.type=SOFTNOT RebootServer — that operation does not exist
HC活动部署按量付费购买ECS+Nginx部署后端服务references/hc-activity.md

How to Search for Instances

ListServersDetails supports --name for exact match only. For fuzzy search:

  1. List all instances: hcloud ECS ListServersDetails --cli-region=<region> --limit=100
  2. Filter client-side by name substring, tag, or status
  3. Use --server_tags filter if instances are tagged: hcloud ECS ListServersDetails --server_tags.1.key=Project

Return structure: ListServersDetails returns {"servers": [...]} (array), NOT {"server": ...}. Parse as .servers[0].status, NOT .server.status.

Abort if the result set is larger than --limit and ask the user to narrow the search.

Instance Status Polling

ECS creation is asynchronous. Status transitions: BUILD → ACTIVE (or ERROR). Wait times vary widely (20s–3min), never use fixed sleep.

Poll strategy:

bash
for i in $(seq 1 30); do
  status=$(hcloud ECS ListServersDetails --cli-region=<region> --server_id=<id> --cli-output=json | jq -r '.servers[0].status')
  if [ "$status" = "ACTIVE" ]; then break; fi
  if [ "$status" = "ERROR" ]; then echo "Creation failed"; exit 1; fi
  sleep 10
done
  • Poll interval: 10 seconds
  • Maximum wait: 5 minutes (30 iterations)
  • Check for ERROR status to detect creation failures early

SSH Connection Verification

After ECS is ACTIVE and EIP is bound, verify SSH connectivity:

bash
hcloud ECS ListServersDetails --cli-region=<region> --server_id=<id>
# → addresses.<vpc-id>[].OS-EXT-IPS:addr

ssh -o StrictHostKeyChecking=accept-new -i <path-to-private-key> root@<eip-address>

SSH verification checklist: EIP bound → security group has port 22 ingress → keypair private key saved locally → known_hosts handled with StrictHostKeyChecking=accept-new (or delete stale entries with ssh-keygen -R <ip>).

Running Commands Inside the Instance

Use SSH for any in-instance operations (install software, check logs, start services):

bash
ssh -o StrictHostKeyChecking=accept-new -i <key> root@<eip> 'command'

Example — re-run failed cloud-init setup manually:

bash
ssh -o StrictHostKeyChecking=accept-new -i <key> root@<eip> 'dnf install -y nginx && systemctl enable --now nginx'

If SCP blocks SSH, use cloud-init --server.user_data for full deployment instead. See references/create-instance.md §Bootstrap.

Windows Login / Upload (standard paths)

Windows has NO working sshpass — password automation must go through paramiko; key automation uses the built-in OpenSSH ssh/scp. The first Connection refused on a fresh instance is usually just sshd not ready (retry with backoff before debugging the SG/EIP); a Permission denied while the server log shows "accepts key" is the local passphrase trap (-N '""' sets a literal "" passphrase). Full standard paths — sshd-ready retry, paramiko login/upload, and the cloud-init public-key injection path (KooCLI has no ImportKeypair): references/windows-ssh.md.

Deleting Instances

  • Show the user the exact command and get explicit approval before running
  • By default, --delete_publicip and --delete_volume are false — public IP and system disk survive deletion
  • Set both to true to avoid orphaned resources and unexpected billing
  • Data disks ARE deleted by default (unlike system disk)

Troubleshooting

ErrorRoot Cause -> Fix
Cannot SSHSG missing port 22 or no EIP -> Add ingress rule / Bind EIP
Flavor unavailableRegion limitation -> ListFlavors in target region
Insufficient resourcesStock depleted -> Change flavor or AZ
AuthFailureExpired AK/SK -> re-run npx huaweicloud-devkit auth init
APIGW.0802 / region permissionIAM user has no access to this region -> IAM console → User → Permissions → add region, or switch to another region
Cannot SSH (port 22 open)SCP policy may be blocking SSH. Check SYS.0403 errors in command output -> Use cloud-init/user_data for initial setup instead. See references/create-instance.md §Bootstrap

Security Considerations

  • MUST use security groups, not iptables
  • MUST store SSH keys in DEW, never in user-data
  • SHOULD enable CTS audit logging
  • MUST NOT open 0.0.0.0/0 for SSH

MCP Tools

Prefer these tools over raw hcloud CLI — they enforce safety policies:

  • huaweicloud_list_operations service=ECS
  • huaweicloud_run_readonly_command for discovery (auto-redacts output)
  • huaweicloud_plan_cli_command for command planning (returns command text + safety classification)
  • huaweicloud_run_approved_command for writes (requires exact command approval)
  • huaweicloud_check_cli to verify hcloud is available

approvedCommand trap: huaweicloud_run_approved_command validates that approvedCommand matches the planned command EXACTLY (including <redacted> placeholders). Always use the command field value returned by huaweicloud_plan_cli_command verbatim — never reconstruct or retype it. Mismatches cause rejection with "approvedCommand must exactly match the planned hcloud command."

Without MCP (Fallback)

If MCP tools are NOT available (new install, session not restarted):

  • Raw hcloud commands WILL appear in shell history — passwords and secrets are at risk
  • Always use key_name instead of adminPass
  • Verify safety manually: no secret value reads, no credential file access
  • Restart session as soon as possible to enable safety policies

Without MCP

Fall back to hcloud CLI. State: "MCP unavailable, using local hcloud CLI."

Flexus (Lightweight ECS)

Flexus is the lightweight ECS family. Two variants:

VariantAPICLIBilling
Flexus LHCSS (hcss:lightInstances)❌ No hcloud — Python SDK onlyPrepaid only
Flexus XStandard ECS API✅ hcloud ECS with x1.* flavorsOn-demand & prepaid

For Flexus X, use standard ECS CreateServers flow with x1.* flavors. For Flexus L, manual console provisioning is recommended — no KooCLI path exists.

References

  • ECS Docs: https://support.huaweicloud.com/ecs/
  • Flavor specs: references/flavors.md
  • Create instance: references/create-instance.md
  • Windows SSH login/upload: references/windows-ssh.md
  • HC活动 ECS+Nginx部署: references/hc-activity.md

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Huawei Ecs AI 技能有什么作用?

Use when creating, configuring, managing, or troubleshooting ECS instances on Huawei Cloud. Covers instance creation (hcloud ECS CreateServers), flavor selection, image management, security groups, EIP binding, disk attachment, auto-scaling (AS), and troubleshooting. Triggers on: ECS, instance, flavor, image, security group, EIP, EVS, auto-scaling. NOT for: CCE container workloads (use huawei-cce), BMS bare metal servers. HC活动场景(ECS+Nginx部署后端服务)触发词: HC活动, 华为HC, HC大会, 活动部署, HC ECS, 活动流程, 部署后端, Nginx部署, Nodejs部署, 上线后端服务, 部署个人网站, /hc-activity/.

为什么在 TypingMind 中使用 Huawei Ecs?

因为您只需安装一次,就能搭配任何模型使用。Huawei Ecs 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Huawei Ecs?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/huaweicloud/huaweicloud-devkit/tree/main/plugins/huaweicloud-core/skills/huawei-ecs。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Huawei Ecs?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Huawei Ecs 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Huawei Ecs 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Huawei Ecs AI 技能免费吗?

是的。huaweicloud 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇