aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection
Claude Code and agent skill by aliyun/alibabacloud-aiops-skills
- community
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-inspectionSKILL.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 Type | Instance ID Format | Query Command | |
|---|---|---|---|
| Cloud-Native API Gateway | gw-xxxxxxx | aliyun apig list-gateways | |
| AI Gateway | gw-xxxxxxx | aliyun apig list-gateways | |
| API Gateway (Dedicated) | apigateway-xx-xxxxxxx | aliyun 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
Runaliyun versionto 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] runaliyun configure set --auto-plugin-install trueto enable automatic plugin installation.[MUST] runaliyun plugin updateto 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.
Environment Variables
No additional environment variables required. Credentials are configured via aliyun configure.
Authentication
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:- NEVER read, echo, or print AK/SK values (e.g.,echo $ALIBABA_CLOUD_ACCESS_KEY_IDis FORBIDDEN)- NEVER ask the user to input AK/SK directly in the conversation or command line- NEVER usealiyun configure setwith literal credential values- ONLY usealiyun configure listto check credential status```bashaliyun 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 Console2. Configure credentials outside of this session (viaaliyun configurein terminal or environment variables in shell profile)3. Return and re-run afteraliyun configure listshows a valid profile
RAM Permission Policy
This skill only involves read-only operations and requires the following minimum RAM permissions:
| Product | RAM Action | Description | |
|---|---|---|---|
| API Gateway | apigateway:DescribeInstances | List API Gateway instances | |
| API Gateway | apigateway:DescribeInstanceDropPacket | View dropped packet count | |
| API Gateway | apigateway:DescribeInstanceDropConnections | View dropped connection count | |
| API Gateway | apigateway:DescribeInstanceSlbConnect | View concurrent connection count | |
| API Gateway | apigateway:DescribeInstanceTraffic | View traffic information | |
| API Gateway | apigateway:DescribeInstanceQps | View QPS data | |
| Cloud-Native API Gateway / AI Gateway | apig:ListGateways | Query gateway list | |
| Cloud Monitor | cms:QueryMetricData | Query 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. Readreferences/ram-policies.mdto get the full list of permissions required by this SKILL2. Useram-permission-diagnoseskill to guide the user through requesting the necessary permissions3. 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 theuser. Do NOT assume or use default values without explicit user approval.
| Parameter | Required/Optional | Description | Default | |
|---|---|---|---|---|
| Product Type | Required | Cloud-Native API Gateway / AI Gateway / API Gateway | None | |
| RegionId | Required | Region where the instance is located | None | |
| Instance ID | Required | Unique identifier of the gateway instance | None | |
| Time Range | Optional | Query time point or time range | Current 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:
- Cloud Product Type — Which cloud product the user wants to query.(Cloud-Native API Gateway / AI Gateway / API Gateway).
- Region (RegionId) — The region where the instance is located.
- Instance ID — The unique identifier of the instance.
- 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, runaliyun plugin install --names apigto install it, then retry.
2.1 Cloud-Native API Gateway / AI Gateway
API Mapping: Product Apig | Action ListGateways | Version 2019-01-01
Note: The gatewayType in the response indicates the instance type: API (Cloud-Native API Gateway), AI (AI Gateway)
2.2 API Gateway
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 modeCRITICAL — PROHIBITED APIs:- DO NOT USEDescribeMetricList(aliyun cms describe-metric-list) — returns a different response format and is NOT accepted- DO NOT USEDescribeMetricMetaList(aliyun cms describe-metric-meta-list) — DO NOT call this API to discover or list available metricsALL 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 exactMetric Namevalues from the corresponding table directly as the--metric-nameparameter
API Mapping: Product Cms | Action DescribeMetricData | Version 2019-01-01 | Namespace acs_cnapigateway
Notes:
start-time / end-timeuse Unix millisecond timestampsinstanceIdmust 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
- SKILL.md in the repositoryCheckingskills/middleware/apigateway/alibabacloud-apigw-inspection/SKILL.md
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
[](https://verified-skill.com/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-apigw-inspection)