Roi Calculator logo

Roi Calculator

OrganizationPopular
ZJU-REAL
roi-calculator

计算内容营销 ROI:根据投放数据算出 CTR/CPC/CPM/ROAS 等指标,对比行业基准,支持单活动分析与多活动横向比较。 当用户说"算ROI""投放效果""CTR/CPC/CPM/ROAS""投产比""广告效果""投放数据分析""活动ROI"时使用。

Overview

PublisherZJU-REAL
RepositoryEasel
Skill nameroi-calculator
Stars
1.2K
Forks
175
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZJU-REAL on GitHub. Read the source before you install it.

Installation

Install the Roi Calculator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZJU-REAL/Easel.git /tmp/Easel
mkdir -p .claude/skills
cp -r /tmp/Easel/skills/openclaw/roi-calculator .claude/skills/roi-calculator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Roi Calculator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Roi Calculator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Roi Calculator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

内容投放 ROI 计算器

根据用户提供的投放数据,计算标准营销效果指标,对比行业基准,输出结构化分析报告。

输入

用户提供以下字段的任意子集(缺失字段跳过其依赖指标):

字段代号单位必要性
投放费用ad_spendCNY核心(为 0 或缺失时切换有机模式)
曝光量impressions可选
点击量clicks可选
互动量engagements次(赞+评+转)可选
转化数conversions可选
客单价avg_order_valueCNY可选
内容制作成本production_costCNY可选,默认不计

两种模式:

  • Mode A — 单活动分析:一组输入数据,输出完整指标卡片
  • Mode B — 多活动对比:多组数据(表格或逐条),按 ROI 降序排列,横向对比

输出

指标计算(公式表)

以下指标仅在分母数据存在且非零时计算,否则标注"数据不足,已跳过":

指标公式依赖字段
CTR(点击率)clicks / impressionsimpressions, clicks
CPC(单次点击成本)ad_spend / clicksad_spend, clicks
CPM(千次曝光成本)(ad_spend / impressions) * 1000ad_spend, impressions
CPE(单次互动成本)ad_spend / engagementsad_spend, engagements
转化率conversions / clicksconversions, clicks
CPA(单次转化成本)ad_spend / conversionsad_spend, conversions
营收conversions * avg_order_valueconversions, avg_order_value
ROAS(广告支出回报率)revenue / ad_spendrevenue, ad_spend
总成本ad_spend + production_costad_spend(production_cost 缺失按 0)
利润revenue - total_costrevenue, total_cost
ROI(revenue - total_cost) / total_costrevenue, total_cost

输出格式

Mode A — 单活动分析:

## 投放效果报告

### 基础数据
(用户提供的原始字段)

### 计算指标
| 指标 | 值 | 公式 | 基准对比 |
|------|----|------|----------|
| CTR  | x% | clicks/impressions | ▲ 高于行业均值 |
| ...  |    |      |          |

### 基准对比图例
▲ 高于行业均值(表现良好)
▼ 低于行业均值(需关注)
≈ 接近行业均值(正常水平)
⚠ 显著偏离(超出基准 2 倍或低于 50%)

### 诊断
- 表现突出:(列出高于基准的指标及优势分析)
- 待优化:(列出低于基准的指标及具体改进方向)
- 综合评价:(一句话总结本次投放效果)

Mode B — 多活动对比:

## 多活动横向对比(按 ROI 降序)

| 活动 | 花费 | 营收 | ROI | ROAS | CTR | CPC | 综合评价 |
|------|------|------|-----|------|-----|-----|----------|
| ...  |      |      |     |      |     |     |          |

### 最优/最差活动分析
(对比 ROI 最高与最低活动的关键指标差异,找出差距来源)

### 预算分配建议
(基于各活动效率,建议预算向高 ROI 活动倾斜的比例)

### 优化建议
(针对低效活动的具体改进方向)

执行步骤

确定性计算交给脚本,LLM 只做解读。 上表各项指标(含营收/利润派生,有机模式另算互动率)、 有机模式切换、字段校验、Mode B 按 ROI 降序排序,全部由 scripts/calc.py 完成(复用 skills/shared/scripts/social_stats.pysafe_div,除零/缺字段一律返回 null,不心算、不猜数)。

  1. 解析输入 — 从用户 prompt 中提取数据字段,识别 Mode A(单组数据)或 Mode B(多组数据)
  2. 调用脚本算指标
    • Mode A(单活动):
      bash
      python3 skills/openclaw/roi-calculator/scripts/calc.py single --name "活动名" \
        --ad-spend 5000 --impressions 100000 --clicks 3000 \
        --engagements 8000 --conversions 150 --avg-order-value 200 \
        --production-cost 1000
    • Mode B(多活动,按 ROI 降序):把各活动整理成 JSON 数组文件后
      bash
      python3 skills/openclaw/roi-calculator/scripts/calc.py multi --file campaigns.json
    脚本自动:11 指标逐项计算(分母为 0/缺失返回 null 并视为"数据不足")、 营收→ROAS/利润/ROI 派生、ad_spend 为 0/缺失时切有机模式(跳过成本类指标)、 字段校验(负值 / 曝光<点击 / 转化>点击 写入 warnings)、Mode B 按 roi_pct 降序排序并标 roi_rank
  3. 加载基准 — 读取 benchmarks.md 获取行业基准数据
  4. 确定对比基准
    • 有 Profile:读取 platforms.md 确定主平台,选对应平台基准
    • 无 Profile:使用跨平台均值
  5. 基准对比(LLM 解读) — 把脚本输出的每个指标与基准比较,标注 ▲ 高于 / ▼ 低于 / ≈ 持平 / ⚠ 显著偏离
  6. 生成诊断(LLM 解读) — 汇总表现突出项和待优化项,给出可操作的改进建议;转达脚本 warnings
  7. Mode B 追加(LLM 解读) — 基于脚本已排好的 ROI 排名,标注最优/最差,分析差异原因,给出预算分配建议

有机内容模式

当 ad_spend 为 0 或缺失时,自动切换:

  • 跳过所有成本类指标(CPC/CPM/CPE/CPA/ROAS/ROI/利润)
  • 仅计算:CTR(若有 impressions + clicks)、互动率(engagements / impressions)
  • 报告标题标注"有机内容效果分析"
  • 基准对比使用自然流量基准(通常高于付费流量)

Profile 感知

有 Profile 时:

  • 读取 platforms.md 获取主投放平台,选用平台专属基准区间
  • 读取 audience.md 了解受众特征,为转化率判断提供上下文
  • 对比结论使用平台维度的精确基准

无 Profile 时:

  • 使用跨平台综合均值作为基准
  • 在报告末尾附注:"提供账号 Profile(含平台信息)可获得平台专属基准对比"

规则

  1. 不捏造输入 — 所有指标仅从用户提供的数据计算,缺失字段跳过依赖指标
  2. 公式透明 — 每个指标旁标注计算公式,用户可验证
  3. 基准对比 — 与行业基准比较,明确标注高于/低于/持平
  4. 缺失容忍 — 缺字段不假设数值,跳过并说明"因缺少 X 数据无法计算"
  5. 有机切换 — ad_spend 为 0 或缺失时自动切换有机模式,不报错

自研笔记

基准数据来源(定期更新 references/benchmarks.md):

  • Google Ads / Meta Ads 官方行业基准报告
  • 巨量引擎 / 千川 投放效果白皮书
  • 新榜 / 飞瓜 / 蝉妈妈 行业报告
  • 各平台创作者中心公开数据

迭代方向:

  • 增加时间序列对比(周环比、月同比)
  • 支持自定义基准(用户提供历史均值作为对比基线)
  • 接入真实 API 数据源(巨量引擎 / 小红书聚光 / 微信广告)
  • 漏斗可视化输出(impressions → clicks → conversions 漏斗图)
  • 归因模型支持(首次触达 / 末次触达 / 线性归因)
  • 与 content-postmortem SKILL 联动,投放数据反哺内容策略

基准数据维护规则:

  • 每季度对照最新行业报告校准 benchmarks.md 中的数值区间
  • 标注数据采集时间,过期超过 6 个月的基准加 ⚠ 提示
  • 鼓励用户提供自身历史数据,逐步建立账号级内部基准

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Roi Calculator AI skill do?

计算内容营销 ROI:根据投放数据算出 CTR/CPC/CPM/ROAS 等指标,对比行业基准,支持单活动分析与多活动横向比较。 当用户说"算ROI""投放效果""CTR/CPC/CPM/ROAS""投产比""广告效果""投放数据分析""活动ROI"时使用。

Why use Roi Calculator on TypingMind?

Because you install it once and use it with any model. Roi Calculator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Roi Calculator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/roi-calculator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Roi Calculator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Roi Calculator?

As many as you like. As long as a model supports skills, you can use Roi Calculator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Roi Calculator AI skill free?

Yes. It is published on GitHub by ZJU-REAL under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇