AI Agent Hub
Back to skills
Tencent Cloud Advisor Cleanup icon

Tencent Cloud Advisor Cleanup

IT Ops & Security Updated 2026.08.30

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

Follow https://skillhub.cn/install/skillhub.md to install @tencent-adm/tsa into your AI assistant.

About this skill

What It Solves

tsa targets environments that have used Tencent CloudQ / Cloud Advisor, handling common leftovers: the local ~/.tencent-cloudq/ config, the temporary cache {system temp directory}/.tcloud_advisor_uin_cache, and TENCENTCLOUD_* environment variables. This is useful when engineers are decommissioning a machine, rotating credentials, or removing related CLI state, where manually deleting variables can miss entries.

How It Works

The script processes cleanup by scope:
- Removes the config directory ~/.tencent-cloudq/, including config.json
- Cleans the temporary cache {system temp directory}/.tcloud_advisor_uin_cache
- Detects set TENCENTCLOUD_* variables such as SECRET_ID, SECRET_KEY, TOKEN, ROLE_ARN, ROLE_NAME, ROLE_SESSION, and STS_DURATION, then generates platform-specific source or PowerShell cleanup commands
- In --cloud mode, uses AK/SK to delete the cloud CAM role advisor

Boundaries

The default scope is local environment cleanup. --cloud requires cloud permissions and should only be run with credentials scoped to the expected account. Before executing generated cleanup commands, confirm that the variables are not reused by other services.

Use Cases

  • Remove CloudQ local config, temp cache, and leftover key variables when offboarding or switching machines.
  • Clean stale TENCENTCLOUD_SECRET_ID and related env vars after credential rotation.
  • Generate shell or PowerShell cleanup commands before removing advisor-related tooling.
  • Delete unused CAM role advisor in a test account using --cloud mode.

Best For

  • Ops engineers cleaning test machines: remove CloudQ config, cache, and key env vars.
  • Security engineers rotating credentials: delete stale TENCENTCLOUD_* variables to avoid reuse.
  • Cloud admins reducing advisor permissions: remove CAM role advisor when no longer needed.