.claude/skills/alicloud-vpc/SKILL.md
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.
npx skillsauth add agents-infrastructure/licell alicloud-vpcInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Manage VPC networking infrastructure via the @alicloud/vpc20160428 TypeScript SDK.
npm install @alicloud/vpc20160428 @alicloud/openapi-core @darabonba/typescript
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-key-id>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-key-secret>"
See scripts/setup_client.ts for a reusable client factory, and references/quickstart.md for full setup including endpoints, CIDR blocks, pagination, and async polling.
import Client from '@alicloud/vpc20160428';
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,
endpoint: 'vpc.aliyuncs.com',
regionId: 'cn-hangzhou',
}));
| Domain | APIs | Key Operations | Reference | |--------|------|----------------|-----------| | VPC Management | 32 | createVpc, describeVpcs, modifyVpcAttribute | references/vpc.md | | VSwitch | 11 | createVSwitch, describeVSwitches | references/vswitch.md | | Route Table & Entry | 33 | createRouteEntry, describeRouteTables | references/route-table.md | | Elastic IP (EIP) | 47 | allocateEipAddress, associateEipAddress | references/eip.md | | NAT Gateway | 30 | createNatGateway, createSnatEntry, createForwardEntry | references/nat-gateway.md | | VPN Gateway | 62 | createVpnGateway, createVpnConnection, createSslVpnServer | references/vpn.md | | Express Connect & VBR | 83 | createPhysicalConnection, createVirtualBorderRouter | references/express-connect.md | | BGP Routing | 11 | createBgpGroup, createBgpPeer, addBgpNetwork | references/bgp.md | | Network ACL | 9 | createNetworkAcl, associateNetworkAcl | references/network-acl.md | | Flow Log | 8 | createFlowLog, activeFlowLog | references/flow-log.md | | Traffic Mirror | 14 | createTrafficMirrorSession, createTrafficMirrorFilter | references/traffic-mirror.md | | IPv6 & HAVIP | 47 | createIpv6Gateway, createHaVip, allocateIpv6Address | references/ipv6.md | | Tag, Region & Zone | 9 | tagResources, describeRegions, describeZones | references/tag-resource.md |
All VPC APIs require regionId to specify the target region:
import * as models from '@alicloud/vpc20160428/dist/models';
const { body } = await client.describeVpcs(new models.DescribeVpcsRequest({
regionId: 'cn-hangzhou',
pageSize: 50,
pageNumber: 1,
}));
Most create operations are asynchronous. Poll status after creation:
// Create VPC
const { body } = await client.createVpc(new models.CreateVpcRequest({
regionId: 'cn-hangzhou',
cidrBlock: '10.0.0.0/8',
vpcName: 'my-vpc',
}));
// Poll until Available
let status = '';
while (status !== 'Available') {
const { body: desc } = await client.describeVpcs(new models.DescribeVpcsRequest({
regionId: 'cn-hangzhou', vpcId: body.vpcId,
}));
status = desc.vpcs?.vpc?.[0]?.status || '';
if (status !== 'Available') await new Promise(r => setTimeout(r, 2000));
}
Most Describe APIs use pageNumber + pageSize:
let pageNumber = 1;
let all: any[] = [];
while (true) {
const { body } = await client.describeVpcs(new models.DescribeVpcsRequest({
regionId: 'cn-hangzhou', pageSize: 50, pageNumber,
}));
all.push(...(body.vpcs?.vpc || []));
if (all.length >= (body.totalCount || 0)) break;
pageNumber++;
}
try {
await client.createVpc(request);
} catch (err: any) {
console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}
createVpc → createVSwitch (per zone) → createNetworkAcl → associateNetworkAcl
createNatGateway → allocateEipAddress → associateEipAddress → createSnatEntry → createForwardEntry
createVpnGateway → createCustomerGateway → createVpnConnection → createVpnRouteEntry
createVpcPeerConnection → acceptVpcPeerConnection → createRouteEntry (both sides)
createPhysicalConnection → createVirtualBorderRouter → createBgpGroup → createBgpPeer → addBgpNetwork
createFlowLog → activeFlowLog → describeFlowLogs
createTrafficMirrorFilter → createTrafficMirrorFilterRules → createTrafficMirrorSession
allocateEipAddress → associateEipAddress → createCommonBandwidthPackage → addCommonBandwidthPackageIp
See references/workflows.md for detailed workflow examples with full code.
Load the corresponding reference file for parameter details:
references/vpc.mdreferences/vswitch.mdreferences/route-table.mdreferences/eip.mdreferences/nat-gateway.mdreferences/vpn.mdreferences/express-connect.mdreferences/bgp.mdreferences/network-acl.mdreferences/flow-log.mdreferences/traffic-mirror.mdreferences/ipv6.mdreferences/tag-resource.mdEach reference file contains per-API documentation with method signatures and parameter tables.
See scripts/examples.ts for ready-to-use code covering:
tools
Deploy and manage Alibaba Cloud Serverless applications using the licell CLI. Covers deploy, release, functions, env vars, domains, DNS, logs, OSS, database, cache, and Supabase.
development
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.
tools
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.
tools
# Alibaba Cloud OSS (Object Storage Service) Manage Alibaba Cloud OSS using the @alicloud/oss20190517 TypeScript SDK. Use when working with object storage buckets, objects, multipart uploads, bucket configurations (lifecycle, versioning, CORS, encryption, replication, WORM), live streaming channels, and static website hosting. Covers all 90 APIs of the OSS 2019-05-17 version. ## General Instructions - **SDK Package**: `@alicloud/oss20190517` (with `@alicloud/openapi-client`, `@alicloud/gatewa