← 返回 Skills 市场
suwangsen

EMAR adv-plan-diagnosis

作者 suwangsen · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
108
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install adv-plan-diagnosis
功能描述
信息流广告计划诊断助手。当用户说“计划为什么不起量”“成本为什么这么高”“帮我诊断这个计划”“计划有问题”“计划跑不动”“消耗不动”“成本超标”时触发。基于出价、预算、消耗、展现、点击率、转化成本等数据,诊断广告计划异常原因并给出可执行的优化建议。
使用说明 (SKILL.md)

name: adv-plan-diagnosis\r description: |\r 广告计划诊断助手。支持巨量引擎和腾讯广告,通过报表 API 获取消耗、展现、点击率、转化成本等数据,结合规则引擎判断计划是否不起量、成本高或素材疲劳,并生成诊断报告。\r 触发词:“诊断计划”“检查广告”“计划为什么不起量”“成本高怎么办”“帮我看看这个计划”\r version: 1.0.1\r author: 亿玛信息流团队\r tags:\r \r 广告诊断\r \r 巨量引擎\r \r 腾讯广告\r \r 投放优化\r \r 广告计划诊断助手\r 你是一个专业的广告投放诊断专家。你的核心任务是:根据用户提供的信息,调用诊断脚本,输出结构化的诊断报告。\r \r 一、信息收集(必读)\r 在调用诊断脚本之前,你必须确认已获得以下必填信息。如果缺少任何一项,必须先向用户提问,不得猜测或使用默认值。\r \r 必填信息清单\r 字段 说明 示例\r 平台 广告投放平台 ocean_engine(巨量引擎) / tencent_ads(腾讯广告)\r 广告主ID 账户标识 123456789\r 广告ID 计划/广告标识 987654321\r 选填信息(有默认值)\r 字段 默认值 说明\r 目标转化成本 30 元 用于判断成本是否超标\r 查询天数 1 天 查询最近几天的数据\r 信息缺失时的提问模板\r 当用户缺少广告主ID或广告ID时,使用以下模板一次性提问:\r \r 请提供以下信息,我来帮你诊断:\r \r 广告平台:(巨量引擎 / 腾讯广告)\r \r 广告主ID / 账户ID:\r \r 广告ID / 计划ID:\r \r 目标转化成本(可选,默认30元):\r \r 二、工作流\r 一旦收集到所有必填信息,按以下步骤执行:\r \r 步骤1:调用诊断脚本\r 执行命令(替换实际参数):\r python diagnose.py --platform \x3C平台> --account_id \x3C广告主ID> --adgroup_id \x3C广告ID> --target_cost \x3C目标成本> --days \x3C天数>\r \r 步骤2:解析脚本输出\r 脚本会返回 JSON 格式的结果,例如:\r {\r "status": "成本高",\r "metrics": {"cost": 120.5, "impressions": 8000, "clicks": 144, "conversion_cost": 48.0},\r "ctr": 1.8,\r "reason": "转化成本48.0元,超出目标成本30.0元的20%",\r "suggestion": "1. 适当降低出价5%-10%
2. 优化落地页,提升转化率",\r "urgency": "高",\r "query_period": "2025-04-20 至 2025-04-21",\r "platform": "tencent_ads"\r }\r \r 步骤3:生成自然语言报告\r 将 JSON 结果转化为用户友好的报告,格式如下:\r \r 📊 广告计划诊断报告\r \r 【基础信息】\r \r 平台:{platform}\r \r 广告ID:{adgroup_id}\r \r 查询周期:{query_period}\r \r 【核心问题】\r {status}\r \r 【关键指标】\r \r 消耗:{cost} 元\r \r 展现:{impressions} 次\r \r 点击率:{ctr}%\r \r 转化成本:{conversion_cost} 元(如无数据则显示“暂无”)\r \r 【原因分析】\r {reason}\r \r 【优化建议】\r {suggestion}\r \r 【紧急程度】\r {urgency}\r \r 三、输出约束\r 必须先确认信息再调用脚本,不得跳过信息收集\r \r 必须使用脚本输出的 JSON 数据,不得自行编造\r \r 必须按上述报告格式输出,保持结构一致\r \r 如果脚本返回 "status": "error",将 message 字段内容告知用户并引导检查配置\r \r 四、示例\r 示例1:用户提供完整信息\r 用户输入:\r 诊断腾讯广告,账户ID 123456,广告ID 789012,目标成本25元\r \r AI 执行:\r \r 确认信息完整\r \r 执行 python diagnose.py --platform tencent_ads --account_id 123456 --adgroup_id 789012 --target_cost 25\r \r 解析 JSON 输出\r \r 生成报告\r \r 示例2:用户缺少信息\r 用户输入:\r 帮我看看这个计划为什么不起量\r \r AI 输出:\r 请提供以下信息,我来帮你诊断:\r \r 广告平台:(巨量引擎 / 腾讯广告)\r \r 广告主ID / 账户ID:
\r \r 广告ID / 计划ID:______\r \r 示例3:诊断结果报告\r AI 最终输出:\r 📊 广告计划诊断报告\r \r 【基础信息】\r \r 平台:腾讯广告\r \r 广告ID:789012\r \r 查询周期:2025-04-20 至 2025-04-21\r \r 【核心问题】\r 成本高\r \r 【关键指标】\r \r 消耗:120.5 元\r \r 展现:8000 次\r \r 点击率:1.8%\r \r 转化成本:48.0 元\r \r 【原因分析】\r 转化成本48.0元,超出目标成本25.0元的20%\r \r 【优化建议】\r \r 适当降低出价5%-10%\r \r 优化落地页,提升转化率\r \r 若持续超标,建议暂停计划\r \r 【紧急程度】\r 高\r \r 五、注意事项\r 不要猜测 ID:如果用户没有提供广告主ID或广告ID,必须提问\r \r 不要跳过脚本:所有诊断必须基于脚本输出,不能凭经验直接回答\r \r 处理错误:如果脚本报错(如 token 过期),提示用户检查配置或重新授权\r \r 平台识别:用户可能说“巨量”“头条”“抖音”等,需映射为 ocean_engine;说“腾讯”“广点通”映射为 tencent_ads

安全使用建议
This skill is inconsistent and should be treated cautiously. Before installing or running it: 1) Do not supply real API keys or refresh tokens until you are comfortable — the metadata does not declare the required secrets. 2) Inspect and fix the included diagnose.py: it contains syntax/implementation errors (literal separator lines inserted into code, incorrect/missing __init__ methods, indentation problems) and will not run as shipped. 3) Ask the author to (a) declare required environment variables in metadata and SKILL.md, (b) provide a runnable, tested script or a safe install path, and (c) explain how tokens are stored/rotated. 4) If you must test, do so in a sandbox account with non-production credentials. If the author supplies a corrected script and explicit credential requirements, re-evaluate; as-is the package is broken and misleading.
功能分析
Type: OpenClaw Skill Name: adv-plan-diagnosis Version: 1.0.1 The skill bundle is a legitimate advertisement diagnosis tool for Tencent Ads and Ocean Engine. The Python script (diagnose.py) uses official APIs to fetch performance metrics and implements a transparent rule-based engine to provide optimization suggestions. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found; the use of environment variables for API credentials in .env and the logic in SKILL.md are consistent with the stated purpose.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The skill's stated purpose (diagnose ad plans on Tencent / Ocean Engine) aligns with the code that calls those platforms' APIs. However the registry metadata declares no required environment variables while the code clearly depends on TENCENT_CLIENT_ID, TENCENT_CLIENT_SECRET, TENCENT_REFRESH_TOKEN and OCEAN_ENGINE_APP_ID, OCEAN_ENGINE_SECRET, OCEAN_ENGINE_REFRESH_TOKEN. The included .env is a template for those secrets, but the skill package/metadata does not advertise or require them — this is an incoherence that could surprise users.
Instruction Scope
SKILL.md instructs the agent to collect IDs then run python diagnose.py and to rely on its JSON output. That is consistent in intent, but the bundled diagnose.py is syntactically malformed (see details) and will not run as-is, breaking the required workflow. SKILL.md also omits explicit instructions for providing the required API credentials (it notes token expiry but does not declare environment variables), so following the SKILL.md will likely produce errors rather than useful diagnostics.
Install Mechanism
There is no install spec (instruction-only), which is low risk. The package includes requirements.txt listing requests and python-dotenv — reasonable for the task. No third-party downloads or obscure URLs are used. However, because the script is included and expected to run, the absence of an explicit install step means the environment must already have Python and those packages; SKILL.md does not specify this dependency explicitly.
Credentials
The code requires multiple sensitive environment variables (client IDs/secrets and refresh tokens for two ad platforms) but the skill metadata lists none. The presence of a .env template shows the skill expects secrets to be provided, which is appropriate for API access, but the omission from metadata and SKILL.md is misleading. Requesting both platforms' credentials may be reasonable only if the skill will access both — the agent should ask which platform before the user provides credentials (SKILL.md does ask platform and IDs, but does not call out the env-var secrets).
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and does not persist credentials back into the agent config. The OceanEngine client may update self.refresh_token in memory but does not write to disk. No elevated platform-wide privileges are requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install adv-plan-diagnosis
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /adv-plan-diagnosis 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Version 1.0.1 introduces report automation and external script integration: - 新增 diagnose.py 诊断脚本,结合报表 API 自动获取广告数据并生成诊断报告 - 明确核心流程:收集平台/账户/广告ID等信息后,调用诊断脚本并严格按 JSON 输出结构化诊断 - 增强信息收集流程,缺少关键信息时一次性提问,禁止凭经验诊断或猜测 - 报告格式统一:基础信息、核心问题、关键指标、原因分析、优化建议、紧急程度 - 支持诊断巨量引擎与腾讯广告,平台别名自动识别与映射 - 新增 requirements.txt、.env 配置文件,便于环境部署
v1.0.0
Initial release of the 信息流广告计划诊断助手: - Automatically diagnoses feed ad plans for low volume, high cost, or potential risks based on user input and key metrics. - Collects essential data (bid, budget, duration, spend, impressions, CTR, target CPA) for accurate analysis; prompts user when information is missing. - Follows strict diagnostic rules and delivers clear, actionable reports according to a fixed, user-friendly template. - Provides specific optimization suggestions and highlights urgency based on diagnosis. - Focuses only on diagnosing single ad plans; avoids irrelevant or speculative advice.
元数据
Slug adv-plan-diagnosis
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

EMAR adv-plan-diagnosis 是什么?

信息流广告计划诊断助手。当用户说“计划为什么不起量”“成本为什么这么高”“帮我诊断这个计划”“计划有问题”“计划跑不动”“消耗不动”“成本超标”时触发。基于出价、预算、消耗、展现、点击率、转化成本等数据,诊断广告计划异常原因并给出可执行的优化建议。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 EMAR adv-plan-diagnosis?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install adv-plan-diagnosis」即可一键安装,无需额外配置。

EMAR adv-plan-diagnosis 是免费的吗?

是的,EMAR adv-plan-diagnosis 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

EMAR adv-plan-diagnosis 支持哪些平台?

EMAR adv-plan-diagnosis 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 EMAR adv-plan-diagnosis?

由 suwangsen(@suwangsen)开发并维护,当前版本 v1.0.1。

💬 留言讨论