# Send AI Usage to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ai-usage",
    "name": "AI Usage",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/bshandley/ai-usage",
    "canonicalUrl": "https://clawhub.ai/bshandley/ai-usage",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/ai-usage",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ai-usage",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/usage_check.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "ai-usage",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T04:37:17.981Z",
      "expiresAt": "2026-05-06T04:37:17.981Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ai-usage",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ai-usage",
        "contentDisposition": "attachment; filename=\"ai-usage-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "ai-usage"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ai-usage"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ai-usage",
    "downloadUrl": "https://openagent3.xyz/downloads/ai-usage",
    "agentUrl": "https://openagent3.xyz/skills/ai-usage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ai-usage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ai-usage/agent.md"
  }
}
```
## Documentation

### Quick Start

python3 scripts/usage_check.py           # Pretty report with gauges
python3 scripts/usage_check.py --json    # JSON output for scripting

### Requirements

Python 3.10+ (no pip dependencies — stdlib only)
Claude Code installed and authenticated (claude CLI in PATH) — for Anthropic quota
OpenClaw installed — for session log token/cost stats

### What It Shows

Anthropic (real quota from OAuth API):

Weekly utilization % with reset countdown
5-hour rolling window %
Model-specific weekly (Sonnet, Opus) when available
Extra usage spend vs monthly limit

Other Providers (from OpenClaw session logs):

Token counts and call counts per model
Auto-detects any provider OpenClaw routes through (Ollama, OpenAI, etc.)

OpenClaw Anthropic breakdown:

Per-model token counts and equivalent API cost

### How It Works

Anthropic quota: GET https://api.anthropic.com/api/oauth/usage using Claude Code's OAuth token from ~/.claude/.credentials.json (requires user:profile scope)
Token auto-refresh: If the token is expired, the script automatically refreshes it by invoking claude --print -p "ok" (Claude Code refreshes its own OAuth token on any invocation), then re-reads the updated credentials file. If Claude Code isn't installed, Anthropic quota is skipped gracefully.
Session stats: Parses ~/.openclaw/agents/main/sessions/*.jsonl for per-provider/model token and cost data

### Environment Variables

VariableDefaultDescriptionOPENCLAW_SESSIONS_DIR~/.openclaw/agents/main/sessionsOpenClaw session log directoryCLAUDE_CREDENTIALS_PATH~/.claude/.credentials.jsonClaude Code credentials file

### Tips

Run via Haiku or a lightweight model for heartbeat/background checks — the script just needs to execute, no reasoning required
Use --json for programmatic consumption (cron jobs, dashboards, alerts)
Works with any Anthropic subscription tier (Pro, Max, Team, etc.)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: bshandley
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T04:37:17.981Z
- Expires at: 2026-05-06T04:37:17.981Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/ai-usage)
- [Send to Agent page](https://openagent3.xyz/skills/ai-usage/agent)
- [JSON manifest](https://openagent3.xyz/skills/ai-usage/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/ai-usage/agent.md)
- [Download page](https://openagent3.xyz/downloads/ai-usage)