agentsclimarketplace

Alicloud cdn

Skill ComeOnOliver/skillshub/skills/agents-infrastructure/alicloud-agent-skills/alicloud-cdn

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill alicloud-cdn

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

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.

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.3 KB, as published. Nobody here has run it

Alibaba Cloud CDN Skill

Manage CDN content delivery network via the @alicloud/cdn20180510 TypeScript SDK.

Prerequisites

npm install @alicloud/cdn20180510 @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, domain types, source types, function configurations, and time formats.

Client Initialization

import Client from '@alicloud/cdn20180510';
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: 'cdn.aliyuncs.com',
}));

CDN is a global service β€” use the single endpoint cdn.aliyuncs.com for all operations.

API Overview (168 APIs in 11 Domains)

DomainAPIsKey OperationsReference
Domain Management31addCdnDomain, describeUserDomains, deleteCdnDomainreferences/domain.md
Domain Configuration20batchSetCdnDomainConfig, setCdnDomainStagingConfigreferences/domain-config.md
SSL Certificate9setCdnDomainSSLCertificate, describeCdnCertificateListreferences/certificate.md
Cache Refresh & Prefetch7refreshObjectCaches, pushObjectCache, describeRefreshTasksreferences/cache-refresh.md
Monitoring & Statistics44describeDomainRealTimeQpsData, describeDomainBpsDatareferences/monitoring.md
Log Management15describeCdnDomainLogs, createRealTimeLogDeliveryreferences/log.md
Usage & Billing15describeDomainUsageData, describeCdnUserBillHistoryreferences/usage.md
IP & Network Tools10describeIpInfo, setCdnFullDomainsBlockIPreferences/ip-tool.md
Function Compute Trigger5addFCTrigger, updateFCTrigger, describeFCTriggerreferences/fc-trigger.md
Deliver & Report Tasks8createCdnDeliverTask, describeCdnReportreferences/deliver-task.md
Tag & Resource4tagResources, untagResources, listTagResourcesreferences/tag-resource.md

Core Patterns

RPC-Style (Global Service)

CDN APIs do not require regionId. Parameters are flat fields in a Request object:

import * as models from '@alicloud/cdn20180510/dist/models';

const { body } = await client.describeUserDomains(new models.DescribeUserDomainsRequest({
  pageSize: 50,
  pageNumber: 1,
}));

Domain Configuration via JSON Functions

Use batchSetCdnDomainConfig with a JSON functions array to configure domain features:

await client.batchSetCdnDomainConfig(new models.BatchSetCdnDomainConfigRequest({
  domainNames: 'cdn.example.com',
  functions: JSON.stringify([
    {
      functionName: 'filetype_based_ttl_set',
      functionArgs: [
        { argName: 'ttl', argValue: '2592000' },
        { argName: 'file_type', argValue: 'jpg,png,gif,css,js' },
        { argName: 'weight', argValue: '1' },
      ],
    },
  ]),
}));

Page-Based Pagination

let pageNumber = 1;
let all: any[] = [];
while (true) {
  const { body } = await client.describeUserDomains(new models.DescribeUserDomainsRequest({
    pageSize: 50, pageNumber,
  }));
  all.push(...(body.domains?.pageData || []));
  if (all.length >= (body.totalCount || 0)) break;
  pageNumber++;
}

Time Range for Monitoring

Most monitoring APIs accept ISO 8601 time ranges:

const { body } = await client.describeDomainRealTimeQpsData(
  new models.DescribeDomainRealTimeQpsDataRequest({
    domainName: 'cdn.example.com',
    startTime: '2026-02-15T00:00:00Z',
    endTime: '2026-02-16T00:00:00Z',
  })
);

Error Handling

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

Common Workflows

1. Add and Configure CDN Domain

addCdnDomain β†’ verifyDomainOwner β†’ setCdnDomainSSLCertificate β†’ batchSetCdnDomainConfig

2. SSL Certificate Management

describeCdnCertificateList β†’ setCdnDomainSSLCertificate β†’ describeCdnDomainCertificateInfo

3. Cache Refresh & Prefetch

refreshObjectCaches (URL/Dir) β†’ pushObjectCache β†’ describeRefreshTasks β†’ describeRefreshQuota

4. Real-Time Monitoring

describeDomainRealTimeQpsData β†’ describeDomainRealTimeBpsData β†’ describeDomainRealTimeHttpCodeData

5. Traffic Analysis

describeDomainTopUrlVisit β†’ describeDomainTopClientIpVisit β†’ describeDomainISPData β†’ describeDomainRegionData

6. Log Management

describeCdnDomainLogs β†’ createRealTimeLogDelivery β†’ describeRealtimeDeliveryAcc

7. Usage & Billing

describeCdnUserBillType β†’ describeDomainUsageData β†’ createUsageDetailDataExportTask

8. IP Verification & Blocking

describeIpInfo β†’ setCdnFullDomainsBlockIP β†’ describeCdnFullDomainsBlockIPHistory

See references/workflows.md for detailed workflow examples with full code.

API Reference Quick Index

Load the corresponding reference file for parameter details:

  • Domain CRUD/batch/verification/ownership: references/domain.md
  • Function configs/staging/gray deployment: references/domain-config.md
  • SSL/TLS certificate binding: references/certificate.md
  • URL/directory refresh and prefetch: references/cache-refresh.md
  • Real-time QPS/BPS/hit rate/HTTP codes/traffic: references/monitoring.md
  • Access logs/real-time log delivery: references/log.md
  • Usage data/billing/quota/export: references/usage.md
  • IP check/VIP query/IP blocking: references/ip-tool.md
  • Edge function triggers: references/fc-trigger.md
  • Scheduled delivery/report tasks: references/deliver-task.md
  • Resource tagging: references/tag-resource.md

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

Code Examples

See scripts/examples.ts for ready-to-use code covering:

  • Domain listing, adding, and deletion
  • Domain configuration (HTTPS force, cache TTL)
  • SSL certificate binding
  • Cache refresh (URL/directory) and prefetch
  • Real-time QPS and bandwidth monitoring
  • Top URL analysis
  • Log download
  • IP verification
  • Usage data queries
  • Resource tagging

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.