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.

25 stars

Best use case

Alibaba Cloud OSS (Object Storage Service) is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using Alibaba Cloud OSS (Object Storage Service) should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/alicloud-oss/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/agents-infrastructure/alicloud-agent-skills/alicloud-oss/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/alicloud-oss/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Alibaba Cloud OSS (Object Storage Service) Compares

Feature / AgentAlibaba Cloud OSS (Object Storage Service)Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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/gateway-oss`, `@alicloud/gateway-spi`, `@alicloud/tea-util`, `@alicloud/openapi-util`, `@alicloud/tea-typescript`)
- **Authentication**: Use environment variables `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET`
- **Client Init**: Create client with `regionId` — endpoint is auto-resolved to `oss-{regionId}.aliyuncs.com`
- **API Style**: RESTful — `bucket` and `key` are function arguments, not in Request objects
- **Models**: All models (Request/Response) are exported from the main client module
- **Pagination**: Marker-based (`marker`/`nextMarker` or `continuationToken`/`nextContinuationToken`), not page numbers
- **Streaming**: Object upload/download uses Node.js `Readable` streams for the `body` field
- **Error Handling**: Catch errors with `error.code` (e.g., `NoSuchBucket`, `NoSuchKey`, `AccessDenied`)

## Quick Reference

Read `references/quickstart.md` for installation, authentication, endpoints, storage classes, ACL values, pagination patterns, and error codes.

## API Reference by Domain

The SDK provides 90 APIs organized into 6 functional domains:

### Bucket Management (11 APIs)
Create, list, delete, and query bucket information, ACL, location, and regions. List objects in buckets.
→ Read `references/bucket.md` for: putBucket, listBuckets, getBucketInfo, getBucketLocation, getBucketAcl, putBucketAcl, deleteBucket, describeRegions, listObjects, listObjectsV2, listObjectVersions

### Bucket Configuration (33 APIs)
Configure bucket lifecycle, versioning, CORS, logging, website hosting, referer, encryption, request payment, transfer acceleration, tags, inventory, and policy.
→ Read `references/bucket-config.md` for: getBucketLifecycle, putBucketLifecycle, deleteBucketLifecycle, getBucketVersioning, putBucketVersioning, getBucketCors, putBucketCors, deleteBucketCors, getBucketLogging, putBucketLogging, deleteBucketLogging, getBucketWebsite, putBucketWebsite, deleteBucketWebsite, getBucketReferer, putBucketReferer, getBucketEncryption, putBucketEncryption, deleteBucketEncryption, getBucketRequestPayment, putBucketRequestPayment, getBucketTransferAcceleration, putBucketTransferAcceleration, getBucketTags, putBucketTags, deleteBucketTags, getBucketInventory, listBucketInventory, putBucketInventory, deleteBucketInventory, getBucketPolicy, putBucketPolicy, deleteBucketPolicy

### Bucket Replication & WORM (10 APIs)
Cross-region and same-region data replication, replication progress monitoring, and compliance retention (WORM) policies.
→ Read `references/bucket-replication.md` for: getBucketReplication, getBucketReplicationLocation, getBucketReplicationProgress, putBucketReplication, deleteBucketReplication, initiateBucketWorm, getBucketWorm, abortBucketWorm, completeBucketWorm, extendBucketWorm

### Object Operations (20 APIs)
Upload, download, copy, delete, append, head, meta, ACL, symlink, tagging, restore, select, and CORS preflight.
→ Read `references/object.md` for: putObject, getObject, copyObject, appendObject, deleteObject, deleteMultipleObjects, headObject, getObjectMeta, postObject, restoreObject, selectObject, createSelectObjectMeta, optionObject, getObjectAcl, putObjectAcl, getSymlink, putSymlink, getObjectTagging, putObjectTagging, deleteObjectTagging

### Multipart Upload (7 APIs)
Multipart upload operations for large files (>100MB recommended, >5GB required). Minimum part size 100KB (last part exempt).
→ Read `references/multipart.md` for: initiateMultipartUpload, uploadPart, uploadPartCopy, completeMultipartUpload, abortMultipartUpload, listMultipartUploads, listParts

### Live Channel (9 APIs)
RTMP-based live streaming channel management, status monitoring, history, and VOD playlist generation.
→ Read `references/live-channel.md` for: putLiveChannel, getLiveChannelInfo, getLiveChannelStat, getLiveChannelHistory, listLiveChannel, putLiveChannelStatus, deleteLiveChannel, postVodPlaylist, getVodPlaylist

## Common Workflows

Read `references/workflows.md` for 8 step-by-step workflows:
1. Create bucket and upload object
2. Multipart upload for large files
3. Configure bucket lifecycle rules
4. Enable cross-region replication
5. Static website hosting
6. WORM compliance retention
7. Restore archive objects
8. Server-side encryption

## Key Patterns

### Client Initialization
```typescript
import Client from '@alicloud/oss20190517';
import { Config } from '@alicloud/openapi-client';

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',
}));
```

### Upload Object
```typescript
import Client, { PutObjectRequest } from '@alicloud/oss20190517';
import { Readable } from 'stream';

await client.putObject('my-bucket', 'path/to/file.txt', new PutObjectRequest({
  body: Readable.from(Buffer.from('content')),
  contentType: 'text/plain',
}));
```

### Download Object
```typescript
import Client, { GetObjectRequest } from '@alicloud/oss20190517';

const { body } = await client.getObject('my-bucket', 'path/to/file.txt', new GetObjectRequest({}));
const chunks: Buffer[] = [];
for await (const chunk of body.body as Readable) {
  chunks.push(Buffer.from(chunk));
}
const content = Buffer.concat(chunks);
```

### List Objects (Paginated)
```typescript
import Client, { ListObjectsV2Request } from '@alicloud/oss20190517';

let token: string | undefined;
const all: any[] = [];
do {
  const { body } = await client.listObjectsV2('my-bucket', new ListObjectsV2Request({
    maxKeys: 1000, prefix: 'data/', continuationToken: token,
  }));
  all.push(...(body.contents || []));
  token = body.isTruncated ? body.nextContinuationToken || undefined : undefined;
} while (token);
```

### Delete Multiple Objects
```typescript
import Client, { DeleteMultipleObjectsRequest, Delete, DeleteObjectsRequestObject } from '@alicloud/oss20190517';

await client.deleteMultipleObjects('my-bucket', new DeleteMultipleObjectsRequest({
  delete: new Delete({
    object: ['a.txt', 'b.txt'].map(k => new DeleteObjectsRequestObject({ key: k })),
    quiet: true,
  }),
}));
```

## Scripts

- `scripts/setup_client.ts` — Reusable client factory with region, STS, and custom endpoint support
- `scripts/examples.ts` — 18 ready-to-use functions covering bucket, object, multipart, lifecycle, CORS, tags, symlink, and restore operations

## Important Notes

- **Object key**: No leading slash. Use `path/to/file.txt`, not `/path/to/file.txt`
- **Bucket names**: Globally unique, 3-63 chars, lowercase letters/numbers/hyphens
- **Max object size**: 5 GB for single PUT, use multipart for larger files
- **Multipart minimum**: Each part ≥ 100KB (except last part), max 10,000 parts
- **Archive restore**: Takes 1 minute (Archive) to hours (Deep Cold Archive)
- **WORM lock**: `completeBucketWorm` is **irreversible** — data cannot be deleted until retention expires
- **Versioning**: Once enabled, can only be suspended (not disabled)
- **Replication**: Source and destination buckets must be in different regions (for CRR)

Related Skills

tracking-service-reliability

25
from ComeOnOliver/skillshub

Define and track SLAs, SLIs, and SLOs for service reliability including availability, latency, and error rates. Use when establishing reliability targets or monitoring service health. Trigger with phrases like "define SLOs", "track SLI metrics", or "calculate error budget".

configuring-service-meshes

25
from ComeOnOliver/skillshub

This skill configures service meshes like Istio and Linkerd for microservices. It generates production-ready configurations, implements best practices, and ensures a security-first approach. Use this skill when the user asks to "configure service mesh", "setup Istio", "setup Linkerd", or requests assistance with "service mesh configuration" for their microservices architecture. The configurations will be tailored to the specified infrastructure requirements.

service-account-manager

25
from ComeOnOliver/skillshub

Service Account Manager - Auto-activating skill for GCP Skills. Triggers on: service account manager, service account manager Part of the GCP Skills skill category.

optimizing-cloud-costs

25
from ComeOnOliver/skillshub

Execute use when you need to work with cloud cost optimization. This skill provides cost analysis and optimization with comprehensive guidance and automation. Trigger with phrases like "optimize costs", "analyze spending", or "reduce costs".

kubernetes-service-manager

25
from ComeOnOliver/skillshub

Kubernetes Service Manager - Auto-activating skill for DevOps Advanced. Triggers on: kubernetes service manager, kubernetes service manager Part of the DevOps Advanced skill category.

istio-service-mesh-config

25
from ComeOnOliver/skillshub

Istio Service Mesh Config - Auto-activating skill for DevOps Advanced. Triggers on: istio service mesh config, istio service mesh config Part of the DevOps Advanced skill category.

Google Cloud Agent SDK Master

25
from ComeOnOliver/skillshub

Execute automatic activation for all google cloud agent development kit (adk) Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

generating-grpc-services

25
from ComeOnOliver/skillshub

Generate gRPC service definitions, stubs, and implementations from Protocol Buffers. Use when creating high-performance gRPC services. Trigger with phrases like "generate gRPC service", "create gRPC API", or "build gRPC server".

consul-service-discovery

25
from ComeOnOliver/skillshub

Consul Service Discovery - Auto-activating skill for DevOps Advanced. Triggers on: consul service discovery, consul service discovery Part of the DevOps Advanced skill category.

cloudwatch-alarm-creator

25
from ComeOnOliver/skillshub

Cloudwatch Alarm Creator - Auto-activating skill for AWS Skills. Triggers on: cloudwatch alarm creator, cloudwatch alarm creator Part of the AWS Skills skill category.

cloudfront-distribution-setup

25
from ComeOnOliver/skillshub

Cloudfront Distribution Setup - Auto-activating skill for AWS Skills. Triggers on: cloudfront distribution setup, cloudfront distribution setup Part of the AWS Skills skill category.

cloudformation-template-creator

25
from ComeOnOliver/skillshub

Cloudformation Template Creator - Auto-activating skill for AWS Skills. Triggers on: cloudformation template creator, cloudformation template creator Part of the AWS Skills skill category.