Install
openclaw skills install @sdk-team/alibabacloud-cloudfw-vpc-firewall-diagnosisDiagnose Alibaba Cloud Cloud Firewall VPC firewall provisioning failures, route policy configuration failures, and closure pre-check risks using read-only CloudFirewall, CBN, VPC, STS, and ActionTrail APIs. Use this skill when troubleshooting VPC firewall creation failures, route policy/drainage configuration failures, firewall status stuck in configuring, or assessing route and ACL impact before closing VPC firewall drainage.
openclaw skills install @sdk-team/alibabacloud-cloudfw-vpc-firewall-diagnosisaliyun version.scripts/analyze_routes.py and scripts/closure_precheck.py.json, subprocess, sys).Configure a CLI profile with aliyun configure, then pass credentials through --profile <profile> in every command.
aliyun configure --profile <profile-name>
# Enter AccessKey ID, AccessKey Secret, Region, and output format as prompted.
Never hardcode AccessKey values in commands, scripts, or documentation. See references/profile_setup_guide.md.
This skill is a read-only diagnostic tool. Grant only the minimum read-only actions below.
| Action | Purpose |
|---|---|
cloudfw:DescribeTrFirewallsV2List | Query VPC firewall list and key status fields. |
cloudfw:DescribeVpcFirewallList | Query VPC boundary firewall information. |
cloudfw:DescribeVpcFirewallPrecheckDetail | Query precheck details. This API uses --Region, not --RegionId. |
cloudfw:DescribeFirewallTask | Query drainage task status and ErrorDetail. |
cloudfw:DescribeTrFirewallPolicyBackUpAssociationList | Query the rollback target route table. |
cloudfw:DescribeVpcFirewallControlPolicy | Query VPC firewall ACL policies. |
actiontrail:LookupEvents | Query recent operation history. |
cbn:ListTransitRouters | Query transit routers under a CEN instance. |
cbn:ListTransitRouterRouteTables | Query transit router route tables. |
cbn:ListTransitRouterRouteEntries | Query route entries for route comparison. |
cbn:ListTransitRouterVpcAttachments | Query VPC attachments. |
vpc:DescribeVpcs / vpc:DescribeVpcAttribute | Query VPC basic attributes. |
sts:GetCallerIdentity | Validate profile identity. |
Full permission details are documented in references/ram-policies.md.
All Alibaba Cloud service calls must include:
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-cloudfw-vpc-firewall-diagnosis
Before running any Alibaba Cloud service CLI command in this skill, initialize CLI AI-Mode and refresh plugins:
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent AlibabaCloud-Agent-Skills/alibabacloud-cloudfw-vpc-firewall-diagnosis
aliyun plugin update
After the diagnostic workflow ends, disable AI-Mode:
aliyun configure ai-mode disable
Rules:
set-user-agent must use the full skill identifier: AlibabaCloud-Agent-Skills/alibabacloud-cloudfw-vpc-firewall-diagnosis.plugin update is a local/system CLI command and must be run before service API calls to ensure lowercase-hyphenated plugin actions are current; do not add --user-agent to this system command.aliyun version, aliyun configure list, and python3 --version do not call Alibaba Cloud service APIs and do not require the User-Agent flag.Run these read-only checks before diagnosis:
aliyun version
aliyun configure list
aliyun sts get-caller-identity --profile <profile> --user-agent AlibabaCloud-Agent-Skills/alibabacloud-cloudfw-vpc-firewall-diagnosis
python3 --version
Before every execution:
SKILL.md.This skill is a read-only diagnostic assistant.
Every diagnostic report must start with:
Notice: This tool is a read-only diagnostic assistant. It only provides analysis and configuration guidance and will not perform any configuration changes.
Please apply all configuration changes manually in the Alibaba Cloud Console or through your own approved process.
aliyun configure ai-mode enable, aliyun configure ai-mode set-user-agent, aliyun plugin update, and final aliyun configure ai-mode disable.aliyun cloudfw describe-* read-only queries.aliyun cbn list-* and aliyun cbn describe-* read-only queries.aliyun actiontrail lookup-events read-only operation history queries.aliyun sts get-caller-identity identity validation.aliyun version, aliyun configure list, python3 --version.cat, ls, grep, find, pwd, which, date, stat, and file.scripts/analyze_routes.py and scripts/closure_precheck.py.Any Bash command that does not match the whitelist must return permissionDecision=ask.
Collect all information at once before diagnosis:
default.cn-hangzhou.Do not proceed until the required inputs are confirmed.
scripts/analyze_routes.py.TotalCount alone.Detailed flow: references/closure_precheck_guide.md.
First query describe-tr-firewalls-v2-list, then check PrecheckStatus, ResultCode, and firewall status fields. See references/diagnosis_steps.md.
First query describe-firewall-task with --TaskType VPC and --ChildInstanceId <vpc-id>. See references/diagnosis_steps.md.
Identify the mode, get OriginalRouteTableId, run scripts/analyze_routes.py, check ACL policies, and assess risk.
Collect current and target route table IDs, run scripts/analyze_routes.py, check ACL policies, and assess risk.
DescribeFirewallV2List; this API is invalid for this skill.ErrorDetail and ActionTrail as final evidence.| API | CLI action | Service | Required parameters | Purpose |
|---|---|---|---|---|
DescribeTrFirewallsV2List | describe-tr-firewalls-v2-list | cloudfw | --RegionId | Query VPC firewall list. |
DescribeFirewallTask | describe-firewall-task | cloudfw | --TaskType VPC, --ChildInstanceId <vpc-id> | Query route policy task status. |
DescribeTrFirewallPolicyBackUpAssociationList | describe-tr-firewall-policy-back-up-association-list | cloudfw | --FirewallId, --TrFirewallRoutePolicyId | Query rollback target route table. |
DescribeVpcFirewallControlPolicy | describe-vpc-firewall-control-policy | cloudfw | --VpcFirewallId, --PageSize, --CurrentPage | Query ACL policies. |
LookupEvents | lookup-events | actiontrail | --StartTime, --EndTime, --LookupAttribute.1.Key, --LookupAttribute.1.Value | Query operation history. |
ListTransitRouterRouteTables | list-transit-router-route-tables | cbn | --RegionId, --TransitRouterId | Query route tables. |
ListTransitRouterRouteEntries | list-transit-router-route-entries | cbn | --TransitRouterRouteTableId | Query route entries. |
Critical notes:
DescribeVpcFirewallPrecheckDetail uses --Region, not --RegionId.ListTransitRouterRouteEntries does not require --TransitRouterId.LookupEvents uses dot notation: --LookupAttribute.1.Key.--user-agent AlibabaCloud-Agent-Skills/alibabacloud-cloudfw-vpc-firewall-diagnosis.aliyun version, aliyun configure list, aliyun configure ai-mode enable/disable, and aliyun plugin update must not add the User-Agent flag.--profile.For failure scenarios, report: root cause, evidence, and recommended remediation. For closure pre-check scenarios, report: route rollback risk, ACL policy risk, recommended manual actions, and verification points. Keep evidence concise and avoid exposing full resource inventories or sensitive identifiers unless needed for diagnosis.