aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection

Claude Code and agent skill by aliyun/alibabacloud-aiops-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Perform instance inspection on Alibaba Cloud Cloud-Native API Gateway, AI Gateway, and API Gateway, and query Cloud Monitor metric data. Use when the user needs to view monitoring metrics of gateway instances (such as CPU usage, memory usage, connections, network IO, bandwidth, rate limiting, etc.), obtain metric data for a specific point in time or time range, or evaluate resource utilization. Trigger scenarios include: "check if the Cloud-Native API Gateway has enough resources", "view monitoring data of the AI Gateway instance", "inspect this API Gateway instance", "how is the gateway performing", "check if the gateway has any anomalies", "check gateway health status", etc.

Install

npx vskill@latest install aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection

SKILL.md

The same SKILL.md was published earlier as aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection.

Cloud-Native API Gateway / AI Gateway / API Gateway Instance Inspection

Scenario Description

Perform health inspection on Alibaba Cloud gateway instances, retrieve monitoring metric data, and generate inspection reports.

Architecture: Cloud Monitor (CMS) + API Gateway (cloudapi) + Cloud-Native API Gateway / AI Gateway (apig)

Supported Product Types:

Product TypeInstance ID FormatQuery Command
Cloud-Native API Gatewaygw-xxxxxxxaliyun apig list-gateways
AI Gatewaygw-xxxxxxxaliyun apig list-gateways
API Gateway (Dedicated)apigateway-xx-xxxxxxxaliyun cloudapi describe-instances
Note: API Gateway shared instances (VPC_SHARED) do not support inspection. Only dedicated instances (VPC_DEDICATED) are supported.

Installation

Pre-check: Aliyun CLI >= 3.3.3 required

Run aliyun version to verify >= 3.3.3. If not installed or version too low,
follow the upgrade/installation instructions below.

Upgrade / Install Aliyun CLI (choose one based on your platform):

  • macOS (Homebrew):

``bash brew install aliyun-cli # fresh install brew upgrade aliyun-cli # upgrade existing ``

  • Linux / macOS (binary):

``bash curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash ``

  • Windows (PowerShell):

``powershell Invoke-WebRequest -Uri "https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip" -OutFile "aliyun-cli.zip" Expand-Archive -Path aliyun-cli.zip -DestinationPath C:\aliyun-cli ``

After upgrade, verify with aliyun version. For more platforms and detailed instructions, see references/cli-installation-guide.md.

Pre-check: Aliyun CLI plugin update required

[MUST] run aliyun configure set --auto-plugin-install true to enable automatic plugin installation.
[MUST] run aliyun plugin update to ensure that any existing plugins are always up-to-date.

Observability (MUST follow for every aliyun command)

Upon loading this skill, generate a random session ID (32-char lowercase hex string) once for the entire session. Use it as {session-id} below.

Rule: Every `aliyun` CLI command that calls a cloud API MUST include the `--user-agent` flag.

Local utility commands (e.g. configure, plugin, version) do not support this flag and should be excluded.

--user-agent AlibabaCloud-Agent-Skills/alibabacloud-apigw-inspection/{session-id}

Environment Variables

No additional environment variables required. Credentials are configured via aliyun configure.


Authentication

Pre-check: Alibaba Cloud Credentials Required
Security Rules:
- NEVER read, echo, or print AK/SK values (e.g., echo $ALIBABA_CLOUD_ACCESS_KEY_ID is FORBIDDEN)
- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use aliyun configure set with literal credential values
- ONLY use aliyun configure list to check credential status
```bash
aliyun configure list
```
Check the output for a valid profile (AK, STS, or OAuth identity).
If no valid profile exists, STOP here.
1. Obtain credentials from Alibaba Cloud Console
2. Configure credentials outside of this session (via aliyun configure in terminal or environment variables in shell profile)
3. Return and re-run after aliyun configure list shows a valid profile

RAM Permission Policy

This skill only involves read-only operations and requires the following minimum RAM permissions:

ProductRAM ActionDescription
API Gatewayapigateway:DescribeInstancesList API Gateway instances
API Gatewayapigateway:DescribeInstanceDropPacketView dropped packet count
API Gatewayapigateway:DescribeInstanceDropConnectionsView dropped connection count
API Gatewayapigateway:DescribeInstanceSlbConnectView concurrent connection count
API Gatewayapigateway:DescribeInstanceTrafficView traffic information
API Gatewayapigateway:DescribeInstanceQpsView QPS data
Cloud-Native API Gateway / AI Gatewayapig:ListGatewaysQuery gateway list
Cloud Monitorcms:QueryMetricDataQuery monitoring data

Full policy document: references/ram-policies.md

[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
1. Read references/ram-policies.md to get the full list of permissions required by this SKILL
2. Use ram-permission-diagnose skill to guide the user through requesting the necessary permissions
3. Pause and wait until the user confirms that the required permissions have been granted

Parameter Confirmation

IMPORTANT: Parameter Confirmation — Before executing any command or API call,
ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks,
passwords, domain names, resource specifications, etc.) MUST be confirmed with the
user. Do NOT assume or use default values without explicit user approval.
ParameterRequired/OptionalDescriptionDefault
Product TypeRequiredCloud-Native API Gateway / AI Gateway / API GatewayNone
RegionIdRequiredRegion where the instance is locatedNone
Instance IDRequiredUnique identifier of the gateway instanceNone
Time RangeOptionalQuery time point or time rangeCurrent time

Available Region Check:


Core Workflow

Step 1: Collect Required Information

Before starting queries, the following information must be confirmed (proactively ask the user if not provided). Using default configurations is prohibited:

  1. Cloud Product Type — Which cloud product the user wants to query.(Cloud-Native API Gateway / AI Gateway / API Gateway).
  2. Region (RegionId) — The region where the instance is located.
  3. Instance ID — The unique identifier of the instance.
  4. Time Range — The time point or time range for the query.
Step 2: Query Instance Information
[MUST] API Invocation Requirement:
The gateway list MUST be queried by calling the Apig ListGateways API via CLI plugin mode.
This is a mandatory step — skipping the gateway list query is NOT allowed.
[MUST] Plugin Mode Only:
All commands in this skill MUST be executed using CLI plugin mode. Traditional API format (PascalCase action names) is NOT allowed.
If the plugin is not installed, run aliyun plugin install --names apig to install it, then retry.
2.1 Cloud-Native API Gateway / AI Gateway

API Mapping: Product Apig | Action ListGateways | Version 2019-01-01

bash
aliyun apig list-gateways --region ${region_id} \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-apigw-inspection/{session-id}

Note: The gatewayType in the response indicates the instance type: API (Cloud-Native API Gateway), AI (AI Gateway)

2.2 API Gateway
bash
aliyun cloudapi describe-instances --api-version 2016-07-14 --region ${region_id} \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-apigw-inspection/{session-id}

Note: The InstanceType in the response indicates the instance type. Only VPC_DEDICATED (dedicated) instances are supported. VPC_SHARED shared instances do not support inspection.

Step 3: Retrieve Monitoring Metric Data
3.1 Cloud-Native API Gateway / AI Gateway
[MUST] API Invocation Requirement:
Monitoring metrics MUST be queried using the Cms DescribeMetricData API via CLI plugin mode
CRITICAL — PROHIBITED APIs:
- DO NOT USE DescribeMetricList (aliyun cms describe-metric-list) — returns a different response format and is NOT accepted
- DO NOT USE DescribeMetricMetaList (aliyun cms describe-metric-meta-list) — DO NOT call this API to discover or list available metrics
ALL metric names are already provided below. No metric discovery is needed:
- For Cloud-Native API Gateway instances: select metric names from the Supported Metrics for Cloud-Native API Gateway table below
- For AI Gateway instances: select metric names from the Supported Metrics for AI Gateway table below
- Use the exact Metric Name values from the corresponding table directly as the --metric-name parameter

API Mapping: Product Cms | Action DescribeMetricData | Version 2019-01-01 | Namespace acs_cnapigateway

bash
aliyun cms describe-metric-data \
--namespace acs_cnapigateway \
--region ${region} \
--api-version 2019-01-01 \
--metric-name ${metric-name} \
--period 60 \
--start-time ${start-time} \
--end-time ${end-time} \
--dimensions '[{"instanceId": "${instanceId}"}]' \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-apigw-inspection/{session-id}

Notes:

  • start-time / end-time use Unix millisecond timestamps
  • instanceId must be passed in dimensions
  • MUST query ALL of the following metric categories: CPU Usage, Memory Usage, Connections, Network IO, Rate Limiting
  • Only check CPU, memory, connections, network IO, rate limiting, and bandwidth

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
216
Repository forks
27
7-day trend score
27

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection/badge)](https://verified-skill.com/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection)

Something wrong with this skill or its page? Tell us.