alicloud-compute-ecs

cinience/alicloud-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-compute-ecs
0 commentsdiscussion
summary

Category: service

skill.md

Category: service

Elastic Compute Service (ECS)

Validation

mkdir -p output/alicloud-compute-ecs
python -m py_compile skills/compute/ecs/alicloud-compute-ecs/scripts/list_instances_all_regions.py
python -m py_compile skills/compute/ecs/alicloud-compute-ecs/scripts/query_instance_usage.py
python -m py_compile skills/compute/ecs/alicloud-compute-ecs/scripts/run_remote_command.py
echo "py_compile_ok" > output/alicloud-compute-ecs/validate.txt

Pass criteria: command exits 0 and output/alicloud-compute-ecs/validate.txt is generated.

Output And Evidence

  • Save list/summarize outputs under output/alicloud-compute-ecs/.
  • Keep command arguments and region scope in each evidence file.

Use Alibaba Cloud OpenAPI (RPC) with official SDKs or OpenAPI Explorer to manage ECS resources. Prefer the Python SDK for all examples and execution.

Prerequisites

  • Prepare AccessKey (RAM user/role with least privilege).
  • Choose the correct region and endpoint (public/VPC).
  • ECS OpenAPI is RPC style; prefer SDK or OpenAPI Explorer to avoid manual signing.

API behavior notes (from ECS docs)

  • Most list/describe APIs support pagination via PageNumber + PageSize or NextToken + MaxResults.
  • DescribeInstances returns an empty list if the RAM user/role lacks permissions; use DryRun to validate permissions.
  • For DescribeInstances, NextToken + MaxResults is the recommended paged query pattern; use the returned NextToken to fetch subsequent pages.
  • DescribeInstances requires RegionId in the request even if the client has a region set.
  • Filters are ANDed; set only the filters you need.

Workflow

  1. Confirm region, resource identifiers, and desired action.
  2. Find API group and exact operation name in references/api_overview.md.
  3. Call API with Python SDK (preferred) or OpenAPI Explorer.
  4. Verify results with describe/list APIs.
  5. If you need repeatable inventory or summaries, use scripts/ and write outputs under output/alicloud-compute-ecs/.

SDK priority

  1. Python SDK (preferred)
  2. OpenAPI Explorer
  3. Other SDKs (only if Python is not feasible)

Python SDK quickstart (list instances)

Virtual environment is recommended (avoid PEP 668 system install restrictions).

python3 -m venv .venv
. .venv/bin/activate
python -m pip install alibabacloud_ecs20140526 alibabacloud_tea_openapi alibabacloud_credentials
from alibabacloud_ecs20140526.client import Client as Ecs20140526Client
from alibabacloud_ecs20140526 import models as ecs_models
from alibabacloud_tea_openapi import models as open_api_models


def create_client(region_id: str) -> Ecs20140526Client:
    config = open_api_models.Config(
        # Use env vars or shared config files per AccessKey priority.
        region_id=region_id,
        endpoint=f"ecs.{region_id}.aliyuncs.com",
    )
    return Ecs20140526Client(config)


def list_instances(region_id: str):
    client = create_client(region_id)
    resp = client.describe_instances(ecs_models.DescribeInstancesRequest(
        region_id=region_id,
        page_number=1,
        page_size=50,
    ))
    for inst in resp.body.instances.instance:
        print(inst.instance_id, inst.instance_name, inst.instance_type, inst.status)


if __name__ == "__main__":
    list_instances("cn-hangzhou")

Python SDK scripts (recommended for inventory)

  • List all instances across regions (TSV/JSON): scripts/list_instances_all_regions.py
  • Query resource usage (CPU/Memory/Network) for one instance: scripts/query_instance_usage.py
  • Run remote commands via Cloud Assistant (RunCommand): scripts/run_remote_command.py
  • Summarize instance specs across regions: scripts/summary_instance_specs.py
  • Summarize instance counts by region (optional status breakdown): scripts/summary_instances_by_region.py
  • Summarize instance counts by status: scripts/summary_instances_by_status.py
  • Summarize instance counts by instance type: scripts/summary_instances_by_instance_type.py
  • Summarize instance counts by VPC: scripts/summary_instances_by_vpc.py
  • Summarize instance counts by security group: scripts/summary_instances_by_security_group.py

Python SDK: query one instance resource usage

Install dependencies (add CMS SDK):

python -m pip install alibabacloud_ecs20140526 alibabacloud_cms20190101 alibabacloud_tea_openapi alibabacloud_credentials

Example (last 1 hour, 5-minute period):

python skills/compute/ecs/alicloud-compute-ecs/scripts/query_instance_usage.py \
  --instance-id i-xxxxxxxxxxxxxxxxx \
  --region-id cn-shanghai \
  --hours 1 \
  --period 300 \
  --summary-only \
  --output output/alicloud-compute-ecs/ecs-usage-i-xxxxxxxxxxxxxxxxx-1h.json

Recommended default metrics:

  • CPUUtilization
  • memory_usedutilization
  • InternetInRate, InternetOutRate
  • IntranetInRate, IntranetOutRate

Python SDK: run remote command on one ECS instance

Example (ps -ef):

python skills/compute/ecs/alicloud-compute-ecs/scripts/run_remote_command.py \
  --instance-id i-xxxxxxxxxxxxxxxxx \
  --region-id cn-shanghai \
  --command 'ps -ef' \
  --output output/alicloud-compute-ecs/runcommand-i-xxxxxxxxxxxxxxxxx-ps-ef.json

Behavior:

  • Submit RunCommand with RunShellScript.
  • Poll DescribeInvocationResults until final status.
  • Decode base64 stdout and save normalized JSON evidence.

Python SDK: list instances for all regions

from alibabacloud_ecs20140526.client import Client as Ecs20140526Client
from alibabacloud_ecs20140526 import models as ecs_models
from alibabacloud_tea_openapi import models as open_api_models


def create_client(region_id: str) -> Ecs20140526Client:
    config = open_api_models.Config(
        region_id=region_id,
        endpoint=f"ecs.{region_id}.aliyuncs.com",
    )
    return Ecs20140526Client(config)


def list_regions() -> list[str]:
    client = create_client("cn-hangzhou")
    resp = client.describe_regions(ecs_models.DescribeRegionsRequest())
    return [r.region_id for r in resp.body.regions.region]


def list_instances_all_regions():
    for region_id in list_regions():
        client = create_client(region_id)
        req = ecs_models.DescribeInstancesRequest(
            region_id=region_id,
            page_number=1,
            page_size=100,
        )
        resp = client.describe_instances(req)
        print(f"== {region_id} ({resp.body.total_count}) ==")
        for inst in resp.body.instances.instance:
            print(inst.instance_id, inst.instance_name, inst.instance_type, inst.status)


if __name__ == "__main__":
    list_instances_all_regions()

Python SDK: paginated instance listing

from alibabacloud_ecs20140526.client import Client as Ecs20140526Client
from alibabacloud_ecs20140526 import models as ecs_models
from alibabacloud_tea_openapi import models as open_api_models


def create_client(region_id: str) -> Ecs20140526Client:
    config = open_api_models.Config(
        region_id=region_id,
        endpoint=f"ecs.{region_id}.aliyuncs.com",
    )
    return Ecs20140526Client(config)


def list_instances_paged(region_id: str):
    client = create_client(region_id)
    page_number = 1
    page_size = 100
    while True:
        resp = client.describe_instances(ecs_models.DescribeInstancesRequest(
            region_id=region_id,
            page_number=page_number,
            page_size=page_size,
        
how to use alicloud-compute-ecs

How to use alicloud-compute-ecs on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add alicloud-compute-ecs
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-compute-ecs

The skills CLI fetches alicloud-compute-ecs from GitHub repository cinience/alicloud-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/alicloud-compute-ecs

Reload or restart Cursor to activate alicloud-compute-ecs. Access the skill through slash commands (e.g., /alicloud-compute-ecs) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.538 reviews
  • Luis Srinivasan· Dec 28, 2024

    alicloud-compute-ecs reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Shikha Mishra· Dec 24, 2024

    Keeps context tight: alicloud-compute-ecs is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Aditi Thomas· Dec 16, 2024

    Registry listing for alicloud-compute-ecs matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Luis Iyer· Nov 19, 2024

    I recommend alicloud-compute-ecs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Rahul Santra· Nov 15, 2024

    alicloud-compute-ecs has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Sofia Agarwal· Nov 15, 2024

    We added alicloud-compute-ecs from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Harper Huang· Nov 7, 2024

    Useful defaults in alicloud-compute-ecs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Chen Johnson· Oct 26, 2024

    I recommend alicloud-compute-ecs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Luis Gill· Oct 10, 2024

    Useful defaults in alicloud-compute-ecs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Pratham Ware· Oct 6, 2024

    Solid pick for teams standardizing on skills: alicloud-compute-ecs is focused, and the summary matches what you get after install.

showing 1-10 of 38

1 / 4