home / skills / partme-ai / full-stack-skills / cloud-tencent-cos

cloud-tencent-cos skill

/skills/cloud-tencent-cos

This skill provides comprehensive guidance on Tencent Cloud COS, including bucket creation, access control, and storage management for efficient file handling.

npx playbooks add skill partme-ai/full-stack-skills --skill cloud-tencent-cos

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
688 B
---
name: cloud-tencent-cos
description: Provides comprehensive guidance for Tencent Cloud COS including bucket creation, object storage, access control, and COS management. Use when the user asks about Tencent Cloud COS, needs to store files in COS, configure COS buckets, or work with Tencent Cloud storage.
license: Complete terms in LICENSE.txt
---

## When to use this skill

Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]

## How to use this skill

[待完善:根据具体工具添加使用指南]

## Best Practices

[待完善:根据具体工具添加最佳实践]

## Keywords

[待完善:根据具体工具添加关键词]

Overview

This skill provides practical, hands-on guidance for using Tencent Cloud COS (Cloud Object Storage). It covers creating and configuring buckets, uploading and managing objects, setting access controls, and common operational tasks. The content focuses on concrete steps, configuration tips, and code snippets in Python to get work done quickly.

How this skill works

The skill inspects user needs and provides targeted guidance: bucket creation, lifecycle rules, object upload/download, permissions (ACLs and COS policies), CORS, and multipart uploads. It explains relevant console and SDK commands, typical CLI/SDK code patterns, and recommended configuration settings for security and cost control. Examples include Python code using the COS SDK and common troubleshooting steps.

When to use it

  • You need to create or configure a new COS bucket for application storage.
  • You want to upload, download, or manage files programmatically with the COS SDK (Python).
  • You must set up access control, presigned URLs, or bucket policies for sharing resources.
  • You need to implement lifecycle rules, versioning, or cost-saving storage classes.
  • You are troubleshooting upload failures, permissions issues, or CORS problems.

Best practices

  • Use least-privilege IAM policies and avoid public-read buckets unless required.
  • Enable lifecycle rules and storage class transitions to control costs over time.
  • Use multipart uploads for large files and presigned URLs for client-side uploads.
  • Enable server-side encryption for sensitive data and monitor access with logging.
  • Test CORS and bucket policies in a staging environment before production rollout.

Example use cases

  • Store and serve static website assets from a COS bucket with proper CORS and cache headers.
  • Backup application data to COS with lifecycle rules to transition older backups to cheaper storage classes.
  • Generate presigned upload URLs so mobile clients can upload photos directly to COS.
  • Configure bucket policies and temporary credentials to limit access for third-party services.
  • Implement resumable multipart uploads in Python for reliable large-file transfers.

FAQ

How do I grant temporary upload access to clients?

Generate presigned URLs or use temporary credentials (STS) with narrowly scoped permissions so clients can upload without exposing long-term keys.

When should I use lifecycle rules?

Use lifecycle rules to automatically transition objects to cheaper storage classes or delete old objects to reduce storage costs and simplify retention management.