.claude/skills/alicloud-alidns/SKILL.md
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.
npx skillsauth add agents-infrastructure/licell alicloud-alidnsInstall 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 DNS domains, records, traffic management, and resolution services via the @alicloud/alidns20150109 TypeScript SDK.
npm install @alicloud/alidns20150109 @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, record types, line values, and TTL.
import Client from '@alicloud/alidns20150109';
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: 'alidns.cn-hangzhou.aliyuncs.com',
}));
| Domain | APIs | Key Operations | Reference | |--------|------|----------------|-----------| | Domain Management | 39 | addDomain, describeDomains, describeDomainInfo, operateBatchDomain | references/domain.md | | DNS Records | 14 | addDomainRecord, updateDomainRecord, describeDomainRecords | references/record.md | | DNSSLB | 3 | setDNSSLBStatus, updateDNSSLBWeight | references/dnsslb.md | | Custom Lines | 6 | addCustomLine, describeSupportLines | references/custom-line.md | | Cloud GTM | 50 | createCloudGtmAddress, listCloudGtmInstances | references/cloud-gtm.md | | DNS GTM | 28 | addDnsGtmAccessStrategy, describeDnsGtmInstances | references/dns-gtm.md | | GTM Classic | 35 | addGtmAccessStrategy, describeGtmInstances | references/gtm-classic.md | | Recursion DNS | 18 | addRecursionRecord, listRecursionZones | references/recursion.md | | DNS Cache | 5 | addDnsCacheDomain, describeDnsCacheDomains | references/dns-cache.md | | Public DNS | 18 | createPdnsAppKey, describePdnsThreatStatistics | references/pdns.md | | DoH | 6 | describeDohAccountStatistics, describeDohDomainStatistics | references/doh.md | | ISP Cache Flush | 6 | submitIspFlushCacheTask, describeIspFlushCacheTasks | references/isp-flush.md | | Tag & Resource | 6 | tagResources, untagResources, describeTags | references/tag-resource.md |
Unlike ECS/FC, Alidns is a global service. Most APIs do not require regionId:
import * as models from '@alicloud/alidns20150109/dist/models';
// No regionId needed
const { body } = await client.describeDomains(new models.DescribeDomainsRequest({
pageSize: 100,
pageNumber: 1,
}));
DNS records are identified by recordId (returned on creation):
// Add record
const { body } = await client.addDomainRecord(new models.AddDomainRecordRequest({
domainName: 'example.com',
RR: 'www', // Subdomain prefix (@ for root)
type: 'A', // A, AAAA, CNAME, MX, TXT, NS, SRV, CAA
value: '1.2.3.4', // Record value
TTL: 600, // Time to live in seconds
line: 'default', // Resolution line
}));
const recordId = body.recordId;
// Update record
await client.updateDomainRecord(new models.UpdateDomainRecordRequest({
recordId, RR: 'www', type: 'A', value: '5.6.7.8', TTL: 300,
}));
// Delete record
await client.deleteDomainRecord(new models.DeleteDomainRecordRequest({ recordId }));
Most Describe APIs use pageNumber + pageSize:
let pageNumber = 1;
let all: any[] = [];
while (true) {
const { body } = await client.describeDomainRecords(new models.DescribeDomainRecordsRequest({
domainName: 'example.com', pageSize: 500, pageNumber,
}));
all.push(...(body.domainRecords?.record || []));
if (all.length >= (body.totalCount || 0)) break;
pageNumber++;
}
try {
await client.addDomainRecord(request);
} catch (err: any) {
console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}
addDomain → addDomainRecord (A/CNAME/MX) → describeDomainRecords
describeDomainRecords → updateDomainRecord → setDomainRecordStatus → deleteDomainRecord
addDomainRecord (multiple A) → setDNSSLBStatus → updateDNSSLBWeight → describeDNSSLBSubDomains
addDomainGroup → changeDomainGroup → describeDomainGroups
setDomainDnssecStatus → describeDomainDnssecInfo → add DS at registrar
addCustomLine → addDomainRecord (with line) → describeCustomLines
operateBatchDomain → describeBatchResultCount → describeBatchResultDetail
describeDomainStatistics → describeRecordStatistics → describeDomainLogs
describeIspFlushCacheRemainQuota → submitIspFlushCacheTask → describeIspFlushCacheTasks
See references/workflows.md for detailed workflow examples with full code.
Load the corresponding reference file for parameter details:
references/domain.mdreferences/record.mdreferences/dnsslb.mdreferences/custom-line.mdreferences/cloud-gtm.mdreferences/dns-gtm.mdreferences/gtm-classic.mdreferences/recursion.mdreferences/dns-cache.mdreferences/pdns.mdreferences/doh.mdreferences/isp-flush.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 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.