Huawei Cloud Waf Aad Rule Management 标志

Huawei Cloud Waf Aad Rule Management

组织
huaweicloud
huawei-cloud-waf-aad-rule-management

通过 hcloud CLI 管理和诊断 Huawei Cloud WAF(Web Application Firewall / Web应用防火墙)和 AAD(Anti-DDoS / 抗DDoS)防护。涵盖 WAF 实例和受保护域名查询、策略和规则管理(自定义防护 / 精准防护、IP 黑名单和白名单、CC 限速、地域封禁)、CNAME 接入诊断、规则顺序和误报分析,以及 AAD 实例列表和 EIP 防护覆盖检查。只读查询和诊断会自动执行(R3);规则变更需要预览并经用户确认(R2);删除规则需要预览并明确确认(R1)。注意:购买或退订 AAD 实例只能通过控制台办理(包周期);此技能会说明这一限制并提供控制台操作指引。用户需要查看或更改 WAF 防护、验证通过 CNAME/DNS 访问 WAF 端点、检查 WAF 规则顺序、确认 EIP 是否受到 Anti-DDoS 防护,或管理 WAF 规则时使用此技能。触发词包括:WAF、Web应用防火墙、Web Application Firewall、AAD、Anti-DDoS、抗DDoS、DDoS防护、防火墙、web protection、IP黑名单、IP白名单、blacklist、whitelist、CC防护、CC攻击、限速、rate limiting、地域封禁、geo rule、CNAME接入、WAF诊断、规则顺序、误报、EIP防护、防护覆盖、waf aad、huawei-cloud-waf-aad-rule-management。

Add to TypingMind

概览

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

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

  • 兼容任何大语言模型

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

  • 7 个附带文件

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

  • 开源

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

安装

在 TypingMind 中安装 Huawei Cloud Waf Aad Rule Management 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-cloud-waf-aad-rule-management
  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-cloud-waf-aad-rule-management .claude/skills/huawei-cloud-waf-aad-rule-management
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

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

一旦请求与技能匹配,模型就会自动加载 Huawei Cloud Waf Aad Rule Management。

兼容任何 AI 模型

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

  • 仅在需要时加载

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

  • 在聊天中切换模型

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

技能指令

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

Huawei Cloud WAF / AAD Skill (huawei-cloud-waf-aad-rule-management)

第一步:安装 skill-quality-cli(幂等,已安装则跳过)

bash
source scripts/ensure_cli.sh

脚本自动检测 skill-quality-cli 是否可用(PATH 或 CLI 安装目录双通道检测)。已安装则直接可用;未安装时不执行任何运行时下载,仅提示按 references/cli-installation-guide.md 的「安装 skill-quality-cli(固定版本 v1.1.8,SHA256 校验)」手动安装(固定版本 + SHA256 校验,禁止未校验的运行时下载)。CLI 缺失或网络不可用时跳过质量上报,不阻塞业务执行。 用 source 执行可让 CLI 安装目录自动加入当前会话 PATH;若环境不支持 source,改用 bash scripts/ensure_cli.sh,随后命令报 command not found 时先执行 export PATH="$HOME/.local/bin:$PATH" 再调用 skill-quality-cli。

Overview

This skill provides AI-Agent capabilities for Huawei Cloud WAF (Web Application Firewall) and AAD (Anti-DDoS) via the verified hcloud CLI (KooCLI 7.2.12). It helps users answer "what web/DDoS protection is configured", "is my site actually behind WAF", "are my rules safe and in the right order", and "is every public EIP covered by Anti-DDoS".

Scope boundaries:

  • ✅ Query (R3, read-only, auto-execute): WAF instances, protected domain names (composite hosts), policies, custom rules, IP black/white-list rules, CC rules, geo rules; AAD instances & packages.
  • ✅ Diagnose (R3, read-only, auto-execute): CNAME onboarding status, rule-order & false-positive risk, AAD EIP protection coverage.
  • ✅ Manage (R2, preview + confirm): create WAF custom / IP blacklist / CC / geo rules.
  • ✅ Manage (R1, preview + explicit confirm): delete WAF rules (custom / white-black / CC / geo).
  • ❌ Does NOT create or delete AAD instances via CLI — hcloud AAD has no CreateInstance / DeleteInstance (verified: KooCLI returns [USE_ERROR] Operation ... is not supported). AAD package purchase (购买) and unsubscribe (退订) are console-only (包周期) flows; see AAD instance management.
  • ❌ Does NOT configure DNS records (do that at your DNS provider) and does NOT bind/unbind EIPs.

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Critical Warnings

#WarningWhy it matters
1WAF requires CNAME redirectDNS must point to the WAF endpoint (CNAME), not the origin server IP. Pointing DNS at the origin bypasses WAF protection entirely.
2Cloud WAF requires a premium/dedicated instanceWAF protection domains only work on a paid Cloud WAF (premium/独享) instance; the free tier does not cover all rule types and features.
3AAD Standard vs EnterpriseStandard protects only a single IP/EIP; Enterprise protects an entire network segment (网段). Selecting the wrong package leaves IPs unprotected.
4Rule order mattersWithin a WAF policy, rules are evaluated top-to-bottom. A high priority (small priority value) rule listed earlier is applied first; mis-ordering causes false positives / false negatives.
5Rule changes default to report mode firstFor rule-type changes (custom, IP blacklist, CC, geo), first deploy with action 2 (log / report-only mode) to verify impact, then switch to 0 (block) / 1 (allow) once validated — never block production traffic blindly.
6Public-facing apps MUST use WAFAny internet-exposed web application must be behind WAF. Public EIPs should also be covered by AAD for DDoS protection.
7Never fabricate AAD instance CLI commandshcloud AAD CreateInstance / DeleteInstance do not exist. Do not invent them; use the console guidance in this skill.

Prerequisites

  1. hcloud CLI (KooCLI) 7.2.12+ installed.
    • Installation & configuration: see references/cli-installation-guide.md
    • Verify: hcloud version
  2. Authentication — one of:
    • AK/SK environment variables (HUAWEICLOUD_SDK_AK, HUAWEICLOUD_SDK_SK, or HUAWEI_ACCESS_KEY / HUAWEI_SECRET_KEY); or
    • a local hcloud profile (user-managed): check existence with hcloud configure list; the skill/agent never writes credentials (hcloud configure set is forbidden inside the skill or any script). If no profile is configured, ask the user to configure one themselves with hcloud configure init (or export AK/SK env vars) and confirm before continuing — credentials are read from the environment or the user's own local profile only (do not hardcode them anywhere).
  3. Region & project: WAF operations take --project_id (path parameter) plus --cli-region. KooCLI automatically uses the default project of the authenticated profile when --project_id is omitted (verified on KooCLI 7.2.12), so the command examples in this skill omit it; multi-project accounts may append --project_id=<project_id> explicitly. To list projects, see the console (My Credentials → Projects).
  4. IAM permissions (least privilege, see references/iam-policies.md):
    • Read/query: waf:instance:list, waf:host:list, waf:policy:list, waf:rule:list, antiddos:instance:list, antiddos:ip:list, antiddos:package:list, and eps:*:get.
    • Write (rule create/delete): waf:rule:create, waf:rule:delete.
  5. AAD package context: AAD is region-based (cn-north-4, ap-southeast-1, ...). Use hcloud AAD ListPackage to see purchased packages before checking protection coverage.
  6. skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
    • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
    • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Action Map (17 actions)

R-levelCategoryActionBacking CLI operation(s)
R3 (read-only, auto)Queryhuawei_list_waf_instancesWAF ListInstance, WAF ListCompositeHosts, WAF ShowCompositeHost
R3Queryhuawei_list_waf_policiesWAF ListPolicy
R3Queryhuawei_list_waf_custom_rulesWAF ListCustomRules
R3Queryhuawei_list_waf_whiteblackip_rulesWAF ListWhiteblackipRule
R3Queryhuawei_list_waf_cc_rulesWAF ListCcRules
R3Queryhuawei_list_waf_geo_rulesWAF ListGeoipRule
R3Queryhuawei_list_aad_instancesAAD ListInstance, AAD ListPackage
R3Diagnosehuawei_analyze_waf_cname_statusWAF ListCompositeHosts, WAF ShowCompositeHost
R3Diagnosehuawei_analyze_waf_rule_orderWAF ListCustomRules, WAF ListWhiteblackipRule, WAF ListCcRules, WAF ListGeoipRule
R3Diagnosehuawei_analyze_aad_protectionAAD ListInstance, AAD ListProtectedIp, AAD ListUnboundProtectedIp
R2 (preview + confirm)Managehuawei_create_waf_custom_ruleWAF BatchCreateCustomRule
R2Managehuawei_create_waf_ip_blacklist_ruleWAF BatchCreateWhiteblackipRule
R2Managehuawei_create_waf_cc_ruleWAF BatchCreateCcRule
R2Managehuawei_create_waf_geo_ruleWAF BatchCreateGeoIpRule
R2Managehuawei_create_aad_instanceConsole-only — no CLI (see note below)
R1 (preview + explicit confirm)Deletehuawei_delete_waf_ruleWAF DeleteCustomRule / DeleteWhiteBlackIpRule / DeleteCcRule / DeleteGeoipRule
R1 (preview + explicit confirm)Deletehuawei_delete_aad_instanceConsole-only — no CLI (see note below)

AAD instance creation/deletion (mandatory limitation): hcloud AAD does not support CreateInstance or DeleteInstance (verified on KooCLI 7.2.12: [USE_ERROR]Operation CreateInstance is not supported.). AAD instances are purchased as period packages (包周期) in the console: Console → Security → Anti-DDoS → Anti-DDoS Instance → Purchase instance; to delete, unsubscribe/退订 via Anti-DDoS Instance → More → Unsubscribe. huawei_create_aad_instance and huawei_delete_aad_instance SHALL NOT be routed to any made-up CLI command. Instead:

  • List purchased packages: hcloud AAD ListPackage --cli-region=<region> (see Core Commands)
  • Check current coverage: hcloud AAD ListInstance + hcloud AAD ListProtectedIp

Workflow

text
1. Identify context -> region (--cli-region), project_id (--project_id), and the resource to act on
   (WAF instance/host, policy, rule type; or AAD package/EIP)
2. Query phase (R3, auto)   -> list WAF instances/hosts/policies/rules or AAD instances/packages
3. Diagnose phase (R3, auto)
   a. CNAME status  -> ListCompositeHosts, then ShowCompositeHost for each protected domain:
      check cname + protocol/access-status; warn if DNS does not point to the WAF endpoint
   b. Rule order    -> list rules of the target policy, order by priority; flag
      block rules sitting above log/allow rules or conflicting conditions (false-positive risk)
   c. AAD coverage  -> ListInstance, then ListProtectedIp per instance; ListUnboundProtectedIp to
      find unbound public IPs; warn for Standard package (single IP) vs Enterprise (网段)
4. Manage phase (R2/R1, requires confirmation)
   a. CREATE (R2): build the rule intent (policy_id, rule type, action, conditions), PREVIEW the
      exact CLI command + parameters to the user, wait for explicit confirmation, then execute.
      New rules default to action=2 (log/report) first unless the user explicitly requests block.
   b. DELETE (R1): list the exact rule to delete (type + rule_id), PREVIEW the command, wait for
      EXPLICIT confirmation ("yes, delete"), then execute.
5. Output -> structured JSON result + readable summary (quality telemetry is reported automatically via the `skill-quality-cli run` wrapper)

Core Commands

All commands below were verified against KooCLI 7.2.12 (hcloud <service> <Operation> --help); parameter names are taken verbatim from the CLI metadata. --cli-region is required for every command. For WAF, --project_id is a path parameter of the API; KooCLI automatically uses the default project of the authenticated profile when it is omitted, so the examples below omit it (multi-project accounts may append --project_id=<project_id> explicitly — see Parameter Confirmation).

Each command is shown in two forms:

  • the bare hcloud ... command (canonical CLI form, used by tooling and automated tests), and
  • the quality-reporting form skill-quality-cli run --skill-name ... -- <command> (the mandated execution form at runtime).

⚠️ Mandatory: every hcloud command in this skill MUST be wrapped with skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- — bare hcloud calls are strictly forbidden. ⚠️ 强制要求:Agent/脚本运行时执行本 skill 的任何 hcloud 命令,必须用 skill-quality-cli run 包裹,禁止裸调 hcloud(Core Commands 中展示的裸命令仅为规范化 CLI 形式,供工具/测试流水线提取与校验;实际执行一律使用其上方对应的包裹形式)。

可测试性约定(2026-09-17): 仅「无业务参数依赖」的查询命令给出裸命令形式,供测试流水线 自动提取并执行(此类命令不传业务 ID 即可真实查询)。依赖 --policy_id / --host_id / --package_id 等业务参数的查询,以及全部写操作(R2/R1),只给出 skill-quality-cli run 包裹形式 —— 它们需要真实资源 ID 或显式确认,测试流水线不应自动执行。

1. WAF — Instances & Protected Domains (R3)

bash
# Dedicated WAF instances
hcloud WAF ListInstance --cli-region={region}   # 分页参数为--page/--pagesize, 该接口不支持--limit
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListInstance --cli-region={region}

# Protected domain names (composite hosts) + CNAME onboarding status
hcloud WAF ListCompositeHosts --cli-region={region}   # 分页参数为--page/--pagesize, 该接口不支持--limit
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListCompositeHosts --cli-region={region}

# Detail of one protected domain (CNAME, protocol, protection status) — needs --host_id (业务参数)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ShowCompositeHost --cli-region={region} --host_id={host_id}

2. WAF — Policies (R3)

bash
# WAF policies of the current account
hcloud WAF ListPolicy --cli-region={region}   # 分页参数为--page/--pagesize, 该接口不支持--limit
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListPolicy --cli-region={region}

3. WAF — Rule Queries (R3)

以下规则查询都依赖 --policy_id(业务参数,需先 ListPolicy 获取真实 policy_id), 只给出质量上报包裹形式,不自动执行。

bash
# Custom / precise protection rules of one policy
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListCustomRules --cli-region={region} --policy_id={policy_id}

# IP blacklist / whitelist rules
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListWhiteblackipRule --cli-region={region} --policy_id={policy_id}

# CC (rate limiting) rules
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListCcRules --cli-region={region} --policy_id={policy_id}

# Geo (regional blocking) rules
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ListGeoipRule --cli-region={region} --policy_id={policy_id}

4. WAF — Rule Creation (R2, preview + confirm)

bash
# Custom (precise protection) rule — action.category: block|pass|log
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF BatchCreateCustomRule --cli-region={region} --policy_ids.1={policy_id} --name={rule_name} --priority={priority} --action.category=log --time=false --conditions.1.category=url --conditions.1.logic_operation=contain --conditions.1.contents.1=/admin

# IP blacklist rule (white=0 block / 1 allow / 2 log)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF BatchCreateWhiteblackipRule --cli-region={region} --policy_ids.1={policy_id} --name={rule_name} --white=0 --addr=42.123.120.66

# CC (rate limiting) rule — mode=0 standard / 1 advanced; tag_type=ip|cookie|header|other|...
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF BatchCreateCcRule --cli-region={region} --policy_ids.1={policy_id} --name={rule_name} --mode=0 --limit_num=100 --limit_period=60 --tag_type=ip --action.category=log --conditions.1.category=url --conditions.1.logic_operation=contain --conditions.1.contents.1=/

# Geo rule (geoip from ShowPolicyGeoipMap; white=0 block / 1 allow / 2 log)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF BatchCreateGeoIpRule --cli-region={region} --policy_ids.1={policy_id} --geoip={geoip} --white=0

5. WAF — Rule Deletion (R1, preview + explicit confirm)

bash
# Delete a custom rule (rule_id from ListCustomRules)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF DeleteCustomRule --cli-region={region} --policy_id={policy_id} --rule_id={rule_id}

# Delete an IP black/white list rule (rule_id from ListWhiteblackipRule)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF DeleteWhiteBlackIpRule --cli-region={region} --policy_id={policy_id} --rule_id={rule_id}

# Delete a CC rule (rule_id from ListCcRules)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF DeleteCcRule --cli-region={region} --policy_id={policy_id} --rule_id={rule_id}

# Delete a geo rule (rule_id from ListGeoipRule)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF DeleteGeoipRule --cli-region={region} --policy_id={policy_id} --rule_id={rule_id}

6. AAD — Instance & Protection Queries (R3)

bash
# AAD instances (NOTE: only --cli-region is required; AAD is region-based)
hcloud AAD ListInstance --cli-region={region}   # 该接口不支持--limit
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud AAD ListInstance --cli-region={region}

# Anti-DDoS packages (套餐) — the ONLY supported AAD "package" management entry point
hcloud AAD ListPackage --cli-region={region}   # 该接口不支持--limit
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud AAD ListPackage --cli-region={region}

# EIPs currently protected by a package/policy (optional filters: --package_id={package_id}, --policy_id={policy_id})
hcloud AAD ListProtectedIp --cli-region={region}   # 可选分页参数为--limit/--offset
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud AAD ListProtectedIp --cli-region={region}

# Unbound protected IPs of a package — key input for huawei_analyze_aad_protection;
# needs --package_id (业务参数), wrapper-only (not auto-executed)
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud AAD ListUnboundProtectedIp --cli-region={region} --package_id={package_id}

AAD Instance Management (Console-only)

hcloud AAD does NOT support CreateInstance / DeleteInstance (verified: [USE_ERROR] Operation CreateInstance is not supported.). Do NOT fabricate CLI commands for these actions.

IntentSupported path
Create / purchase an AAD instance (包周期)Console: Security → Anti-DDoS → Anti-DDoS Instance → Purchase Anti-DDoS Instance; select Standard (single IP) or Enterprise (whole 网段) package
Delete / unsubscribe an AAD instanceConsole: Anti-DDoS Instance → select instance → More → Unsubscribe (退订)
Verify packages after purchasehcloud AAD ListPackage --cli-region={region}
Verify protection coverage (alternative diagnostic path)hcloud AAD ListInstance + hcloud AAD ListProtectedIp + hcloud AAD ListUnboundProtectedIp

Parameter Confirmation

All parameter names below are verified against hcloud <service> <Operation> --help (KooCLI 7.2.12). {region} / {project_id} are context values; obtain the project ID from My Credentials → Projects.

参数校验(工具参数安全,强制): 所有动作参数在拼装 hcloud 命令前必须校验,非法输入直接拒绝并向用户说明,禁止把未经校验的参数传入命令执行:

  • 枚举类参数按白名单逐一比对:--action.category ∈ {block, pass, log, captcha, dynamic_block}、--white ∈ {0,1,2}、--mode ∈ {0,1}、--tag_type ∈ {ip, cookie, header, other, policy, domain, url}、--ip_type ∈ {v4, v6, any}、--time_mode ∈ {permanent, customize}、--logic_operation ∈ {contain, not_contain, equal, not_equal, begin_with, not_begin_with, end_with, not_end_with};
  • 数值/格式类参数做类型与范围校验:--priority(整数,0–65535)、--limit_num(1–2147483647)、--limit_period(1–3600)、--addr(合法 IPv4/IPv6/CIDR)、--policy_id/--rule_id/--host_id/--project_id(华为云资源 UUID 格式);
  • 所有参数值来自用户输入时,先校验再使用;白名单外或格式非法的值一律拒绝。

WAF List / Show (query, R3)

CommandRequired paramsOptional params
ListCompositeHosts--cli-region, --project_id--enterprise_project_id, --hostname, --is_https, --page, --pagesize, --policyname, --protect_status, --waf_type
ListInstance--cli-region, --project_id--enterprise_project_id, --instancename, --page, --pagesize
ShowCompositeHost--cli-region, --project_id, --host_id--enterprise_project_id
ListPolicy--cli-region, --project_id--enterprise_project_id, --name, --page, --pagesize
ListCustomRules--cli-region, --project_id, --policy_id--enterprise_project_id, --limit, --offset, --page, --pagesize
ListWhiteblackipRule--cli-region, --project_id, --policy_id--enterprise_project_id, --name, --page, --pagesize
ListCcRules--cli-region, --project_id, --policy_id--category, --enterprise_project_id, --limit, --name, --offset, --page, --pagesize, --status, --tag_type
ListGeoipRule--cli-region, --project_id, --policy_id--enterprise_project_id, --page, --pagesize

WAF BatchCreate (write, R2 — indexable array params use .N suffix)

CommandRequired paramsKey optional params
BatchCreateCustomRule--cli-region, --project_id, --policy_ids.N, --name, --priority, --action.category (block|pass|log), --time (bool)--conditions.N.category, --conditions.N.contents.N, --conditions.N.index, --conditions.N.logic_operation, --conditions.N.value_list_id, --action.followed_action_id, --description, --enterprise_project_id, --start, --terminal
BatchCreateWhiteblackipRule--cli-region, --project_id, --policy_ids.N, --name, --white (0 block / 1 allow / 2 log)--addr (IP or CIDR), --description, --enterprise_project_id, --ip_group_id, --policyids.N, --start, --terminal, --time_mode (permanent|customize)
BatchCreateCcRule--cli-region, --project_id, --policy_ids.N, --name, --mode (0 standard / 1 advanced), --limit_num (1–2147483647), --limit_period (1–3600 s), --tag_type (ip|cookie|header|other|policy|domain|url), --action.category (captcha|block|log|dynamic_block), --conditions.N.category, --conditions.N.logic_operation--action.detail.response.content, --action.detail.response.content_type, --cc_priority, --conditions.N.contents.N, --conditions.N.index, --conditions.N.value_list_id, --description, --domain_aggregation, --enterprise_project_id, --lock_time, --priority, --region_aggregation, --tag_index, --unlock_num
BatchCreateGeoIpRule--cli-region, --project_id, --policy_ids.N, --geoip, --white (0 block / 1 allow / 2 log)--description, --enterprise_project_id, --ip_type (v4|v6|any), --name

WAF Delete (write, R1)

CommandRequired paramsOptional params
DeleteCustomRule / DeleteWhiteBlackIpRule / DeleteCcRule / DeleteGeoipRule--cli-region, --project_id, --policy_id, --rule_id--enterprise_project_id

AAD (query, R3)

CommandRequired paramsOptional params
ListInstance--cli-region—
ListPackage--cli-region—
ListProtectedIp--cli-region--ip, --limit, --offset, --package_id, --policy_id, --tag
ListUnboundProtectedIp--cli-region, --package_id--limit, --offset

CreateInstance / DeleteInstance for AAD: do not exist in the CLI — see the console-only section above. Never guess or fabricate their parameters.

KooCLI Command Format Standard

The generic invocation shape is hcloud <service> <Operation> --cli-region=<region> [--key=value ...] — this is a format description only: <...> and [--key=value] are placeholders, never executed verbatim.

FeatureDescriptionExample
Service nameWAF, AAD (as detected from KooCLI 7.2.12 metadata)hcloud WAF ...
Operation namePascalCaseListCompositeHosts, BatchCreateCcRule
Region parameter--cli-region=<value> (required; profile value used if omitted)--cli-region=cn-north-4
Project ID--project_id=<value> (required for WAF)--project_id=a1b2...
Simple parameter--key=value--policy_id=p1
Indexed parameter (array)--key.N=valueN--policy_ids.1=pol1, --conditions.1.contents.1=/admin

Reference Documents

  • references/cli-installation-guide.md — KooCLI installation, AK/SK & profile authentication
  • references/iam-policies.md — Least-privilege IAM policies for WAF/AAD read & write
  • references/verification-method.md — How to verify this skill (read-only checks, dry-run, confirm flows)
  • references/dataflow-diagram.md — Mermaid data-flow diagram (query / diagnose / manage)
  • references/acceptance-criteria.md — Acceptance criteria mapped to the 17 actions
  • references/related-commands.md — Auxiliary commands (ShowPolicyGeoipMap, EPS, DNS/EIP context)
  • scripts/ensure_cli.sh — Idempotent skill-quality-cli installer (see the ⚠️ Mandatory note in Core Commands)

Related Commands (auxiliary)

bash
# Query supported geo regions for geo rules (source of {geoip} values)
hcloud WAF ShowPolicyGeoipMap --cli-region={region}   # 无分页参数, 不支持--limit
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud WAF ShowPolicyGeoipMap --cli-region={region}

# Confirm the authenticated profile / region
hcloud configure list   # 本地配置查看, 无--limit参数
skill-quality-cli run --skill-name huawei-cloud-waf-aad-rule-management -- hcloud configure list

附带文件

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

常见问题

Huawei Cloud Waf Aad Rule Management AI 技能有什么作用?

通过 hcloud CLI 管理和诊断 Huawei Cloud WAF(Web Application Firewall / Web应用防火墙)和 AAD(Anti-DDoS / 抗DDoS)防护。涵盖 WAF 实例和受保护域名查询、策略和规则管理(自定义防护 / 精准防护、IP 黑名单和白名单、CC 限速、地域封禁)、CNAME 接入诊断、规则顺序和误报分析,以及 AAD 实例列表和 EIP 防护覆盖检查。只读查询和诊断会自动执行(R3);规则变更需要预览并经用户确认(R2);删除规则需要预览并明确确认(R1)。注意:购买或退订 AAD 实例只能通过控制台办理(包周期);此技能会说明这一限制并提供控制台操作指引。用户需要查看或更改 WAF 防护、验证通过 CNAME/DNS 访问 WAF 端点、检查 WAF 规则顺序、确认 EIP 是否受到 Anti-DDoS 防护,或管理 WAF 规则时使用此技能。触发词包括:WAF、Web应用防火墙、Web Application Firewall、AAD、Anti-DDoS、抗DDoS、DDoS防护、防火墙、web protection、IP黑名单、IP白名单、blacklist、whitelist、CC防护、CC攻击、限速、rate limiting、地域封禁、geo rule、CNAME接入、WAF诊断、规则顺序、误报、EIP防...

为什么在 TypingMind 中使用 Huawei Cloud Waf Aad Rule Management?

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

如何在 TypingMind 中安装 Huawei Cloud Waf Aad Rule Management?

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

哪些 AI 模型可以使用 Huawei Cloud Waf Aad Rule Management?

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

Huawei Cloud Waf Aad Rule Management 可以搭配多少个 AI 模型使用?

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

Huawei Cloud Waf Aad Rule Management AI 技能免费吗?

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

什么是 AI 技能?

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

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

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

查看全部

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

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