alicloud-ecs

Manage Alibaba Cloud Elastic Compute Service (ECS) using the @alicloud/ecs20140526 TypeScript SDK. Use when working with cloud servers on Alibaba Cloud, including instance lifecycle (create, start, stop, reboot, delete), disks and snapshots, images, security groups, VPC networking, EIP, ENI, SSH key pairs, dedicated hosts, auto provisioning, launch templates, Cloud Assistant commands, tags, system events, diagnostics, storage capacity units, and prefix lists. Covers all 374 APIs of the ECS 20140526 version.

25 stars

Best use case

alicloud-ecs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage Alibaba Cloud Elastic Compute Service (ECS) using the @alicloud/ecs20140526 TypeScript SDK. Use when working with cloud servers on Alibaba Cloud, including instance lifecycle (create, start, stop, reboot, delete), disks and snapshots, images, security groups, VPC networking, EIP, ENI, SSH key pairs, dedicated hosts, auto provisioning, launch templates, Cloud Assistant commands, tags, system events, diagnostics, storage capacity units, and prefix lists. Covers all 374 APIs of the ECS 20140526 version.

Teams using alicloud-ecs should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/alicloud-ecs/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/agents-infrastructure/alicloud-agent-skills/alicloud-ecs/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/alicloud-ecs/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How alicloud-ecs Compares

Feature / Agentalicloud-ecsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage Alibaba Cloud Elastic Compute Service (ECS) using the @alicloud/ecs20140526 TypeScript SDK. Use when working with cloud servers on Alibaba Cloud, including instance lifecycle (create, start, stop, reboot, delete), disks and snapshots, images, security groups, VPC networking, EIP, ENI, SSH key pairs, dedicated hosts, auto provisioning, launch templates, Cloud Assistant commands, tags, system events, diagnostics, storage capacity units, and prefix lists. Covers all 374 APIs of the ECS 20140526 version.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Alibaba Cloud ECS Skill

Manage cloud servers, disks, images, networks, security, and operations via the `@alicloud/ecs20140526` TypeScript SDK.

## Prerequisites

```bash
npm install @alicloud/ecs20140526 @alicloud/openapi-core @darabonba/typescript
```

```bash
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-key-id>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-key-secret>"
export ALIBABA_CLOUD_REGION_ID="cn-hangzhou"
```

See [scripts/setup_client.ts](scripts/setup_client.ts) for a reusable client factory, and [references/quickstart.md](references/quickstart.md) for full setup including regions, instance types, charge types, and pagination.

## Client Initialization

```typescript
import Client from '@alicloud/ecs20140526';
import { Config } from '@alicloud/openapi-core';

const client = new Client(new Config({
  accessKeyId: process.env.ALIBABA_CLOUD_ACCESS_KEY_ID,
  accessKeySecret: process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET,
  regionId: 'cn-hangzhou',
  endpoint: 'ecs.cn-hangzhou.aliyuncs.com',
}));
```

## API Overview (374 APIs in 14 Domains)

| Domain | APIs | Key Operations | Reference |
|--------|------|----------------|-----------|
| Instance | 71 | runInstances, startInstance, stopInstance, describeInstances | [references/instance.md](references/instance.md) |
| Disk & Snapshot | 46 | createDisk, attachDisk, createSnapshot, createAutoSnapshotPolicy | [references/disk.md](references/disk.md) |
| Image | 23 | createImage, copyImage, importImage, describeImages | [references/image.md](references/image.md) |
| Security Group | 15 | createSecurityGroup, authorizeSecurityGroup, revokeSecurityGroup | [references/security-group.md](references/security-group.md) |
| Network & EIP | 91 | createVpc, createVSwitch, allocateEipAddress, createNetworkInterface | [references/network.md](references/network.md) |
| SSH Key Pair | 6 | createKeyPair, attachKeyPair, describeKeyPairs | [references/key-pair.md](references/key-pair.md) |
| Dedicated Host | 15 | allocateDedicatedHosts, describeDedicatedHosts | [references/dedicated-host.md](references/dedicated-host.md) |
| Auto Provisioning | 20 | createAutoProvisioningGroup, createElasticityAssurance | [references/auto-scaling.md](references/auto-scaling.md) |
| Launch Template | 7 | createLaunchTemplate, describeLaunchTemplates | [references/launch-template.md](references/launch-template.md) |
| Cloud Assistant | 22 | runCommand, describeInvocationResults, createActivation | [references/command.md](references/command.md) |
| Tag & Resource | 18 | tagResources, describeRegions, describeZones | [references/tag-resource.md](references/tag-resource.md) |
| System Events | 20 | describeInstancesFullStatus, createDiagnosticReport | [references/system-event.md](references/system-event.md) |
| Storage & Deployment | 16 | createStorageSet, createDeploymentSet, createSavingsPlan | [references/storage-capacity.md](references/storage-capacity.md) |
| Prefix List | 5 | createPrefixList, describePrefixLists | [references/prefix-list.md](references/prefix-list.md) |

## Core Patterns

### RPC-Style API

ECS uses RPC-style APIs. All parameters are flat fields in a Request object:

```typescript
import * as models from '@alicloud/ecs20140526/dist/models';

const { body } = await client.describeInstances(new models.DescribeInstancesRequest({
  regionId: 'cn-hangzhou',
  instanceIds: JSON.stringify(['i-xxx1', 'i-xxx2']),
  pageSize: 10,
  pageNumber: 1,
}));
```

### regionId is Required

Almost all ECS APIs require `regionId`. Always include it:

```typescript
const request = new models.DescribeDisksRequest({
  regionId: 'cn-hangzhou',  // Required!
  diskIds: JSON.stringify(['d-xxx']),
});
```

### Page-Based Pagination

Most Describe/List APIs use `pageNumber` + `pageSize`:

```typescript
let pageNumber = 1;
let all: any[] = [];
while (true) {
  const { body } = await client.describeInstances(new models.DescribeInstancesRequest({
    regionId: 'cn-hangzhou', pageSize: 100, pageNumber,
  }));
  all.push(...(body.instances?.instance || []));
  if (all.length >= (body.totalCount || 0)) break;
  pageNumber++;
}
```

### JSON-Encoded Array Parameters

Some parameters accept JSON-encoded arrays:

```typescript
// instanceIds, diskIds, etc. are JSON strings
instanceIds: JSON.stringify(['i-xxx1', 'i-xxx2']),
diskIds: JSON.stringify(['d-xxx1']),
```

### Error Handling

```typescript
try {
  await client.describeInstances(request);
} catch (err: any) {
  console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}
```

## Common Workflows

### 1. Launch Instance

```
describeRegions → describeInstanceTypes → describeImages → createSecurityGroup → authorizeSecurityGroup → runInstances
```

### 2. Disk & Snapshot

```
createDisk → attachDisk → createSnapshot → createAutoSnapshotPolicy → applyAutoSnapshotPolicy
```

### 3. Image Management

```
createImage → copyImage → describeImages → importImage / exportImage
```

### 4. Security Group Rules

```
createSecurityGroup → authorizeSecurityGroup → authorizeSecurityGroupEgress → describeSecurityGroupAttribute
```

### 5. Instance Scaling

```
stopInstance → modifyInstanceSpec → startInstance
```

### 6. Remote Command Execution

```
describeCloudAssistantStatus → runCommand → describeInvocationResults
```

### 7. Network Interface

```
createNetworkInterface → attachNetworkInterface → assignPrivateIpAddresses
```

### 8. Key Pair Login

```
createKeyPair → runInstances (keyPairName) → attachKeyPair
```

### 9. Dedicated Host

```
describeDedicatedHostTypes → allocateDedicatedHosts → runInstances (dedicatedHostId)
```

### 10. Tag-Based Management

```
tagResources → describeInstances (tag filter) → untagResources
```

See [references/workflows.md](references/workflows.md) for detailed workflow examples with full code.

## API Reference Quick Index

Load the corresponding reference file for parameter details:

- **Instance lifecycle/types/pricing**: `references/instance.md`
- **Disk/snapshot/auto-snapshot**: `references/disk.md`
- **Image/pipeline/share**: `references/image.md`
- **Security group/rules**: `references/security-group.md`
- **VPC/VSwitch/EIP/ENI/NAT/Route**: `references/network.md`
- **SSH key pairs**: `references/key-pair.md`
- **Dedicated hosts/clusters**: `references/dedicated-host.md`
- **Auto provisioning/elasticity/capacity**: `references/auto-scaling.md`
- **Launch templates**: `references/launch-template.md`
- **Cloud Assistant commands**: `references/command.md`
- **Tags/regions/zones/tasks**: `references/tag-resource.md`
- **System events/diagnostics**: `references/system-event.md`
- **Storage sets/deployment sets/savings**: `references/storage-capacity.md`
- **Prefix lists**: `references/prefix-list.md`

Each reference file contains per-API documentation with method signatures and parameter tables.

## Code Examples

See [scripts/examples.ts](scripts/examples.ts) for ready-to-use code covering:

- Instance CRUD and lifecycle management
- Security group creation and rule management
- Disk creation, attachment, and snapshot
- Image creation and listing
- SSH key pair management
- Cloud Assistant remote command execution
- Tag-based resource management
- Region and zone queries

Related Skills

alicloud-vpc

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud VPC networking using the @alicloud/vpc20160428 TypeScript SDK. Use when working with virtual private clouds, VSwitches, route tables, EIPs, NAT gateways, VPN gateways, Express Connect, BGP routing, network ACLs, flow logs, traffic mirroring, IPv6, HAVIP, gateway endpoints, and resource tagging. Covers all 396 APIs of the VPC 20160428 version.

alicloud-redis

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud Redis (Tair / R-KVStore) using the @alicloud/r-kvstore20150101 TypeScript SDK. Use when working with Redis or Tair instances, accounts, backups, security (whitelist/SSL/TDE/audit), parameters, monitoring, cluster scaling, direct connection, Tair Custom instances, and resource tagging. Covers all 157 APIs of the R-KVStore 20150101 version.

alicloud-rds

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud RDS using the @alicloud/rds20140815 TypeScript SDK. Use when working with relational database instances (MySQL, PostgreSQL, SQL Server, MariaDB), accounts, databases, backups, security, monitoring, parameters, read-only instances, database proxy, migration, cross-region DR, PostgreSQL extensions, RDS Custom instances, and resource tagging. Covers all 398 APIs of the RDS 20140815 version.

alicloud-fc

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud Function Compute (FC) 3.0 using the @alicloud/fc20230330 TypeScript SDK. Use when working with serverless functions on Alibaba Cloud, including function CRUD, invocation, versions, aliases, triggers (HTTP/Timer/OSS/CDN/MNS), async invocation, concurrency and scaling configs, provisioned instances, custom domains, layers, VPC bindings, sessions, and resource tagging. Covers all 67 APIs of the FC 20230330 version.

alicloud-cr

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud Container Registry (ACR) Enterprise Edition using the @alicloud/cr20181201 TypeScript SDK. Use when working with container image registries on Alibaba Cloud, including instance management, namespaces, image repositories, image tags, build rules, image synchronization, security scanning, delivery chains, Helm charts, artifact lifecycle, and event notifications. Covers all 115 APIs of the CR 20181201 version.

alicloud-cdn

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud CDN using the @alicloud/cdn20180510 TypeScript SDK. Use when working with CDN domain acceleration, domain configuration, SSL certificates, cache refresh/prefetch, real-time monitoring, traffic analysis, log management, usage/billing, IP tools, Function Compute triggers, delivery tasks, and resource tagging. Covers all 168 APIs of the CDN 20180510 version.

alicloud-alidns

25
from ComeOnOliver/skillshub

Manage Alibaba Cloud DNS (Alidns) using the @alicloud/alidns20150109 TypeScript SDK. Use when working with DNS resolution on Alibaba Cloud, including domain management, DNS record CRUD (A, AAAA, CNAME, MX, TXT, SRV, CAA, etc.), DNS load balancing (DNSSLB), custom resolution lines, DNSSEC, domain groups, batch operations, Cloud GTM (Global Traffic Manager), DNS GTM, GTM Classic, recursive DNS, DNS cache, Public DNS (PDNS), DNS over HTTPS (DoH), ISP cache flush, domain statistics, and resource tagging. Covers all 234 APIs of the Alidns 20150109 version.

Daily Logs

25
from ComeOnOliver/skillshub

Record the user's daily activities, progress, decisions, and learnings in a structured, chronological format.

Socratic Method: The Dialectic Engine

25
from ComeOnOliver/skillshub

This skill transforms Claude into a Socratic agent — a cognitive partner who guides

Sokratische Methode: Die Dialektik-Maschine

25
from ComeOnOliver/skillshub

Dieser Skill verwandelt Claude in einen sokratischen Agenten — einen kognitiven Partner, der Nutzende durch systematisches Fragen zur Wissensentdeckung führt, anstatt direkt zu instruieren.

College Football Data (CFB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

College Basketball Data (CBB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.