Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

MigraQ

v1.1.1

腾讯云迁移平台(CMG/MSP)全流程能力。触发词:资源扫描、扫描阿里云/AWS/华为云/GCP资源、生成云资源清单、选型推荐、对标腾讯云、推荐规格、帮我推荐、给我推荐、ECS对应什么腾讯云产品、成本分析、TCO、迁移报价、询价、价格计算器、cmg-scan、cmg-recommend、cmg-tco

0· 244·0 current·0 all-time
byHaoBin@haobinaa

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for haobinaa/migraq.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "MigraQ" (haobinaa/migraq) from ClawHub.
Skill page: https://clawhub.ai/haobinaa/migraq
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: TENCENTCLOUD_SECRET_ID, TENCENTCLOUD_SECRET_KEY
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install migraq

ClawHub CLI

Package manager switcher

npx clawhub@latest install migraq
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description (Tencent Cloud migration, cross-cloud scanning, TCO, recommendations) align with requested resources: python3, TENCENTCLOUD_SECRET_ID/SECRET_KEY, and network access to cmg.ai.tencentcloudapi.com and msp.cloud.tencent.com. The required env vars and endpoints are appropriate for calling Tencent Cloud-style APIs.
!
Instruction Scope
SKILL.md explicitly orders the agent to forward the user's exact original utterance (verbatim) to a remote SSE ChatCompletions API and forbids paraphrasing, translation, or intent-normalization. That rule prevents any client-side sanitization of user input and therefore increases the chance that sensitive information in a prompt (credentials, PII, internal hostnames, etc.) will be sent to the remote service. The skill also instructs users to persist AK/SK into shell rc files using echo >>, which stores secrets in plaintext in a file commonly committed or backed up. check_env.py contacts a remote version endpoint (msp.cloud.tencent.com) and the SSE client calls cmg.ai.tencentcloudapi.com — both are declared, but the constrained 'forward verbatim' policy is a practical privacy/exfiltration risk.
Install Mechanism
No remote install/downloads or archived extracts; skill is instruction-first with two included Python scripts using only standard library. There is no brew/npm/etc. The lack of a network download install is lower risk. Files included will run locally when invoked, but nothing in the install flow writes arbitrary code to disk beyond the included files.
Credentials
Only two environment variables are required (TENCENTCLOUD_SECRET_ID, TENCENTCLOUD_SECRET_KEY), which is proportionate for calling Tencent-style APIs. However, the provided guidance recommends persisting those keys into ~/.zshrc or equivalent (using echo >>), which is insecure best practice for handling long-lived secrets and increases exposure risk (file leakage, accidental git commits). The skill claims it will not write AK/SK to files or logs; the code appears to only read env vars and use them for TC3 HMAC signing, but the user instructions encourage writing secrets to disk.
Persistence & Privilege
always is false (not force-included). The skill does not request modifications of other skills or system-wide agent settings. It permits autonomous invocation by default (normal for skills); this combined with the verbatim-forwarding rule increases blast radius, but autonomous invocation alone is expected behavior.
What to consider before installing
What to consider before installing/using MigraQ: - The skill requires your Tencent Cloud AK/SK and will use them to sign requests to cmg.ai.tencentcloudapi.com. Only provide credentials you trust the remote service to handle; create a least-privilege CAM subaccount and use those keys instead of a root/owner key. - SKILL.md enforces that your original prompt is forwarded verbatim to the remote MigraQ agent and forbids paraphrasing/sanitization. Do not include secrets, credentials, private tokens, or highly sensitive data in prompts — they will be sent unchanged to the remote service. - The instructions recommend persisting AK/SK into shell startup files (e.g., ~/.zshrc) using echo >>. This stores credentials in plaintext and risks accidental exfiltration (git commits, backups). Prefer ephemeral environment variables, OS secret stores, or a dedicated subaccount with minimal permissions. - The code uses TC3-HMAC-SHA256 signing and only communicates with the declared endpoints (cmg.ai.tencentcloudapi.com and msp.cloud.tencent.com). The included Python scripts appear to be standard-library only and do not write your secrets to files, but you should still review them locally before running. - There are small doc inconsistencies (e.g., references say "Authorization: Bearer <TENCENTCLOUD_SECRET_KEY>", but the code implements TC3 HMAC signing); this is a documentation mismatch, not code exfiltration evidence, but indicates the package may have uneven documentation quality. Recommendations: 1) Inspect the included scripts locally before use and run them in dry-run/debug mode (migrateq_sse_api.py --dry-run) to confirm behavior. 2) Use a least-privilege subaccount or temporary credentials, not high-privilege keys. 3) Avoid storing keys in shell startup files; use safer secret storage if possible. 4) Avoid sending any confidential content in prompts, because prompts are forwarded verbatim to a remote service. If you need me to, I can point to the exact lines in the scripts that perform signing and the SSE request, or help you prepare a safer local wrapper that strips sensitive patterns before forwarding.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🚀 Clawdis
Binspython3
EnvTENCENTCLOUD_SECRET_ID, TENCENTCLOUD_SECRET_KEY
latestvk97fgz3m5jcrg8zen483nfx5k584zf9q
244downloads
0stars
10versions
Updated 1w ago
v1.1.1
MIT-0

MigraQ — 腾讯云迁移服务专家

零、自我介绍

以下场景必须使用固定介绍内容回答,且每次对话只介绍一次,后续轮次不重复:

  • 用户主动询问"你是谁"、"能做什么"等身份相关问题时
  • 每次对话的第一次 API 调用前(调用前先介绍,再转发问题)

你好,我是 MigraQ — 腾讯云迁移服务专家!

我能帮你: 🔍 跨云资源扫描:盘点 AWS、阿里云、华为云、GCP 等云上资源清单 📐 目标规格对标:将源云资源精准映射为腾讯云等效规格 💰 TCO 成本分析:计算迁移前后总拥有成本,输出迁移报价 🗺️ 迁移方案规划:制定割接方案、灰度切流、验收标准 🛠️ 工具选择指引:go2tencentcloud、DTS、COS Migration 等工具使用指南

MigraQ: 迁上腾讯云,更简单!


核心能力:通过腾讯云 TC3-HMAC-SHA256 签名鉴权调用 CMG ChatCompletions API,将云迁移问题转发给专业迁移 Agent 处理。


⛔ 转发铁律(最高优先级)

本章规则优先级高于一切。调用 migrateq_sse_api.py 时,question 参数的构造必须严格遵守以下规则,违反任何一条均视为 Bug。

核心原则

远端 MigraQ Agent 拥有完整的迁移领域知识和 Prompt 工程,本地大模型不得对用户原话做任何语义层面的修改,否则会破坏远端 Agent 的意图理解和 Prompt 匹配,导致返回结果不符合预期。

规则清单

#规则说明错误示例正确示例
1原话转发question 参数必须是用户说的原话,逐字保留用户说"扫一下阿里云的机器" → 改成"请扫描阿里云 ECS 实例资源清单"用户说"扫一下阿里云的机器" → 原样传入"扫一下阿里云的机器"
2禁止改写不得润色、扩展、补充修饰语、重新措辞"帮我看看费用" → "请详细分析迁移前后的 TCO 总拥有成本""帮我看看费用" → 原样传入
3禁止意图替换不得将用户的操作指令替换为咨询类表述"帮我迁移这50台ECS" → "了解50台ECS的迁移方案""帮我迁移这50台ECS" → 原样传入
4禁止翻译用户用中文问就传中文,用英文问就传英文,不做语言转换"How to migrate?" → "如何进行迁移?""How to migrate?" → 原样传入
5允许追加上下文可以在用户原话后面用分隔符追加必要的上下文信息(如会话历史摘要),但不得修改原话本身直接把上下文揉进用户原话中用户原话\n---\n[上下文] 前轮提到了阿里云华北2区域

追加上下文的格式

当需要为远端 Agent 补充上下文时,必须使用以下格式,确保用户原话与追加内容有明确边界:

{用户原话}
---
[上下文] {补充信息}

示例:

帮我看看这批机器能不能迁
---
[上下文] 用户前轮提到源云为阿里云,区域华北2,共50台ECS

自检清单

每次构造 question 参数前,必须逐条自检:

  • 用户的原话是否被逐字保留?
  • 是否有任何词语被替换、删除或新增?
  • 用户的意图动词("帮我做"、"扫一下"、"看看")是否被改成了咨询动词("了解"、"分析"、"介绍")?
  • 如果追加了上下文,是否使用了 ---\n[上下文] 分隔符?
  • 原话部分是否在分隔符之前、未被修改?

一、鉴权方式

使用腾讯云 AK/SK 鉴权,通过环境变量配置密钥:

1.1 必填环境变量

  • TENCENTCLOUD_SECRET_ID — 腾讯云 SecretId(必填)
  • TENCENTCLOUD_SECRET_KEY — 腾讯云 SecretKey,通过 TC3-HMAC-SHA256 签名鉴权(必填)

API 地址和 Region 已内置(cmg.ai.tencentcloudapi.comap-shanghai),无需配置。

可选:通过 CMG_REGION 环境变量覆盖地域,默认 ap-shanghai

密钥获取地址:https://console.cloud.tencent.com/cam/capi

安全建议:建议在 CAM 控制台创建最小权限子账号,仅授予迁移所需 API 权限,避免使用主账号 AK/SK。

环境变量配置方式(推荐:持久化方案)

⚠️ 重要:直接在终端执行 export 仅对当前 shell 会话生效,重启终端后即失效。推荐使用持久化方案,确保每次启动均自动加载密钥,无需重复配置。

当检测到用户未配置 AK/SK 时,必须按以下步骤引导用户操作:

步骤一:写入 shell 配置文件

Linux / macOS(写入 ~/.zshrc):

echo 'export TENCENTCLOUD_SECRET_ID="your-secret-id"' >> ~/.zshrc
echo 'export TENCENTCLOUD_SECRET_KEY="your-secret-key"' >> ~/.zshrc

Windows PowerShell(写入用户级环境变量,永久生效):

[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_ID", "your-secret-id", "User")
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_KEY", "your-secret-key", "User")

步骤二:使配置立即生效

Linux / macOS:

source ~/.zshrc

Windows:关闭并重新打开 PowerShell 窗口。

步骤三:验证配置

执行 source ~/.zshrc 后,环境变量立即在当前终端生效,无需重启 AI 工具。可直接运行环境检测脚本验证:

python3 {baseDir}/scripts/check_env.py

安全提示:密钥以明文写入 ~/.zshrc,请确保不要将该文件提交到 Git 仓库。


二、前置检查(初始化工作流)

每次操作前必须先执行环境检测。

2.1 运行环境检测

python3 {baseDir}/scripts/check_env.py

脚本依次执行以下检测:

  1. 检查 Python 版本(需要 3.7+)
  2. 检查 Skill 版本更新(读取本地 SKILL.md front matter 版本,与远端对比)
  3. 检查 AK/SK 配置(TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY
  4. 验证 CMG API 连通性(cmg.ai.tencentcloudapi.com,TC3 签名)

根据返回码判断状态:

  • 0 = 环境就绪,可以正常使用
  • 1 = Python 版本不满足要求 → 提示用户升级 Python
  • 2 = AK/SK 未配置 → 提示用户配置密钥
  • 3 = Gateway 连通失败 → 提示用户检查网络

脚本在退出前会输出一行结构化 JSON 摘要,必须解析此 JSON 判断是否有版本更新:

{"status": "ready"}

若有新版本可用,JSON 中会包含 update_available: true

{"status": "ready", "update_available": true, "local_version": "1.0.8", "remote_version": "1.0.5"}

版本更新处理规则:当 JSON 摘要中 update_availabletrue 时,必须在回复用户前主动提示:

💡 MigraQ 有新版本可用(当前 {local_version},最新 {remote_version}),可前往 SkillHub 更新。

提示完成后继续正常执行用户请求,不阻断流程。

2.2 静默模式(供脚本内部调用)

python3 {baseDir}/scripts/check_env.py --quiet

静默模式下仅输出错误信息,适合其他脚本调用获取环境状态。

2.3 跳过版本检查

python3 {baseDir}/scripts/check_env.py --skip-update

三、API 调用方式

3.1 SSE 流式接口(MigraQChatCompletions)

MigraQChatCompletions 为 SSE 流式接口,使用独立调用脚本:

python3 {baseDir}/scripts/migrateq_sse_api.py '<question>' [session_id]
  • question:用户问题(必填,保留原意)
  • session_id:会话 ID(可选,不传则自动生成新的 UUID v4)

示例:

python3 {baseDir}/scripts/migrateq_sse_api.py '阿里云50台ECS如何迁移?'
python3 {baseDir}/scripts/migrateq_sse_api.py '详细说说 go2tencentcloud 步骤' '550e8400-e29b-41d4-a716-446655440000'

Dry-run 模式(仅打印签名请求头,不发送请求,用于调试鉴权):

python3 {baseDir}/scripts/migrateq_sse_api.py --dry-run '测试问题'

默认调用规则

当用户问题没有明确匹配到特定操作的触发词时,默认使用 MigraQChatCompletions。包括:跨云迁移咨询、资源扫描、选型推荐、TCO 分析、迁移工具指引,以及用户问题含义模糊无法确定具体操作时。

3.2 SessionID 管理

SessionID 控制多轮对话上下文。当前对话中 SessionID 必须保持不变

场景SessionID 处理
首次对话不传 session_id,脚本自动生成
同一对话追问必须沿用上次返回的 session_id
用户要求新对话 / 重新开始不传 session_id,重新生成,并调用 --clear-session
# 清除服务端 session(用户要求重新开始时)
python3 {baseDir}/scripts/migrateq_sse_api.py --clear-session

⚠️ 关键:SessionID 一旦改变,服务端视为全新对话,不包含任何历史上下文。


四、可用接口(当前 1 个)

接口说明触发词文档
MigraQChatCompletions迁移专家全局对话(SSE 流式)默认接口:迁移咨询、资源扫描、选型推荐、TCO、无明确匹配时{baseDir}/references/api/MigraQChatCompletions.md

使用接口前,必须先加载对应接口文档获取参数、返回值和展示规则等详细信息。


五、统一输出格式

所有接口调用的输出均为统一 JSON 格式,通过 success 字段区分成功与失败。

成功响应

{
  "success": true,
  "action": "MigraQChatCompletions",
  "data": {
    "content": "完整回答内容(Markdown 格式)",
    "is_final": true,
    "session_id": "uuid-xxx",
    "usage": {"prompt_tokens": 100, "completion_tokens": 200, "total_tokens": 300}
  },
  "requestId": "resp_xxx"
}

失败响应

{
  "success": false,
  "action": "MigraQChatCompletions",
  "error": {
    "code": "NetworkError",
    "message": "无法连接 MigraQ Gateway"
  },
  "requestId": ""
}

响应处理规则

  • 将流式输出直接呈现给用户,无需额外包装
  • success: false 或脚本退出码非 0,告知用户 MigraQ 服务暂时不可用,建议:
    1. 运行 python3 {baseDir}/scripts/check_env.py 检查环境
    2. 检查 TENCENTCLOUD_SECRET_KEY 是否有效
    3. 检查网络是否可以访问 https://cmg.ai.tencentcloudapi.com

常见错误码

错误码含义处理方式
AuthError鉴权失败(AK/SK 无效或签名错误)提示用户检查 TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY 是否正确,不重试
NetworkError无法连接 CMG API检查网络,确保可达 https://cmg.ai.tencentcloudapi.com
HTTPErrorGateway 返回其他 HTTP 错误检查 Gateway 状态,可稍后重试
MissingParameter脚本调用缺少参数检查调用方式

六、注意事项

  1. 密钥安全:严禁将 AK/SK 硬编码在代码中,必须通过环境变量传入
  2. 环境变量持久化:AK/SK 必须写入 shell 配置文件(~/.bashrc~/.zshrc),export 仅对当前会话生效
  3. SessionID 管理:同一对话全程使用同一个 SessionID,新对话时不传 session_id 让脚本重新生成
  4. SSE 超时MigraQChatCompletions 为 SSE 流式请求,默认超时 600 秒(10 分钟)
  5. 必须等待脚本完整返回:调用 migrateq_sse_api.py 后,必须等待脚本进程退出并输出最终 JSON 结果,期间远端专家 Agent 可能需要较长思考时间(数十秒至数分钟),脚本会通过 stderr 输出等待进度提示。严禁在脚本未返回结果前自行生成回答或中途处理,否则会绕过专业迁移 Agent,导致回答质量下降。
  6. 跨平台支持:所有脚本均使用纯 Python 实现,支持 Windows / Linux / macOS,无需 curl、openssl、jq 等外部依赖
  7. 默认路由:用户问题没有明确匹配到特定接口触发词时,默认走 MigraQChatCompletions 全局对话

七、安全与权限声明

7.1 所需凭证

环境变量必填说明
TENCENTCLOUD_SECRET_ID腾讯云 API SecretId(建议使用子账号)
TENCENTCLOUD_SECRET_KEY腾讯云 API SecretKey,通过 TC3-HMAC-SHA256 签名传递

7.2 数据安全

  • 密钥处理:AK/SK 仅通过环境变量读取,通过 HTTP header 传输,不写入任何文件或日志
  • 最小权限:建议在 CAM 控制台创建子账号并仅授予迁移所需权限,避免使用主账号 AK/SK
  • 网络访问:仅连接内置 CMG API 地址 https://cmg.ai.tencentcloudapi.com
  • SSL 验证:HTTPS 请求启用完整证书验证(HTTP 地址不验证)
  • 无持久化存储:本 Skill 不在本地持久化存储任何用户数据或凭证

7.3 API 操作声明

操作类型说明
ChatCompletions只读对话发送问题,获取迁移专家回答(TC3 签名,SSE 流式)

7.4 版本号维护说明

版本号存在两处,每次升级必须同步修改,否则 check_env.py 显示的版本与 SkillHub 平台不一致:

文件字段读取方
SKILL.md front matterversioncheck_env.py 版本自检
_skillhub_meta.jsonversionSkillHub 平台安装/更新管理

Comments

Loading comments...