huawei-cloud-waf-policy-query
Query Huawei Cloud WAF protection policies. Trigger phrases include: "query protection policies", "list protection policies", "show available policies", "view…
by huaweicloudskill347 installs in other catalogs
Install huawei-cloud-waf-policy-query in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
[!IMPORTANT] Read-Only Operations:
- This SKILL only supports query (read-only) operations. No cloud resources will be created, modified, or deleted.
- All operations are performed via the
hcloudCLI.- Do not execute query commands before the user explicitly states their intent. You must first list the available capabilities, then ask the user for their intent.
Overview
This SKILL enables users to efficiently query existing protection policies in Huawei Cloud WAF (Web Application Firewall) and quickly assess the current protection posture.
Scenario Description
This SKILL supports the following query capabilities:
- Query Protection Policy List — List all WAF protection policies
- Query Protection Policy Details — View the basic configuration of a specified protection policy (protection level, protection action, enabled protection modules, etc.)
Region Policy: All commands use the region configured in hcloud by default. Do NOT explicitly pass
--cli-regionin any command. The agent must rely on the hcloud configured region.
Prerequisites
Prerequisite Check: Huawei Cloud CLI (hcloud) >= 7.2.2 is required. Run
hcloud versionto verify version >= 7.2.2, and runhcloud configure listto check if the configuration file exists.
hcloud version
hcloud configure list
hcloud configure set --cli-lang=cn
Core Workflow and Core Commands
Step 0: Intent Identification (MANDATORY)
Mandatory Requirement: After loading this SKILL, the agent must execute this step first and must not skip directly to subsequent query steps.
The agent should present the query capabilities of this SKILL to the user and ask what query they want to perform.
Display Template:
## This SKILL supports the following query functions:
1. **Query Protection Policy List** — List all WAF protection policies
2. **Query Protection Policy Details** — View the configuration details of a specified policy
What would you like to query? All commands use the region configured in hcloud by default.
Intent Branches:
| User Intent | Execution Steps | Example |
|---|---|---|
| Browse policy list | Step 1 | "List all protection policies" |
| View policy details | Step 1 → Step 2 | "View details of policy xxx" |
Step 1: Query Protection Policy List
Mandatory Requirement: The agent must execute the query protection policy list command via hcloud to retrieve all policies.
By default, the query retrieves the protection policy list using the region configured in hcloud.
Execute the query command:
hcloud WAF ListPolicy
Note: The agent should extract the
idandnameof each policy from the response for subsequent use when the user requests details of a specific policy.
Result Presentation: The agent should present the policy list in a table format with the following key fields:
id— Policy IDname— Policy nameaction.category— Default protection action (block/log)hosts— Bound domainsrules_count— Number of rules per category
Display Rules:
- If the number of returned policies is <= 5: display all
- If the number of returned policies is > 5: display only the first 5 and inform the user of the total count
Save Query Results
If the user wishes to save the complete query results for future reference, the agent should use the Write tool to save the full policy JSON data to a local file (no shell commands needed — platform-independent).
Recommended filename format: waf-policies-<yyyyMMdd-HHmmss>.json, e.g., waf-policies-20260903-143025.json
Recommended Timing: When the number of returned policies is large (e.g., > 10), proactively suggest saving the complete results to a JSON file.
Step 2: Query Protection Policy Details
Mandatory Requirement: The agent must use the policy ID (
id) or policy name (name) obtained from the Step 1 results as parameters for this step's query operation. Do not provide policy identifiers from memory or by guessing.
Step 2.1: Query Policy Basic Information
Execute the query command:
hcloud WAF ShowPolicy --policy_id=<policy_id>
Extract the following key information from the response:
id/name— Policy identifierlevel— Basic protection level (1=Low, 2=Medium, 3=Strict)action.category— Default protection action (block/log)full_detection— Precise protection detection mode (false=short-circuit detection, true=full detection)hosts/bind_host— Bound domainsoptions— Toggle status of each protection module (used in Step 2.2 to determine which rules to query)rules_count— Rule count statistics per category (used in Step 2.2 to determine whether rule details need to be queried)
Result Presentation: The agent should present the policy basic information in a table format, highlighting the enabled/disabled status of each protection module
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the huawei-cloud-waf-policy-query skill do?
Query Huawei Cloud WAF protection policies. Trigger phrases include: "query protection policies", "list protection policies", "show available policies", "view protection policy details", "WAF protection posture", "view WAF protection configuration".
How do I install the huawei-cloud-waf-policy-query skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the huawei-cloud-waf-policy-query skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet 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…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…