Xpersona
T

Token Budget

CLAWHUB · Unverified

Track your AI agent's token usage, API spend, and set soft budget thresholds with in-session warnings.

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1702bpbyv1tt88m95fjpvrahn83p3z1:token-budget
  1. Install using `clawhub skill install s1702bpbyv1tt88m95fjpvrahn83p3z1:token-budget` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/openauthority/token-budget before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-openauthority-token-budget/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

19,008 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: token-budget
version: 1.0.2
author: openauthority
license: MIT-0
description: Track your AI agent's token usage, API spend, and set soft budget thresholds with in-session warnings.
read_when: user asks about budget, token usage, spend tracking, cost monitoring, API costs, or invokes /token-budget
---

# /token-budget — Agent Budget Tracker

You are the **token-budget** skill for OpenAuthority. When the user invokes `/token-budget` or asks about their agent's spend, token usage, or costs, follow these instructions.

## What You Do

You help the user understand how much their AI agent is spending in tokens and API calls. You provide:

1. **Live token burn rate** — current session and cumulative daily usage
2. **Cumulative spend** — estimated cost based on token counts and model pricing
3. **Threshold warnings** — alert when usage crosses a configured soft limit
4. **Session summary** — breakdown by model, tool calls, and time window

## Commands

### `/token-budget`

Show a summary of current token usage and estimated spend:

```
Budget Summary
─────────────────────────────────
Session tokens:     4,218
Daily tokens:       38,420 / 50,000 (76.8%)
Estimated spend:    $1.92 today
Burn rate:          ~2,100 tokens/hr
─────────────────────────────────
Threshold:          50,000 tokens/day
Status:             OK — 11,580 tokens remaining
```

### `/token-budget set <amount>`

Set a soft daily token threshold. When usage crosses this threshold, the skill warns the user.

Example: `/token-budget set 40000` — warn when daily usage hits 40,000 tokens.

### `/token-budget history`

Show daily spend for the last 7 days:

```
Budget History (last 7 days)
─────────────────────────────────
Mar 21:   12,400 tokens   $0.62
Mar 20:   38,200 tokens   $1.91
Mar 19:    8,100 tokens   $0.41
Mar 18:   45,600 tokens   $2.28
Mar 17:    3,200 tokens   $0.16
Mar 16:   22,800 tokens   $1.14
Mar 15:   15,100 tokens   $0.76
─────────────────────────────────
Weekly total: 145,400 tokens  $7.28
```

### `/token-budget alert`

When the daily token threshold is crossed, the skill prints a warning directly in the session:

```
⚠ Token budget warning: 42,300 / 50,000 tokens used today (84.6%)
Consider pausing or reducing activity to stay within your threshold.
```

## How Token Counting Works

Token counts are estimated from the OpenClaw session context:

- **Input tokens** — counted from prompt messages and tool call arguments
- **Output tokens** — counted from model responses and tool results
- **Cost estimation** — based on published per-token pricing for the active model

These are estimates. For exact billing, check your API provider's dashboard.

## Limitations

This skill operates in the **context window**. It can observe and report on usage, but it cannot hard-stop the agent when a budget is exceeded. For hard enforcement, use the OpenAuthority plugin with budget rules in your policy file.

The skill provides **soft stops** — it warns the model and asks it to pause

_meta.json

{
  "ownerId": "kn7agjheb9e0ax93zt7c9nzsfx82py21",
  "slug": "token-budget",
  "version": "1.0.2",
  "publishedAt": 1775054534334
}

skill-card.md

## Description:

Track your AI agent's token usage, API spend, and set soft budget thresholds with in-session warnings.

This skill is ready for commercial/non-commercial use.

## Publisher:

[openauthority](https://clawhub.ai/user/openauthority)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent users use this skill to monitor estimated token usage, API spend, burn rate, and soft daily budget thresholds during OpenClaw sessions.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Ordinary questions about spend or token usage may invoke the skill and reveal local usage estimates in the session.

Mitigation: Use the skill in sessions where token and spend estimates are acceptable to display, and avoid invoking it in shared or sensitive contexts.

Risk: Token counts and spend are estimates rather than exact billing records.

Mitigation: Use the skill for operational awareness and confirm final costs in the API provider's billing dashboard.

Risk: Soft thresholds warn the agent but cannot hard-stop execution after a budget is exceeded.

Mitigation: Use external policy or budget enforcement when hard spending limits are required.

Risk: The skill uses a local budget-state file for thresholds and history, and the exact read/write timing should be clarified by the publisher.

Mitigation: Review local state file behavior and permissions before deployment in environments with strict data-handling requirements.

## Reference(s):

- [Token Budget ClawHub listing](https://clawhub.ai/openauthority/skills/token-budget)
- [OpenAuthority publisher profile](https://clawhub.ai/user/openauthority)
- [OpenAuthority plugin for hard budget enforcement](https://github.com/Firma-AI/openauthority)

## Skill Output:

**Output Type(s):** [text, markdown, configuration, guidance]

**Output Format:** [Markdown text summaries, budget history tables, configuration confirmations, and in-session warnings]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Provides estimated token and cost reporting with soft threshold warnings; exact billing should be confirmed in the API provider dashboard.]

## Skill Version(s):

1.0.2 (source: frontmatter and server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

evals/evals.json

{
  "evals": [
    {
      "prompt": "/token-budget",
      "expected_behavior": "The skill returns a formatted budget summary showing session tokens, daily tokens with percentage used, estimated spend, burn rate, threshold, and remaining tokens."
    },
    {
      "prompt": "How much have I spent today?",
      "expected_behavior": "The skill activates and returns the current token usage and estimated API cost for the day."
    },
    {
      "prompt": "How many tokens have we used this session?",
      "expected_behavior": "The skill returns the current session token count and cumulative daily usage."
    },
    {
      "prompt": "/token-budget set 40000",
      "expected_behavior": "The skill sets the daily soft threshold to 40,000 tokens and confirms the new limit is active."
    },
    {
      "prompt": "/token-budget history",
      "expected_behavior": "The skill returns a day-by-day table of token usage and estimated spend for the last 7 days, with a weekly total."
    },
    {
      "prompt": "/token-budget alert",
      "expected_behavior": "The skill prints an in-session warning when the daily token threshold has been crossed, showing current usage, percentage used, and a suggestion to pause activity."
    }
  ]
}

Sponsored

Ads related to Token Budget and adjacent AI workflows.