AI Agent Hub
Back to skills
Tencent Cloud Object Storage and CI Management icon

Tencent Cloud Object Storage and CI Management

Development Updated 2026.08.30

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

Please follow the guide at https://skillhub.cn/install/skillhub.md to install @tencent-adm/tencentcloud-cos.

About this skill

Challenges in Managing Tencent Cloud Storage and Processing Services

When developers use Tencent Cloud Object Storage (COS) and Cloud Infinite (CI), they often face fragmented management across multiple services. COS provides basic storage, but integrating CI capabilities like image processing, content recognition, and media transcoding requires separate API calls, authentication configurations, and attention to service activation status. Additionally, strict security policies (e.g., deletion restrictions) and regional constraints (e.g., MetaInsight supporting only specific regions) add operational complexity. Traditional approaches involve writing repetitive code to consolidate these services, with risks of overlooking CI enablement.

How the Skill Works and Core Capabilities

This skill addresses these issues through a unified Node.js SDK script. It encapsulates major COS and CI APIs, offering three script entry points:

  • scripts/cos_node.mjs: Handles storage operations (e.g., upload, download) and write actions (e.g., create-ci-bucket).
  • scripts/ci_api.mjs: Focuses on read-only retrieval, such as dataset filtering (simple-query) and semantic search (hybrid-search).
  • scripts/preview_gen.mjs: Generates interactive HTML previews for search results.

Core capabilities include:
- File and Bucket Management: Supports uploading, downloading, listing files, and creating/configuring storage buckets (via actions like list-buckets, head-bucket).
- CI Service Integration: Automatically checks service status (e.g., describe-ci-bucket-status) and guides users to confirm and execute activation (e.g., create-doc-process-bucket for document processing) if disabled.
- Mode Control: Switches between public and strict modes via the KIKI environment variable. In strict mode, all deletion operations (e.g., delete, delete-multiple) are hidden and rejected, preventing bypass through other entry points.
- Dataset and Smart Retrieval: Supports creating and managing MetaInsight datasets (with region specification like ap-beijing) and offers incremental/batch indexing options. Retrieval uses find-datasets-by-bucket to confirm bindings.

Key Steps and Execution Mechanism

On first use, the skill performs an automated setup: running setup.sh --check-only to check mode, guiding users to configure credentials in public mode (supporting STS temporary credentials or permanent keys), and optionally persisting them to a .env file (with permissions 600). Credentials prioritize runtime TENCENTCLOUD_* environment variables.

Operations follow this logic:

  1. Pre-check Service Status: Before calling CI functions, use get-bucket-ci-status to query the main switch and sub-services (e.g., documentProcessing), avoiding errors from unenabled services.
  2. Request-layer Interception: Double-reject DELETE requests in cosRequest and cosRequestPromise to ensure strict mode security.
  3. Knowledge Base Quick Workflow: Automates actions like create-knowledge-base based on user intents (e.g.,

Use Cases

  • When needing to quickly check if images uploaded to COS contain violating content, use content recognition actions to automatically execute identification and judgment.
  • When a batch of product images needs uniform resizing and watermarking for use on a product display page, use CI image processing to complete the batch operation.
  • When an analyst needs to analyze the distribution of files in a bucket by type and size to assess storage costs and optimization strategies, use metadata aggregation.
  • When a user describes 'find all documents related to product manuals', use the knowledge base or document retrieval functionality for semantic search.

Best For

  • A DevOps engineer who needs to manage shared file storage spaces for a team, configuring fine-grained access policies and lifecycle rules.
  • A video editor handling user-generated content (UGC), needing to batch transcode videos, extract cover frames, and generate previews.
  • A data engineer responsible for maintaining a data catalog, requiring automatic indexing of newly uploaded images and extraction of structured information like labels and OCR text.
  • An operations specialist who needs to consolidate documents from multiple sources (e.g., PDF, Word) into a searchable knowledge base and support internal search queries.