huawei-cloud-sg-manage
БесплатноЗапускает вложенные скриптыНе проверенUse when managing or diagnosing Huawei Cloud security groups (安全组) — VPC subnet-level firewalls. Covers listing/querying security groups and rules, port…
от huaweicloudskill609 установок в других каталогахОб этом скилле
Huawei Cloud Security Group Management (安全组管理)
STOP - Do not answer from general knowledge. Every command below is spelled with the
operation name and parameters verified against KooCLI 7.3.12. Copy a command as-is, replace
only the <...> placeholders, and run it. Do not invent parameter names.
Overview
This skill manages Huawei Cloud security groups (安全组) — the VPC subnet-level
stateful firewall (security group is a VPC sub-resource). It provides 11 huawei_* actions:
| # | Capability | Risk | Action |
|---|---|---|---|
| 1 | Query (read-only) | R3 — auto execute | huawei_list_security_groups |
| 2 | Query (read-only) | R3 — auto execute | huawei_list_security_group_rules |
| 3 | Query (read-only) | R3 — auto execute | huawei_get_security_group |
| 4 | Analyze (read-only) | R3 — auto execute | huawei_diagnose_sg_port_connectivity |
| 5 | Analyze (read-only) | R3 — auto execute | huawei_analyze_sg_rule_conflict |
| 6 | Analyze (read-only) | R3 — auto execute | huawei_audit_sg_overexposed_rules |
| 7 | Manage | R2 — preview + confirm | huawei_create_security_group |
| 8 | Manage | R2 — preview + confirm | huawei_create_sg_rule |
| 9 | Manage | R2 — preview + confirm | huawei_update_security_group |
| 10 | Manage | R1 — preview + confirm | huawei_delete_security_group |
| 11 | Manage | R1 — preview + confirm | huawei_delete_sg_rule |
Architecture
User request → Action Router (scripts/huawei-cloud.py dispatcher)
├─ Query (R3) → hcloud VPC ListSecurityGroups/v3 | ListSecurityGroupRules/v3 | ShowSecurityGroup/v3
├─ Analyze (R3) → hcloud VPC ListSecurityGroupRules/v3 + deterministic rule engine
│ (priority-ordered matching, CIDR/port/protocol semantics)
└─ Manage (R2/R1) → preview → hcloud VPC Create/Update/Delete (confirmed only after user approval)
All cloud operations execute through the local hcloud (KooCLI) CLI — no Python SDK, no
raw HTTP API calls. The bundled dispatcher builds and runs the hcloud commands; its
list/SG results are cached per process, so one intent issues one query per resource no
matter how many analyses reuse it.
Scope boundaries
- ✅ List/query security groups and their rules
- ✅ Port connectivity diagnosis (ingress/egress rule matching, priority-ordered)
- ✅ Rule conflict detection (duplicates, allow/deny contradictions, shadowed rules)
- ✅ Over-exposure audit (world-open 0.0.0.0/0 / ::/0, wide port ranges, ineffective denies)
- ✅ Create/update/delete security groups and rules (with preview + confirmation)
- ❌ Doesn't manage other VPC resources (VPCs, subnets, routers, firewalls, network queries) — those are out of scope for this skill
- ❌ Doesn't resolve remote-security-group / address-group member IPs (not exposed by the API)
Critical Warnings
| Trap | Why |
|---|---|
| Deleting a security group is irreversible | Removes the SG and ALL its rules at once; instances/ports still associated lose connectivity |
| Deleting a rule changes live connectivity | VPC default is DENY for unmatched traffic — a rule deletion can expose or block traffic immediately |
0.0.0.0/0 / ::/0 allow rules mean world-open |
Any internet host can reach those ports; audit first, restrict to real CIDRs |
| Rule priority matters | Lower numerical priority wins; a broad allow with priority 1 makes every lower-priority deny ineffective |
| Never run a Manage action without preview | All R2/R1 actions must be previewed and explicitly confirmed by the user — see confirmation gates and the per-operation 前置确认 / 影响范围 / 回滚 sections |
Prerequisites
- hcloud CLI (KooCLI 7.2.x or later) installed and authenticated.
- Verify with
hcloud version(printsCurrent KooCLI version: 7.x.y). - Installation and configuration:
references/cli-installation-guide.md. - Two supported authentication modes:
- AK/SK credentials: environment variables
HUAWEICLOUD_SDK_AK/HUAWEICLOUD_SDK_SK(orHUAWEI_ACCESS_KEY/HUAWEI_SECRET_KEY/HW_ACCESS_KEY/HW_SECRET_KEY) - Local KooCLI profile: the KooCLI
configure listsubcommand shows a valid AKSK profile
- AK/SK credentials: environment variables
- No CLI or no credentials → the dispatcher fails in under 2 seconds with
{"success": false, "error_code": "cli_missing" | "credentials_missing", "hint": ...}instead of returning an empty list.
- Verify with
- Region: always pass
--cli-region=cn-north-4(replace with your region).--project_idis auto-filled from the authenticated profile when available; pass--project_id=<id>if the profile cannot resolve it. - IAM permissions: least-privilege policies in
references/iam-policies.md(vpc:securityGroups:*,vpc:securityGroupRules:*). - Timeouts: every hcloud call is hard-capped at 30s (
HCLOUD_TIMEOUToverrides, 1-300s) and fails witherror_code=timeout+ a remediation hint.
Workflow
1. Identify target → region, security_group_id / security_group_ru
Установить huawei-cloud-sg-manage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-sg-manage?
Use when managing or diagnosing Huawei Cloud security groups (安全组) — VPC subnet-level firewalls. Covers listing/querying security groups and rules, port connectivity diagnosis (ingress/egress rule matching), rule conflict detection, over-exposure security audit (e.g. 0.0.0.0/0 world-open rules), and full CRUD (create/update/delete security groups and rules). Managed actions run with preview + explicit confirmation (R2/R1); query and diagnose actions are read-only and auto-execute (R3). Uses the local hcloud (KooCLI) VPC CLI with AK/SK environment variables or a local hcloud profile. Provides 11 huawei_* actions: huawei_list_security_groups, huawei_list_security_group_rules, huawei_get_security_group, huawei_diagnose_sg_port_connectivity, huawei_analyze_sg_rule_conflict, huawei_audit_sg_overexposed_rules, huawei_create_security_group, huawei_create_sg_rule, huawei_update_security_group, huawei_delete_security_group, huawei_delete_sg_rule. Triggers include: "安全组", "安全组规则", "防火墙规则", "端口连通性", "端口诊断", "规则冲突", "过度开放", "全开放", "0.0.0.0/0", "security group", "security group rule", "SG rule", "ingress", "egress", "inbound", "outbound", "port connectivity", "port diagnosis", "rule conflict", "over-exposed", "world-open", "VPC", "安全审计", "防火墙".
Как установить скилл huawei-cloud-sg-manage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-sg-manage запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic