cost-conversation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cost per Conversation

单对话成本统计

cost-report
and
cost-optimize
aggregate by agent and model. This skill aggregates by conversation (session) — a different lens that surfaces which conversations cost the most. Useful for retrospectives ("which sessions ran long on Opus?") and for evaluating whether a given project's session pattern is sustainable.
cost-report
cost-optimize
Agent模型 进行成本聚合。本Skill则按 对话(会话) 维度聚合成本——这是一个不同的视角,可揭示哪些对话的成本最高。该功能适用于回顾分析(比如“哪些会话长时间使用了Opus模型?”)以及评估特定项目的会话模式是否具备可持续性。

When to use

使用场景

  • After multiple sessions, to see total spend per conversation.
  • Before scoping a long session, to understand typical cost-per-conversation.
  • For per-project rollups via
    CONV_NAMESPACE=cost-tracking-<project>
    .
  • 在完成多个会话后,查看每个对话的总支出。
  • 在规划长会话之前,了解典型的单对话成本。
  • 通过设置
    CONV_NAMESPACE=cost-tracking-<project>
    实现按项目汇总成本。

Steps

操作步骤

  1. Run the script from anywhere:
    bash
    node plugins/ruflo-cost-tracker/scripts/conversation.mjs
    Optional env:
    • CONV_FORMAT=json
      — emit JSON instead of markdown
    • CONV_LIMIT=20
      — show only the most recent N conversations
    • CONV_NAMESPACE=cost-tracking
      — override target namespace
  2. Inspect the markdown table — total cost across all conversations, per-tier rollup, then a per-session table (started-at, sessionId prefix, message count, top model, cost).
  1. 在任意位置运行脚本
    bash
    node plugins/ruflo-cost-tracker/scripts/conversation.mjs
    可选环境变量:
    • CONV_FORMAT=json
      —— 输出JSON格式而非Markdown格式
    • CONV_LIMIT=20
      —— 仅显示最近N个会话
    • CONV_NAMESPACE=cost-tracking
      —— 覆盖目标命名空间
  2. 查看Markdown表格——包含所有对话的总成本、按层级汇总的数据,以及每个会话的详情表(开始时间、sessionId前缀、消息数量、使用的顶级模型、成本)。

Cross-references

交叉引用

  • cost-track
    — the producer that populates
    cost-tracking:session-*
  • cost-report
    — same data, per-agent / per-model lens
  • cost-trend
    — drift across bench runs (different axis: corpus runs vs conversations)
  • cost-budget-check
    — sums across conversations to evaluate the budget threshold
  • cost-track
    —— 用于填充
    cost-tracking:session-*
    数据的生成器
  • cost-report
    —— 使用相同数据,但按Agent/模型维度展示
  • cost-trend
    —— 基准测试运行中的成本变化趋势(不同维度:语料库运行 vs 对话)
  • cost-budget-check
    —— 汇总所有对话成本以评估预算阈值