{
  "schemaVersion": "1.0",
  "item": {
    "slug": "claude-usage-cli",
    "name": "claude-usage-cli",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/cyberash-dev/claude-usage-cli",
    "canonicalUrl": "https://clawhub.ai/cyberash-dev/claude-usage-cli",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/claude-usage-cli",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=claude-usage-cli",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "_meta.json"
    ],
    "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",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/claude-usage-cli"
    },
    "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/claude-usage-cli",
    "agentPageUrl": "https://openagent3.xyz/skills/claude-usage-cli/agent",
    "manifestUrl": "https://openagent3.xyz/skills/claude-usage-cli/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/claude-usage-cli/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": "claude-usage-cli",
        "body": "⚠️ DEPRECATED — This skill is no longer maintained. Please use claude-cost-cli instead, which provides the same functionality with active support.\n\nA CLI for querying Anthropic Admin API usage and cost data. Requires an Admin API key (sk-ant-admin...) from Claude Console → Settings → Admin Keys. Credentials are stored in macOS Keychain."
      },
      {
        "title": "Installation",
        "body": "Requires Node.js >= 18 and macOS. The package is open source: https://github.com/cyberash-dev/claude-usage-cli\n\nnpm install -g claude-usage-cli\n\nInstall from source (if you prefer to audit the code before running):\n\ngit clone https://github.com/cyberash-dev/claude-usage-cli.git\ncd claude-usage-cli\nnpm install && npm run build && npm link\n\nAfter installation the claude-usage command is available globally."
      },
      {
        "title": "Quick Start",
        "body": "claude-usage config set-key     # Interactive prompt: enter Admin API key (masked)\nclaude-usage usage              # Token usage for the last 7 days\nclaude-usage cost               # Cost breakdown for the last 7 days\nclaude-usage cost --sum         # Total spend for the last 7 days"
      },
      {
        "title": "API Key Management",
        "body": "Store API key (interactive masked prompt, validates sk-ant-admin prefix):\n\nclaude-usage config set-key\n\nShow stored key (masked):\n\nclaude-usage config show\n\nRemove key from Keychain:\n\nclaude-usage config remove-key"
      },
      {
        "title": "Usage Reports",
        "body": "claude-usage usage                                    # Last 7 days, daily, grouped by model\nclaude-usage usage --period 30d                       # Last 30 days\nclaude-usage usage --from 2026-01-01 --to 2026-01-31 # Custom date range\nclaude-usage usage --model claude-sonnet-4            # Filter by model\nclaude-usage usage --api-keys apikey_01Rj,apikey_02Xz # Filter by API key IDs\nclaude-usage usage --group-by model,api_key_id        # Group by multiple dimensions\nclaude-usage usage --bucket 1h                        # Hourly granularity (1d, 1h, 1m)\n\nJSON output (for scripting):\n\nclaude-usage usage --json\nclaude-usage usage --period 30d --json\n\nOutput columns: Date, Model, Input Tokens, Cached Tokens, Output Tokens, Web Searches."
      },
      {
        "title": "Cost Reports",
        "body": "claude-usage cost                                           # Last 7 days, grouped by description\nclaude-usage cost --period 30d                              # Last 30 days\nclaude-usage cost --from 2026-01-01 --to 2026-01-31        # Custom date range\nclaude-usage cost --group-by workspace_id,description       # Group by workspace and description\nclaude-usage cost --sum                                     # Total cost only\n\nJSON output (for scripting):\n\nclaude-usage cost --json\nclaude-usage cost --sum --json\n\nOutput columns: Date, Description, Model, Amount (USD), Token Type, Tier."
      },
      {
        "title": "usage",
        "body": "FlagDescriptionDefault--from <date>Start date (YYYY-MM-DD or ISO)7 days ago--to <date>End date (YYYY-MM-DD or ISO)now--period <days>Shorthand period (7d, 30d, 90d)7d--model <models>Filter by model(s), comma-separatedall--api-keys <ids>Filter by API key ID(s), comma-separatedall--group-by <fields>Group by model, api_key_id, workspace_id, service_tiermodel--bucket <width>Bucket width: 1d, 1h, 1m1d--jsonOutput as JSONfalse"
      },
      {
        "title": "cost",
        "body": "FlagDescriptionDefault--from <date>Start date (YYYY-MM-DD or ISO)7 days ago--to <date>End date (YYYY-MM-DD or ISO)now--period <days>Shorthand period (7d, 30d, 90d)7d--group-by <fields>Group by workspace_id, descriptiondescription--sumOutput total cost onlyfalse--jsonOutput as JSONfalse"
      },
      {
        "title": "Security and Data Storage",
        "body": "Admin API key: stored exclusively in macOS Keychain (service: claude-usage-cli). Never written to disk in plaintext.\nNo config files: all settings are passed via CLI flags. Nothing is stored on disk besides the Keychain entry.\nNetwork: the API key is only sent to api.anthropic.com over HTTPS. No other outbound connections are made.\nScope: the Admin API key grants read-only access to organization usage and cost data. It cannot modify billing, create API keys, or access conversation content.\nNo caching: query results are not cached or persisted to disk."
      },
      {
        "title": "API Reference",
        "body": "This CLI wraps the Anthropic Admin API:\n\nUsage: GET /v1/organizations/usage_report/messages\nCost: GET /v1/organizations/cost_report\n\nDocumentation: https://platform.claude.com/docs/en/build-with-claude/usage-cost-api"
      }
    ],
    "body": "claude-usage-cli\n\n⚠️ DEPRECATED — This skill is no longer maintained. Please use claude-cost-cli instead, which provides the same functionality with active support.\n\nA CLI for querying Anthropic Admin API usage and cost data. Requires an Admin API key (sk-ant-admin...) from Claude Console → Settings → Admin Keys. Credentials are stored in macOS Keychain.\n\nInstallation\n\nRequires Node.js >= 18 and macOS. The package is open source: https://github.com/cyberash-dev/claude-usage-cli\n\nnpm install -g claude-usage-cli\n\n\nInstall from source (if you prefer to audit the code before running):\n\ngit clone https://github.com/cyberash-dev/claude-usage-cli.git\ncd claude-usage-cli\nnpm install && npm run build && npm link\n\n\nAfter installation the claude-usage command is available globally.\n\nQuick Start\nclaude-usage config set-key     # Interactive prompt: enter Admin API key (masked)\nclaude-usage usage              # Token usage for the last 7 days\nclaude-usage cost               # Cost breakdown for the last 7 days\nclaude-usage cost --sum         # Total spend for the last 7 days\n\nAPI Key Management\n\nStore API key (interactive masked prompt, validates sk-ant-admin prefix):\n\nclaude-usage config set-key\n\n\nShow stored key (masked):\n\nclaude-usage config show\n\n\nRemove key from Keychain:\n\nclaude-usage config remove-key\n\nUsage Reports\nclaude-usage usage                                    # Last 7 days, daily, grouped by model\nclaude-usage usage --period 30d                       # Last 30 days\nclaude-usage usage --from 2026-01-01 --to 2026-01-31 # Custom date range\nclaude-usage usage --model claude-sonnet-4            # Filter by model\nclaude-usage usage --api-keys apikey_01Rj,apikey_02Xz # Filter by API key IDs\nclaude-usage usage --group-by model,api_key_id        # Group by multiple dimensions\nclaude-usage usage --bucket 1h                        # Hourly granularity (1d, 1h, 1m)\n\n\nJSON output (for scripting):\n\nclaude-usage usage --json\nclaude-usage usage --period 30d --json\n\n\nOutput columns: Date, Model, Input Tokens, Cached Tokens, Output Tokens, Web Searches.\n\nCost Reports\nclaude-usage cost                                           # Last 7 days, grouped by description\nclaude-usage cost --period 30d                              # Last 30 days\nclaude-usage cost --from 2026-01-01 --to 2026-01-31        # Custom date range\nclaude-usage cost --group-by workspace_id,description       # Group by workspace and description\nclaude-usage cost --sum                                     # Total cost only\n\n\nJSON output (for scripting):\n\nclaude-usage cost --json\nclaude-usage cost --sum --json\n\n\nOutput columns: Date, Description, Model, Amount (USD), Token Type, Tier.\n\nFlag Reference\nusage\nFlag\tDescription\tDefault\n--from <date>\tStart date (YYYY-MM-DD or ISO)\t7 days ago\n--to <date>\tEnd date (YYYY-MM-DD or ISO)\tnow\n--period <days>\tShorthand period (7d, 30d, 90d)\t7d\n--model <models>\tFilter by model(s), comma-separated\tall\n--api-keys <ids>\tFilter by API key ID(s), comma-separated\tall\n--group-by <fields>\tGroup by model, api_key_id, workspace_id, service_tier\tmodel\n--bucket <width>\tBucket width: 1d, 1h, 1m\t1d\n--json\tOutput as JSON\tfalse\ncost\nFlag\tDescription\tDefault\n--from <date>\tStart date (YYYY-MM-DD or ISO)\t7 days ago\n--to <date>\tEnd date (YYYY-MM-DD or ISO)\tnow\n--period <days>\tShorthand period (7d, 30d, 90d)\t7d\n--group-by <fields>\tGroup by workspace_id, description\tdescription\n--sum\tOutput total cost only\tfalse\n--json\tOutput as JSON\tfalse\nSecurity and Data Storage\nAdmin API key: stored exclusively in macOS Keychain (service: claude-usage-cli). Never written to disk in plaintext.\nNo config files: all settings are passed via CLI flags. Nothing is stored on disk besides the Keychain entry.\nNetwork: the API key is only sent to api.anthropic.com over HTTPS. No other outbound connections are made.\nScope: the Admin API key grants read-only access to organization usage and cost data. It cannot modify billing, create API keys, or access conversation content.\nNo caching: query results are not cached or persisted to disk.\nAPI Reference\n\nThis CLI wraps the Anthropic Admin API:\n\nUsage: GET /v1/organizations/usage_report/messages\nCost: GET /v1/organizations/cost_report\n\nDocumentation: https://platform.claude.com/docs/en/build-with-claude/usage-cost-api"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/cyberash-dev/claude-usage-cli",
    "publisherUrl": "https://clawhub.ai/cyberash-dev/claude-usage-cli",
    "owner": "cyberash-dev",
    "version": "0.2.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/claude-usage-cli",
    "downloadUrl": "https://openagent3.xyz/downloads/claude-usage-cli",
    "agentUrl": "https://openagent3.xyz/skills/claude-usage-cli/agent",
    "manifestUrl": "https://openagent3.xyz/skills/claude-usage-cli/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/claude-usage-cli/agent.md"
  }
}