AI Agent Hub
Back to skills
Tencent Agent Storage icon

Tencent Agent Storage

Office Efficiency Updated 2026.08.30

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

Please follow the installation guide at https://skillhub.cn/install/skillhub.md to install @tencent-adm/tencent-agent-storage.

About this skill

The Problem It Solves

In many automated or cross-device workflows, a common pain point is securely delivering files generated by an Agent—such as reports, charts, or processed images—to a user on their phone, tablet, or another computer. Sharing file paths is ineffective in cloud environments, while manual transfers break the flow. This skill is designed to solve the problem of secure file delivery and cross-device access.

How It Works: Core Capabilities & Key Steps

This skill takes local files or folders as input, interacts with Tencent Cloud Object Storage via a script to perform the upload, and always returns a time-limited, signed download direct link.

Core capabilities include:
- File Upload: Supports uploading single files (upload) or entire folders recursively (uploadDir), preserving the original directory structure.
- File Management: Provides commands for listing (list), searching (search), creating directories (mkdir), and renaming/moving (rename) to manage files in the cloud.
- Secure Link Generation: The info command regenerates access links for existing files. All download links are temporary COS-signed direct links with a default validity of 2 hours, requiring no extra permission configuration.

A critical part of the workflow is handling upload conflicts. The default strategy is rename (automatically renaming files, e.g., file(1).pdf) to guarantee successful uploads. The overwrite strategy is used only when the user explicitly requests it (e.g., saying "overwrite"). The ask strategy is used only when the user asks for confirmation first.

Constraints & Important Notes

When using this skill, be aware of the following technical constraints and best practices:
- Credentials & Permissions: Execution requires a configured space_admin level access token. The script reads it from smh_-prefixed environment variables in specific paths (e.g., ~/.tencentAgentStorage/.env). Never hardcode or expose credentials.
- Link Specification: Links shown to users must be the complete downloadUrl returned by the script. These are signed URLs with domain *.tencentsmhuc.cn and signature parameters. Never use intermediate links containing access_token, and never truncate link content.
- File Size & Upload: There is no file size limit. Files over 50MB use multipart chunked upload to avoid memory issues, but the upload process is sequential.
- Search Capabilities: File search (search) only matches by filename, not by file content.
- Error Handling: All commands return JSON. When an upload fails, the Agent must clearly inform the user of the error and offer a retry option. Never provide a download link upon failure.

Use Cases

  • After an Agent processes data and generates a PDF chart, it uploads the file to the cloud and immediately returns a shareable link for the user to view on their phone.
  • A user requests to list all files in their cloud drive's 'reports' directory and search for files with the keyword 'annual summary' to verify the existence of a specific document.
  • A developer needs to back up an entire project directory containing logs and config folders, preserving the directory structure, to a cloud drive.
  • A user explicitly requests to overwrite an old design file already present in their cloud drive and generate a new download link for team members to access the update.

Best For

  • A data analyst who needs to instantly sync locally processed reports and charts to the cloud and share links with colleagues for review.
  • A technical operations staff or project lead responsible for managing the team's cloud drive, regularly cleaning, searching, and renaming numerous project files.
  • A remote worker who frequently switches between mobile and desktop devices and wants to access their files from the cloud anytime.
  • An AI Agent developer building intelligent workflows who needs to automatically deliver task outputs (like generated documents or processed images) to end-users.