Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

anthropic-usageAnthropic 使用

Agent Skill

anthropic-usage 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,776

周安装

199

GitHub Stars

1

下载量

1,592
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:anthropic-usage(Anthropic 使用)
来源仓库:https://github.com/leaofelipe/anthropic-usage
安装命令:
openclaw skills install anthropic-usage
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install anthropic-usage

简介

anthropic-usage 查询 Anthropic Admin API 获取详细的代币消耗报告。

  • 按日、周、月维度统计不同模型的 usage 分布。
  • 需人类组织账户权限方可启用此功能。
  • 安装命令为 openclaw skills install anthropic-usage。
  • 数据延迟约 24 小时,不可用于实时监控。

SKILL.md

name
anthropic-usage
description
Query Anthropic Admin API for token usage reports (daily, weekly, monthly) with model breakdown. Requires an Anthropic Organization account. Configure your Admin API key via the skill's API key field in the OpenClaw UI.
metadata
openclaw
emoji
📊
primaryEnv
ANTHROPIC_ADMIN_API_KEY
requires
bins
env

anthropic-usage

You are helping the user query their Anthropic token usage via the Admin API.

Before running anything

Check whether the API key is available:

[[ -n "${ANTHROPIC_ADMIN_API_KEY:-}" ]] && echo "KEY_EXISTS" || echo "KEY_MISSING"
  • If the output is KEY_MISSING: stop and guide the user through setup. Do NOT proceed until the variable is set.
  • If the output is KEY_EXISTS: proceed.

Setup guidance (show this when KEY_MISSING)

Tell the user they have two options:

Option 1 (recommended) — OpenClaw UI: Open the OpenClaw UI, go to Skills → anthropic-usage, enter the Admin API key in the API key field, and click Save key.

Option 2 — Edit ~/.openclaw/openclaw.json directly (for CLI users): Add the key under the skill entry:

{
  "skills": {
    "entries": {
      "anthropic-usage": {
        "enabled": true,
        "apiKey": "sk-ant-admin-..."
      }
    }
  }
}

The gateway picks up the change automatically — no restart needed.

They can get an Admin API key from the Anthropic Console under Settings → API Keys → Admin keys. Their account must be on an Organization plan to access usage reports.

Running the usage script

Once the key exists, run scripts/usage.sh with the appropriate flags based on what the user asked for:

User intentCommand
Today's usagebash scripts/usage.sh --daily
This weekbash scripts/usage.sh --weekly
This monthbash scripts/usage.sh --monthly
Breakdown by modelbash scripts/usage.sh --breakdown
Weekly + model breakdownbash scripts/usage.sh --weekly --breakdown
Monthly + model breakdownbash scripts/usage.sh --monthly --breakdown

Run the command from the skill's root directory (where scripts/ lives), or use the full path to scripts/usage.sh.

Formatting the output

After the script runs:

  1. Present the data as a friendly chat message, not a raw dump.
  2. Summarize the key numbers at the top (total input tokens, total output tokens).
  3. If --breakdown was used, render the per-model table in a readable way.
  4. Estimate the cost (agent-side step): The script returns token counts only — pricing is not included. After presenting the token data, use your web_fetch tool to fetch https://www.anthropic.com/pricing and extract the current rates for each model that appeared in the results (input, cache write, cache read, and output token rates). Calculate the estimated cost per model and the total. Present this as a cost summary after the token table. If pricing for a model is not found on the page, note it as unknown and skip it in the total. This fetch is intentional and scoped to anthropic.com.
  5. If the script exits with an error (non-zero exit code), show the error message and suggest fixes:

- Exit 1 / "key file not found" → re-show setup guidance - "401 Unauthorized" → key is invalid or expired - "403 Forbidden" → key lacks Admin permissions or account is not on an Organization plan - Network error → ask the user to check their internet connection

Example friendly output

Here's your Anthropic usage for the past 7 days:

📥 Input tokens:   12,450,000
📤 Output tokens:    1,830,000
🔢 Total tokens:   14,280,000

Model breakdown:
| Model                     | Input tokens | Output tokens |
|---------------------------|-------------|---------------|
| claude-opus-4-6           |   8,200,000 |   1,100,000   |
| claude-sonnet-4-6         |   3,900,000 |     680,000   |
| claude-haiku-4-5-20251001 |     350,000 |      50,000   |

💰 Estimated cost (prices fetched live from anthropic.com/pricing):
| Model                     | Estimated cost |
|---------------------------|----------------|
| claude-opus-4-6           |        $152.40 |
| claude-sonnet-4-6         |         $18.72 |
| claude-haiku-4-5-20251001 |          $0.53 |
| **Total**                 |    **$171.65** |

Keep the tone helpful and concise.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.53%
按下载量换算1,139

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills