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.
Category: service
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+PageSizeorNextToken+MaxResults. DescribeInstancesreturns an empty list if the RAM user/role lacks permissions; useDryRunto validate permissions.- For
DescribeInstances,NextToken+MaxResultsis the recommended paged query pattern; use the returnedNextTokento fetch subsequent pages. DescribeInstancesrequiresRegionIdin the request even if the client has a region set.- Filters are ANDed; set only the filters you need.
Workflow
- Confirm region, resource identifiers, and desired action.
- Find API group and exact operation name in
references/api_overview.md. - Call API with Python SDK (preferred) or OpenAPI Explorer.
- Verify results with describe/list APIs.
- If you need repeatable inventory or summaries, use
scripts/and write outputs underoutput/alicloud-compute-ecs/.
SDK priority
- Python SDK (preferred)
- OpenAPI Explorer
- 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:
CPUUtilizationmemory_usedutilizationInternetInRate,InternetOutRateIntranetInRate,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
RunCommandwithRunShellScript. - Poll
DescribeInvocationResultsuntil 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 on Cursor
AI-first code editor with Composer
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
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches alicloud-compute-ecs from GitHub repository cinience/alicloud-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
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
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.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 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▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★38 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