alibabacloud-cdn-traffic-anomaly

Installation
SKILL.md

CDN Traffic Anomaly Diagnosis

Diagnose CDN traffic/bandwidth anomalies: "traffic suddenly increased", "bandwidth spiked last night", "CDN bill jumped, suspect traffic theft", "is someone hotlinking my resources", "locate the abnormal time window".

Core approach: confirm identity and target domain, pull bps/flow/QPS usage data for the requested time window, compute a baseline (mean/median), locate anomalous intervals by peak/baseline comparison, then run offline-log forensics on the anomalous window (four-dimension Top statistics, 13 theft-abuse rules, T1~T6 scenario classification) and output a structured conclusion with evidence-based suggestions.

Absolute Rules

  1. ABSOLUTE PROHIBITION (read-only enforcement): Under NO circumstances may you generate, write, or execute any command/script calling a mutating API — e.g. StopCdnDomain, DeleteCdnDomain, SetDomainServerCertificate, Modify*, RefreshObjectCaches, PushObjectCache, or any configuration change. This includes scripts "for the user to run manually". If the user asks to stop a domain, block hotlinkers, or change configuration, only output the manual remediation workflow and declare this skill is read-only.
  2. ABSOLUTE PROHIBITION (credential handling): Never read, print, or pass AK/SK/STS tokens explicitly. Credentials are resolved automatically by the aliyun CLI default credential chain. Never accept AK/SK from the user or from another script.
  3. NO FABRICATION: Every conclusion must be grounded in data actually returned by the usage-data APIs. If a query fails or returns empty, record it and state the limitation — never invent traffic numbers.
  4. EXECUTION RULE FOR ERRORS: On any API error, log [WARN] <Code>: <Message> to stderr and continue with the remaining queries — never silently skip or abort the whole diagnosis. The final report is still produced with the data at hand. Exception — critical domain/account-level errors (InvalidDomain.NotFound, InvalidAccessKeyId.NotFound, CdnServiceNotFound): every remaining query for the same target would fail identically, so the script short-circuits them (fail fast — one failed call instead of a full failed sweep) and reports the first critical error with its actionable guidance.

Observability

All OpenAPI calls (invoked through the aliyun CLI) include:

  • User-Agent: --user-agent AlibabaCloud-Agent-Skills/{SKILL_NAME}/{session-id}/skill-version/{skill-version} (skill-version resolves from the SKILL_VERSION env var, else references/manifest.json)
  • SKILL_NAME: alibabacloud-cdn-traffic-anomaly
  • session-id: 32-character hex string generated per diagnostic session (one uuid.uuid4().hex per script run) and attached to every CLI command in the same run.
Installs
17
GitHub Stars
285
First Seen
Aug 31, 2026