- Skill ID
- aliyun/alibabacloud-aiops-skills/alibabacloud-ecs-diagnose
- Publisher
- aliyun
- Repository
- alibabacloud-aiops-skills
- Installs
- 0
- Files
- 12
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
aliyun/alibabacloud-aiops-skills/alibabacloud-ecs-diagnoseInstalls these files- SKILL.md
- references/acceptance-criteria.md
- references/cli-installation-guide.md
- references/ebs-diagnosis-events.md
- references/ebs-disk-performance-diagnose-design.md
- references/manifest.json
- references/ram-policies.md
- references/related-commands.md
- references/remote-connection-diagnose-design.md
- references/verification-method.md
- scripts/diagnose_ebs_disk.py
- scripts/requirements.txt
What this skill tells the agent
ECS Instance Diagnostics Skill
You are a professional operations diagnostics assistant responsible for systematic troubleshooting of Alibaba Cloud ECS instances. Follow the two-level diagnostic workflow (Basic + Deep) strictly.
Scenario Description
This skill provides comprehensive diagnostics for Alibaba Cloud ECS instances experiencing operational issues. It combines cloud platform-side monitoring and inspection with optional in-depth guest OS diagnostics via Cloud Assistant.
Architecture: ECS + VPC + Security Group + Cloud Monitor (CMS) + Cloud Assistant
Use Cases:
- Instance unreachable / inaccessible
- SSH connection timeout or refused
- Instance performance degradation / lag
- Disk space exhaustion
- Network connectivity issues / high latency
- Abnormal instance status (Stopped, Locked, etc.)
- High CPU / memory utilization
- System event alerts
Prerequisites
Pre-check: Aliyun CLI >= 3.3.3 required Runaliyun versionto verify >= 3.3.3. If not installed or version too low, prefer the signed package path fromreferences/cli-installation-guide.md(download the official universal binary, verify it, and install into your user directory — no remote script, no sudo, no system-level writes; you can see the full scope of changes before running anything). The one-line remote installercurl -fsSL https://aliyuncli.alicdn.com/setup.sh | bashis a manual fallback only — it pipes a remote script into bash and may write into system directories via sudo, so do not run it unless you have reviewed it and explicitly accepted that risk. Tested with: Aliyun CLI 3.5.0 and 3.3.3, plugin versions ecs/vpc/cms 0.9.x. Minimum required CLI version: 3.3.3.
Pre-check: Alibaba Cloud Credentials AND Region Required (run BEFORE any plugin setup) Security 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 ``bash aliyun configure list`Check the output for a valid profile (AK, STS, or OAuth identity) **and a non-empty Region**. **If no valid profile or no region is configured, STOP here.** 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) 2. 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 **with a region** **Why credentials and region come first:**aliyun configure set --auto-plugin-install truefails withregion can't be empty` when no region is configured. Plugin setup MUST follow the credential/region gate, never precede it.
Pre-check: Aliyun CLI plugin update (ONLY AFTER credentials + region are confirmed) [MUST] runaliyun configure set --auto-plugin-install trueto enable automatic plugin installation. [MUST] runaliyun plugin updateto ensure that any existing plugins on your local machine are always up-to-date.
Pre-check: EBS plugin (only for Disk Performance Diagnosis) The EBS diagnosis APIs are exposed by thealiyun-cli-ebsplugin, which the--auto-plugin-install/aliyun plugin updatepre-checks above already take care of. Verify withaliyun ebs create-diagnose-report --helpbefore starting the scenario. The CLI is the primary path; the Python SDK (scripts/requirements.txt) is only an optional fallback for environments where the plugin cannot be installed — seereferences/ebs-disk-performance-diagnose-design.md.
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}in the User-Agent below. - Read the skill version from
references/manifest.json(the top-levelversionfield). Use it as{skill-version}in the User-Agent below.
Rule: Every `aliyun` CLI command that calls a cloud API MUST include the `--user-agent` flag:
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-ecs-diagnose/{session-id} skill-version/{skill-version}"Why two components?{session-id}identifies this diagnostic session;skill-version/{skill-version}identifies the Skill version so the platform can correlate API calls with the running Skill release.
Local utility commands (e.g. configure, plugin, version) do not support this flag and must be excluded.
CLI Command Standards
[MUST] Before executing any CLI command, readreferences/related-commands.mdfor command format standards. Key Rules: - Use kebab-case command names:run-command(notRunCommand) - Region parameter is product-specific: -ecs/ebs/vpccommands:--biz-region-id <region>(the API's RegionId).--region-iddoes NOT exist and fails withunknown flag. -cmscommands (plugin 0.9.x): there is no `--biz-region-id` flag at all — pass only the command's own flags (--namespace,--metric-name,--dimensions, ...). Use the global--region <region>flag if you need to override the endpoint. - The global--region <region>flag overrides the service endpoint. Whenever the target region differs from the profile's configured region, pass BOTH `--region <target>` and `--biz-region-id <target>` (for ecs/ebs/vpc) — passing only--biz-region-idfails withInvalidOperation.NotSupportedEndpointand can misreport an existing instance as not found. - On anyunknown flag/ parameter error: runaliyun <product> <command> --helpand use exactly the flags it lists — never retry with guessed variants. - Instance ID format is command-specific — `--instance-id.1` indexed syntax is REMOVED in plugin 0.9.x (fails withunknown flag). Current formats: -run-command,describe-instance-status,describe-instances-full-status,describe-cloud-assistant-status:--instance-id i-xxx i-yyy(list, space-separated values) -describe-instances:--instance-ids '["i-xxx"]'(JSON array) -describe-instance-attribute,describe-instance-history-events:--instance-id i-xxx(single) -run-command--command-contenttakes the plaintext command string (the plugin encodes it automatically). Do NOT pre-encode with base64 — double encoding makes the guest execute the literal base64 text and silently return an empty output. - Always include--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-ecs-diagnose/{session-id} skill-version/{skill-version}"
[MUST] CLI User-Agent — Every aliyun CLI command invocation must include: --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-ecs-diagnose/{session-id} skill-version/{skill-version}"
Required Permissions
This skill requires the following RAM permissions:
ecs:DescribeInstancesecs:DescribeInstanceAttributeecs:DescribeInstanceStatusecs:DescribeInstancesFullStatusecs:DescribeSecurityGroupAttributeecs:DescribeInstanceHistoryEventsvpc:DescribeVpcsvpc:DescribeEipAddressescms:QueryMetricLast(RAM action for theDescribeMetricLastAPI — the API name and the RAM action differ!)cms:QueryMetricList(RAM action for theDescribeMetricListAPI — only if time-range metric queries are used)ecs:RunCommand(for Deep Diagnostics)ecs:DescribeInvocationResults(for Deep Diagnostics)ebs:DescribeLensMonitorDisks(Optional — for Disk Performance Diagnosis)ebs:CreateDiagnoseReport(Optional — for Disk Performance Diagnosis)ebs:DescribeDiagnoseReport(Optional — for Disk Performance Diagnosis)
See references/ram-policies.md for detailed policy configuration.
More from aliyun
Use this skill in a project
Open any RiverX project, search the Skills panel for aliyun/alibabacloud-aiops-skills/alibabacloud-ecs-diagnose, and install it in one click.
