.claude/skills/alicloud-cr/SKILL.md
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.
npx skillsauth add agents-infrastructure/licell alicloud-crInstall 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 Alibaba Cloud Container Registry Enterprise Edition instances, namespaces, repositories, images, builds, sync, security scanning, delivery chains, and Helm charts via the @alicloud/cr20181201 TypeScript SDK.
Install the SDK and configure credentials before calling any API:
npm install @alicloud/cr20181201 @alicloud/openapi-core @darabonba/typescript
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 for a reusable client factory, and references/quickstart.md for full setup details including regions, error handling, and pagination.
import Client from '@alicloud/cr20181201';
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: 'cr.cn-hangzhou.aliyuncs.com',
}));
| Domain | APIs | Key Operations | Reference | |--------|------|----------------|-----------| | Instance | 16 | listInstance, getInstance, getInstanceUsage, getAuthorizationToken | references/instance.md | | Namespace | 5 | createNamespace, listNamespace, deleteNamespace | references/namespace.md | | Repository | 12 | createRepository, listRepository, getRepository, createRepoTrigger | references/repository.md | | Image Tag | 4 | createRepoTag, listRepoTag, deleteRepoTag | references/image-tag.md | | Build | 11 | createRepoBuildRule, listRepoBuildRecord, getRepoBuildRecordStatus | references/build.md | | Sync | 8 | createRepoSyncRule, createRepoSyncTask, listRepoSyncTask | references/sync.md | | Security | 11 | createRepoTagScanTask, listRepoTagScanResult, createScanRule | references/security.md | | Artifact | 19 | createArtifactBuildRule, createArtifactLifecycleRule, createArtifactSubscriptionRule | references/artifact.md | | Delivery Chain | 6 | createChain, listChain, listChainInstance | references/chain.md | | Helm Chart | 12 | createChartNamespace, createChartRepository, listChartRelease | references/chart.md | | Event Center | 4 | updateEventCenterRule, listEventCenterRecord | references/event.md | | Tag & Resource | 7 | tagResources, listTagResources, createStorageDomainRoutingRule | references/tag-resource.md |
instanceIdGet it first via listInstance:
const { body } = await client.listInstance({ pageNo: 1, pageSize: 30 });
const instanceId = body.instances?.[0]?.instanceId;
List APIs use pageNo + pageSize. Loop until results are fewer than pageSize:
let page = 1, all: any[] = [];
while (true) {
const { body } = await client.listRepository({ instanceId, pageNo: page, pageSize: 30 });
all.push(...(body.repositories || []));
if (!body.repositories || body.repositories.length < 30) break;
page++;
}
try {
await client.someApi(request);
} catch (err: any) {
console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}
listInstance → createNamespace → createRepository
createRepoSyncRule → createRepoSyncTask → getRepoSyncTask (poll)
createRepoTagScanTask → getRepoTagScanStatus (poll) → listRepoTagScanResult
createRepoSourceCodeRepo → createRepoBuildRule → (push triggers build)
createArtifactLifecycleRule → listArtifactLifecycleRule
See references/workflows.md for detailed workflow examples with full code.
When you need parameter details for a specific API, load the corresponding reference file:
references/instance.mdreferences/namespace.mdreferences/repository.mdreferences/image-tag.mdreferences/build.mdreferences/sync.mdreferences/security.mdreferences/artifact.mdreferences/chain.mdreferences/chart.mdreferences/event.mdreferences/tag-resource.mdEach reference file contains per-API documentation with parameter tables (name, type, required, description, example).
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.