跳到正文
TakoAPI
返回技能列表

trustlog-guard

由 anouartrust 提供

Coding Agents & IDEs
259下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Financial governance for OpenClaw agents.

描述

该技能的功能

Reads OpenClaw agent session logs to track API spending by model and session. Enforces daily and monthly budgets, detects anomalies like runaway loops and model escalations, and produces formatted cost reports. All processing is local with no external connections.

Unlike cloud-based cost monitoring tools, it reads spend data directly from local session files with no external accounts, API keys, or data transmission required.

何时使用

  • Reviewing total API spend after a long agent session
  • Setting a daily budget limit to prevent unexpected charges
  • Spotting an agent stuck in a message loop before costs escalate
  • Identifying which AI model is consuming the most budget
  • Finding which sessions drove the highest spending this month

示例工作流

输入

User asks: /trustlog

智能体
  1. 1

    Scans ~/.openclaw/agents/{agent}/sessions/*.jsonl for cost records

  2. 2

    Groups message costs by today, this week, and this month

  3. 3

    Ranks top sessions by total spend and message count

  4. 4

    Runs anomaly checks for burn rate spikes, rapid-fire loops, and model escalations

  5. 5

    Appends optimization tips based on model usage patterns and cache efficiency

输出

Full financial report with spending overview, cost breakdown by model, top sessions, anomaly scan results, and one actionable optimization tip

安装

clawhub install anouartrust/trustlog-guard

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接