AI Agent Hub
Back to skills
Tencent Cloud COS Workflow icon

Tencent Cloud COS Workflow

IT Ops & Security Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Follow https://skillhub.cn/install/skillhub.md to install @user_9aa92135/tx-cos.

About this skill

What Problem It Solves

In real operations, an agent or script often needs to work directly with Tencent Cloud COS. The concrete tasks are narrow but annoying: upload local files or directories, generate temporary links for artifacts, browse a prefix and perform copy, move, rename, or cleanup operations, upload videos, models, or backups with slicing and concurrency, and diagnose config failures involving credentials, region, bucket, or custom domains. This skill packages those frequent object-storage actions into reusable workflows instead of asking the model to invent SDK calls each time.

How It Works

Execution leans on existing scripts in scripts/. The normal flow first runs scripts/check_config.js to verify required configuration; if essential values are missing, it reports the missing items instead of proceeding with upload or deletion. For specific tasks, the skill selects scripts such as scripts/upload_file.js for single files, scripts/upload_batch.js for directories, and scripts/upload_large_file.js for large-file multipart uploads. scripts/generate_signed_url.js creates temporary signed URLs, scripts/list_objects.js returns a grouped view of objects and folders under a prefix, scripts/manage_objects.js handles deletion, copy, move, rename, and folder creation, while scripts/get_folder_stats.js reports object count, total size, and type distribution. The output is human-oriented: success state, object key, URL, ETag, size, count, and actionable repair hints, rather than raw SDK dumps.

Boundaries

The skill assumes an environment with valid Tencent Cloud COS access. COS “directories” are usually simulated with Prefix and a / delimiter. Deletion, batch deletion, and recursive deletion require explicit scope confirmation; move or rename is often implemented as copy followed by delete, and cross-bucket operations require target permission checks. Signed URLs are time-limited, and public sharing needs separate confirmation. When the user’s intent is vague, such as “delete the old files,” clarify scope before acting instead of assuming bucket, region, or object path.

Use Cases

  • Before a site release, batch-upload a dist directory to a configured Tencent Cloud COS prefix.
  • Generate an expiring download link for a backup package and share it with a teammate.
  • Diagnose upload failures by checking credentials, region, and bucket configuration alignment.
  • Before deleting stale objects under a prefix, list files and count them first.

Best For

  • Frontend engineers running release pipelines who need reliable upload of build artifacts to Tencent Cloud COS.
  • Backend engineers maintaining backup jobs who need signed URLs and region-credential checks.
  • ML engineers handling models or videos who need multipart large-file uploads with retry.
  • SREs performing storage audits who need prefix listing, size stats, and cautious cleanup.