.claude/skills/alicloud-api-ref/SKILL.md
Alibaba Cloud API reference for developing aero-cli. Use this skill when adding new cloud provider features, fixing API calls, or extending FC/RDS/Redis/OSS/DNS/VPC integrations. Contains SDK usage patterns, API signatures, and error handling conventions specific to this project.
npx skillsauth add agents-infrastructure/licell aliyun-api-refInstall 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.
Use this skill when:
src/providers/src/providers/ # Cloud service provider modules
fc.ts # Function Compute 3.0 (deploy, invoke, versions, aliases)
infra.ts # RDS Serverless (database provisioning)
redis.ts # Tair/Redis Serverless KV (cache provisioning)
oss.ts # Object Storage Service (static site deploy)
domain.ts # DNS + FC custom domain binding
ssl.ts # Let's Encrypt ACME + FC HTTPS binding
vpc.ts # VPC / VSwitch / SecurityGroup management
logs.ts # SLS log streaming
src/utils/
sdk.ts # Shared SDK constructor resolver + FC client factory
retry.ts # Exponential backoff retry wrapper
config.ts # Auth (AK/SK) and project config management
errors.ts # Error classification (conflict, not-found, etc.)
All Alibaba Cloud SDKs are loaded via resolveSdkCtor() to handle ESM/CJS interop:
import Vpc, * as $Vpc from '@alicloud/vpc20160428';
import { resolveSdkCtor } from '../utils/sdk';
const VpcClientCtor = resolveSdkCtor<Vpc>(Vpc, '@alicloud/vpc20160428');
Each provider creates its client with @alicloud/openapi-client Config:
import * as $OpenApi from '@alicloud/openapi-client';
const client = new VpcClientCtor(new $OpenApi.Config({
accessKeyId: auth.ak,
accessKeySecret: auth.sk,
regionId,
endpoint: `vpc.${regionId}.aliyuncs.com`
}));
FC client creation is centralized in utils/sdk.ts:
import { createSharedFcClient } from '../utils/sdk';
const { auth, client } = createSharedFcClient();
// or with explicit auth:
const { client } = createSharedFcClient(authConfig);
Credentials are stored in ~/.ali-cli/auth.json (mode 0o600):
interface AuthConfig {
accountId: string; // Alibaba Cloud main account ID
ak: string; // AccessKey ID
sk: string; // AccessKey Secret
region: string; // Default region (e.g. cn-hangzhou)
}
Access via Config.requireAuth() or Config.getAuth().
utils/errors.ts)// Check if error is a "resource already exists" conflict
isConflictError(err) // matches: AlreadyExists, Conflict, Duplicate, Exist
// Format error message for display
formatErrorMessage(err) // extracts .message from unknown error
utils/retry.ts)import { withRetry } from '../utils/retry';
const result = await withRetry(
() => client.someApiCall(request),
{ maxAttempts: 3, baseDelayMs: 1000 }
);
Retries on: Throttling, timeout, ECONNRESET, service unavailable.
When intentionally ignoring errors, always add a comment explaining why:
} catch { /* role check may fail due to permissions, proceed to create attempt */ }
Use bounded for loops with MAX_PAGES guard, never while(true):
const MAX_PAGES = 50;
for (let page = 0; page < MAX_PAGES; page += 1) {
const response = await client.listSomething(new ListRequest({
limit: 100,
nextToken
}));
const rows = response.body?.items || [];
results.push(...rows);
nextToken = response.body?.nextToken;
if (!nextToken || rows.length === 0) break;
}
Detailed API tables are in references/:
references/ref_fc_apis.md — Function Compute 3.0 (86 APIs, version 2023-03-30)references/ref_rds_apis.md — RDS instance/database/account managementreferences/ref_redis_apis.md — Redis/Tair instance management (146 APIs, version 2015-01-01)references/ref_oss_apis.md — Object Storage bucket/object operationsreferences/ref_dns_apis.md — Cloud DNS domain/record management (235 APIs, version 2015-01-09)| Provider | Primary APIs | SDK Package |
|----------|-------------|-------------|
| FC | CreateFunction, UpdateFunction, InvokeFunction, PublishFunctionVersion, UpdateAlias, CreateCustomDomain | @alicloud/fc20230330 |
| RDS | CreateDBInstance, DescribeDBInstances, CreateAccount, CreateDatabase, DescribeAvailableZones | @alicloud/rds20140815 |
| Redis | CreateTairInstance, DescribeInstances, CreateAccount, ResetAccountPassword | @alicloud/r-kvstore20150101 |
| OSS | putBucket, put (object), list, getBucketInfo | ali-oss |
| DNS | AddDomainRecord, UpdateDomainRecord, DeleteDomainRecord, DescribeSubDomainRecords | @alicloud/alidns20150109 |
| VPC | DescribeVpcs, CreateVSwitch, DescribeVSwitches | @alicloud/vpc20160428 |
| ECS | CreateSecurityGroup, AuthorizeSecurityGroup | @alicloud/ecs20140526 |
| SLS | GetLogs | @alicloud/sls20201230 |
When adding a new provider or extending an existing one:
resolveSdkCtor() for SDK constructor resolutionendpoint, connectTimeout, readTimeoutwithRetry() for API calls that may face transient failureswhile(true))isConflictError() where applicableproject.envsmaskConnectionString()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 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.
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.