PromptsOpenClaw

Specific purposeEvery model call · JSONL

What the assistant spends on models

Use case

A nightly council is quiet until the bill arrives. Every model call is appended to a log with the provider, the model, the token counts, the kind of task, and an estimated cost. You can ask for a day, a week, or a month, and you can split it by model or by task.

What to connect

The providers you actually call: Anthropic, OpenAI, Google, xAI, or others. A JSONL file on disk. Price table for the AI models you use.

Setup

  1. Set COST_LOG to a path outside any folder you publish.
  2. Fill [PRICE TABLE PATH] with the per-token prices you are willing to estimate from. Update it when a price changes.
  3. Hook the log into the shared AI model caller so a call that bypasses it is treated as a bug, not a silent miss.
  4. Save the prompt as model-costs and make one real call. Confirm a JSONL line appears with tokens and a cost.

Edit before you send: The log path, the price table, and which providers you want included.

Prompt to paste into OpenClaw

Save this as a skill named model-costs. Log every model call from this assistant to [COST LOG], as one JSON object per line. Fields: time, provider, model, input tokens, output tokens, task type, estimated cost. Providers to include: [Anthropic, OpenAI, Google, xAI], plus any other provider I add later in one line. Estimate cost from [PRICE TABLE PATH]. If a model is missing from the table, log the tokens and set cost to null. Tell me once that the table needs a row. Do not invent a price. When I ask, report: - A day, a week, or a month. - Optional filter by model or by task type. - Total estimated cost, and the top tasks by cost. Write the report in sentences I can scan. A small table is fine if I ask for a breakdown. Do not send the raw log to a group chat.

More OpenClaw prompts

  • Personal CRM from mail and calendar

    A year of email and meetings is a pile of names you cannot search. OpenClaw reads Gmail and Google Calendar, drops newsletters and cold pitches, and keeps a local profile for each person worth remembering. You ask in plain language who you know at a company, or who has gone quiet.

  • Meeting action items with an approval queue

    Meetings end and the promises disappear. OpenClaw waits until a meeting is over, pulls the Fathom transcript, matches the room to your CRM, and sends you each action item to approve. Approved items become Todoist tasks. Things other people owe you stay on a waiting-on list, except people on your own team.

  • Urgent email, only when it can wait no longer

    You do not live in the inbox, including on weekends. OpenClaw checks mail on a timer, ignores senders you have already marked as noise, and pings a Telegram topic only when something needs you now. When you say an alert was wrong, the next check is stricter.

  • Knowledge base you fill from a Telegram topic

    Links you meant to remember are scattered across chats. You drop a URL into one Telegram topic. OpenClaw saves the article, the video transcript, the full post thread, or the PDF, then you ask later in plain language. A new save can point at something you already kept.