⚠️ Execution Method (Must Read): This skill executes diagnosis via local Python scripts using the
scripts/huawei-cloud.pydispatcher. Using hcloud, kubectl, or other CLI tools or direct API calls is prohibited.
- All actions are dispatched through
scripts/huawei-cloud.pywith--action <action_name>and--params <json_params>- All scripts and environment check scripts are inside the skill package. You must use
skill action=execto execute them; do not run them directly in a shell- For action names and parameters, see the Core Tools section below
- Do not attempt hcloud, kubectl, curl IAM, or other CLI/API methods. This skill does not depend on these tools
- All paths are relative to the skill directory, which is the directory where this SKILL.md resides
This skill turns "what changed before the incident" into provable causal attribution. It ingests audit logs, K8s historical events, AOM active+history alarms, and current resource topology snapshots; filters noise; maps core changes to blast radius; scores risk by sensitivity, topology scope, security boundary span, temporal proximity to fault, and event/alarm correlation; then outputs a complete Markdown report with investigation steps, core change timeline, evidence matrix, blast radius, Top N risk alerts, conclusion, and data gaps.
This skill is applicable to the following scenarios:
This skill does NOT handle the following:
Before using, you must run the environment check script to complete environment validation and dependency installation in one step:
skill action=exec: bash skill://scripts/check_env.shskill action=exec: powershell -ExecutionPolicy Bypass -File skill://scripts/check_env.ps1Windows Note: Do not use
&&to chain commands (PowerShell 5.x does not support it). Use semicolons if you need to change directories first.
The script will check in sequence: Python >= 3.6 → install dependencies → validate SDK → validate credentials → validate service availability. If the environment check fails, fix the issues before continuing with other actions.
Environment Variables:
VariableRequiredDescriptionHW_ACCESS_KEYYesHuawei Cloud AKHW_SECRET_KEYYesHuawei Cloud SKHW_REGION_NAMENoDefault cn-north-4HW_PROJECT_IDNoProject ID (automatically obtained via IAM API when not set)HW_SECURITY_TOKENNoRequired when using temporary AK/SKHW_CLUSTER_IDNoDefault CCE cluster ID (can also be passed per action)
Security Constraints:
Do not output the values of the above environment variables.
API ActionPermissionPurposecce:cluster:getGet clusterView cluster detailscce:cluster:listList clustersList CCE clusterscce:node:listList nodesList cluster nodescce:nodepool:listList node poolsList node poolsaom:*:getRead AOMQuery AOM metrics and alarmsaom:alarmRule:listList alarm rulesQuery alarm rulesaom:event:listList eventsQuery AOM alarm events
Permission Failure Handling:
All actions are dispatched through scripts/huawei-cloud.py using skill action=exec.
ActionRequired ParametersDescriptionhuawei_change_impact_analyzeregion, cluster_idPrimary comprehensive action: orchestrates audit log ingestion, K8s event correlation, AOM alarm correlation, resource snapshot collection, noise filtering, blast radius modeling, and risk scoring into a unified change impact report with Top N risk alerts
ActionRequired ParametersDescriptionhuawei_query_cce_audit_logsregion, cluster_idQuery CCE Kubernetes audit logs for create/update/patch/delete operations with actor, verb, resource, namespace, name, requestURI, statusCodehuawei_query_k8s_events_from_ltsregion, cluster_idQuery historical K8s Events from LTS (overcomes the K8s API short event window)huawei_get_cce_eventsregion, cluster_idList current Kubernetes Events when LTS is unavailable
ActionRequired ParametersDescriptionhuawei_analyze_aom_alarmsregion, cluster_idAnalyze AOM active + history alarm patterns and correlation across resources
ActionRequired ParametersDescriptionhuawei_workload_rollout_diagnoseregion, cluster_id, namespace, kind, nameDrill down when changes point to Deployment/StatefulSet/DaemonSet rollout failures (cross-skill: huawei-cloud-cce-workload-failure-diagnoser)huawei_network_failure_diagnoseregion, cluster_idDrill down when changes point to Service/Ingress/NetworkPolicy/ELB connectivity failures (cross-skill: huawei-cloud-cce-network-failure-diagnoser)huawei_node_failure_diagnoseregion, cluster_idDrill down when changes point to Node taint, NotReady, scheduling, or resource pressure (cross-skill: huawei-cloud-cce-node-failure-diagnoser)
ActionRequired ParametersDescriptionhuawei_get_cce_podsregion, cluster_idList current Pod status for blast radius modelinghuawei_get_cce_deploymentsregion, cluster_idList current Deployment statushuawei_get_cce_servicesregion, cluster_idList current Service selector/ports for impact mappinghuawei_get_cce_ingressesregion, cluster_idList current Ingress rules/backends for impact mappinghuawei_get_kubernetes_nodesregion, cluster_idList current Node status for taint/impact mappinghuawei_list_cce_configmapsregion, cluster_idList current ConfigMap objects (identify CoreDNS, kube-proxy, business configs)huawei_list_cce_secretsregion, cluster_idList current Secret objectshuawei_list_cce_nodepoolsregion, cluster_idList current NodePool status for infrastructure change context
ActionRequired ParametersDescriptionhuawei_list_security_groupsregionList current Security Group rules for cloud network contexthuawei_list_vpc_aclsregionList current VPC ACL rules for cloud network context
Common Parameters:
ParameterRequiredDescriptionregionYesHuawei Cloud region, e.g., cn-north-4cluster_idYesCCE cluster ID
Optional Parameters (passed via --params JSON):
ParameterDescriptionhoursAnalysis window in hours (default 1)start_timeAnalysis window start (YYYY-MM-DD HH:MM:SS), alternative to hoursend_timeAnalysis window end (YYYY-MM-DD HH:MM:SS), alternative to hoursnamespaceNarrow scope to a namespace, but do not exclude kube-system/CoreDNS global changestarget_nameTarget object name for scope narrowingworkload_nameWorkload name for scope narrowingapp_nameApplication name for scope narrowingfault_timeIncident time point for temporal proximity scoringincident_timeAlternative to fault_timelog_group_idAudit log group ID (manual fallback when auto-discovery fails)log_stream_idAudit log stream ID (manual fallback when auto-discovery fails)include_auditEnable/disable audit log collection (default true)include_k8s_eventsEnable/disable K8s event collection (default true)include_aomEnable/disable AOM alarm collection (default true)include_snapshotsEnable/disable resource snapshot collection (default true)top_nNumber of top risk alerts in report (default 3)output_filePath to write the Markdown report fileakOverride AK (uses HW_ACCESS_KEY by default)skOverride SK (uses HW_SECRET_KEY by default)project_idOverride project ID (auto-obtained via IAM when not set)
huawei_change_impact_analyze#Returns structured JSON with embedded report_markdown. See references/output-schema.md for full schema.
json
{
"success": true,
"analysis_trace_id": "CIA-yyyymmddHHMMSS-xxxxxxxx",
"analysis_window": {
"start_time": "YYYY-MM-DD HH:MM:SS",
"end_time": "YYYY-MM-DD HH:MM:SS",
"hours": 1
},
"scope": {
"region": "cn-north-4",
"cluster_id": "cluster-id",
"namespace": "optional",
"target_name": "optional"
},
"summary": {
"core_change_count": 3,
"top_risk_count": 3,
"data_sources": {
"CCE Audit Logs": "success",
"K8s Historical Events": "success",
"AOM Alarms": "success",
"Current Resource Snapshots": "success"
}
},
"top_changes": [
{
"time": "YYYY-MM-DD HH:MM:SS",
"verb": "patch",
"resource": "configmaps",
"namespace": "kube-system",
"name": "coredns",
"object_key": "kube-system/coredns",
"category": "global_config_change",
"title": "Cluster core configuration change",
"actor": "user or serviceAccount",
"semantic_fields": ["data", "Corefile"],
"blast_radius": "cluster-wide",
"impacted_entities": {
"pods": [],
"services": ["kube-system/kube-dns"],
"ingresses": [],
"nodes": ["node-a"]
},
"risk_score": 96,
"risk_level": "Critical",
"confidence": "high",
"risk_reasons": [],
"evidence": []
}
],
"changes": [],
"report_markdown": "# CCE Change Impact Analysis Report\n...",
"report_file": "/optional/path/report.md",
"capture_metadata": {}
}
huawei_change_impact_analyze on a known stable cluster to verify it returns success: true with zero or low-confidence core changeshuawei_change_impact_analyze on a cluster with known recent changes to verify Top N risk alerts are accurately identifiedhuawei_change_impact_analyze for comprehensive change correlation; drill down into domain diagnoser actions only when specific evidence requires deeper analysiskube-system must always be included in business fault analysis regardless of target namespace scopereplicas adjustments are noise; image, startup args, probe, resource spec, environment variable, and ConfigMap/Secret reference changes are core changeshuawei-cloud-cce-auto-remediation-runnerreferences/workflow.mdreferences/capability-map.mdreferences/output-schema.mdreferences/risk-rules.mdskill action=exec; do not run them directly in a shellhuawei-cloud-cce-auto-remediation-runner; this skill never executes remediationhuawei-cloud-cce-auto-remediation-runner; comprehensive root cause → huawei-cloud-cce-root-cause-analyzer; workload diagnosis → huawei-cloud-cce-workload-failure-diagnoser; network diagnosis → huawei-cloud-cce-network-failure-diagnoser; node diagnosis → huawei-cloud-cce-node-failure-diagnoserreplicas modifications are noise; only image, probe, resource, env, config reference changes are corehuawei-cloud-cce-auto-remediation-runner; this skill only outputs recommendations