{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/ai-usage",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ai-usage",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/usage_check.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/ai-usage",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Quick Start",
        "body": "python3 scripts/usage_check.py           # Pretty report with gauges\npython3 scripts/usage_check.py --json    # JSON output for scripting"
      },
      {
        "title": "Requirements",
        "body": "Python 3.10+ (no pip dependencies — stdlib only)\nClaude Code installed and authenticated (claude CLI in PATH) — for Anthropic quota\nOpenClaw installed — for session log token/cost stats"
      },
      {
        "title": "What It Shows",
        "body": "Anthropic (real quota from OAuth API):\n\nWeekly utilization % with reset countdown\n5-hour rolling window %\nModel-specific weekly (Sonnet, Opus) when available\nExtra usage spend vs monthly limit\n\nOther Providers (from OpenClaw session logs):\n\nToken counts and call counts per model\nAuto-detects any provider OpenClaw routes through (Ollama, OpenAI, etc.)\n\nOpenClaw Anthropic breakdown:\n\nPer-model token counts and equivalent API cost"
      },
      {
        "title": "How It Works",
        "body": "Anthropic quota: GET https://api.anthropic.com/api/oauth/usage using Claude Code's OAuth token from ~/.claude/.credentials.json (requires user:profile scope)\nToken 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.\nSession stats: Parses ~/.openclaw/agents/main/sessions/*.jsonl for per-provider/model token and cost data"
      },
      {
        "title": "Environment Variables",
        "body": "VariableDefaultDescriptionOPENCLAW_SESSIONS_DIR~/.openclaw/agents/main/sessionsOpenClaw session log directoryCLAUDE_CREDENTIALS_PATH~/.claude/.credentials.jsonClaude Code credentials file"
      },
      {
        "title": "Tips",
        "body": "Run via Haiku or a lightweight model for heartbeat/background checks — the script just needs to execute, no reasoning required\nUse --json for programmatic consumption (cron jobs, dashboards, alerts)\nWorks with any Anthropic subscription tier (Pro, Max, Team, etc.)"
      }
    ],
    "body": "AI Usage Check\nQuick Start\npython3 scripts/usage_check.py           # Pretty report with gauges\npython3 scripts/usage_check.py --json    # JSON output for scripting\n\nRequirements\nPython 3.10+ (no pip dependencies — stdlib only)\nClaude Code installed and authenticated (claude CLI in PATH) — for Anthropic quota\nOpenClaw installed — for session log token/cost stats\nWhat It Shows\n\nAnthropic (real quota from OAuth API):\n\nWeekly utilization % with reset countdown\n5-hour rolling window %\nModel-specific weekly (Sonnet, Opus) when available\nExtra usage spend vs monthly limit\n\nOther Providers (from OpenClaw session logs):\n\nToken counts and call counts per model\nAuto-detects any provider OpenClaw routes through (Ollama, OpenAI, etc.)\n\nOpenClaw Anthropic breakdown:\n\nPer-model token counts and equivalent API cost\nHow It Works\nAnthropic quota: GET https://api.anthropic.com/api/oauth/usage using Claude Code's OAuth token from ~/.claude/.credentials.json (requires user:profile scope)\nToken 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.\nSession stats: Parses ~/.openclaw/agents/main/sessions/*.jsonl for per-provider/model token and cost data\nEnvironment Variables\nVariable\tDefault\tDescription\nOPENCLAW_SESSIONS_DIR\t~/.openclaw/agents/main/sessions\tOpenClaw session log directory\nCLAUDE_CREDENTIALS_PATH\t~/.claude/.credentials.json\tClaude Code credentials file\nTips\nRun via Haiku or a lightweight model for heartbeat/background checks — the script just needs to execute, no reasoning required\nUse --json for programmatic consumption (cron jobs, dashboards, alerts)\nWorks with any Anthropic subscription tier (Pro, Max, Team, etc.)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/bshandley/ai-usage",
    "publisherUrl": "https://clawhub.ai/bshandley/ai-usage",
    "owner": "bshandley",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}