← 返回 Skills 市场
kubiczech808

Anthropic Usage

作者 kubiczech808 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
94
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install anthropic-usage-report
功能描述
Format for Anthropic API usage reports generated by anthropic-report.py. Use this skill when creating, modifying, or discussing the format of Anthropic proxy...
使用说明 (SKILL.md)

Anthropic Usage Report Format

Design Principles

  1. Icons = signal importance only. Icons appear ONLY at the start of lines with key metrics the user needs to scan quickly. No decorative icons.
  2. Key metrics first. CLI %, cache %, high-output call count — these appear at line start with icons.
  3. No noise. No latency (ms), no success/error icons, no redundant breakdowns unless errors exist.
  4. Neutral labeling. High-output calls are flagged for review, not pre-judged as "should have used CLI" — the cause may be inefficiency, legitimate work, or missing CLI usage.
  5. Compact. Every line earns its place.

Report Template

Anthropic Usage — {date} ({time} CET)
══════════════════════════════════════════
Total: {total} calls ({errors} errors)
⚠️ CLI: {cli_pct}% / API: {api_pct}%
{agent_name}:
  🗄️ {cache_pct}% cache ({cache_read} read / {cache_create} create)
  Tokens: {total_in} in ({new_in} new) / {total_out} out
  Cost: ~${cost}
──────────────────────────────────────────
CLI potential:
  ⚠️ {n}× inline work (>{threshold} out, {sum} tok, max {max})
  {n}× standard ({low}-{threshold} out)
  {n}× heartbeat (\x3C{low} out)
──────────────────────────────────────────
Total estimate: ~${total_cost}

Conditional Rules

  • Error breakdown: Show API: X (Y ok, Z err) | CLI: X (Y ok, Z err) ONLY when errors > 0
  • CLI icon: ⚠️ when CLI \x3C 50%, ✅ when CLI >= 50%
  • High output icon: ⚠️ when inline work calls > 0, ✅ (show "No inline work") when 0
  • Model line: Show only if multiple models used

Icon Placement Rules

Icons appear ONLY on these lines, ALWAYS at line start:

  • ⚠️ or — CLI/API ratio
  • 🗄️ — Cache rate
  • ⚠️ or — Inline work count

NO icons on: header, totals, tokens, cost, heartbeat count, standard count, separator lines.

Language

Default language is English. To localize, edit LANG dict in scripts/format_report.py:

LANG = {
    "total":        "Total",
    "calls":        "calls",
    "errors":       "errors",
    "cache":        "cache",
    "tokens":       "Tokens",
    "cost":         "Cost",
    "total_est":    "Total estimate",
    "cli_potential": "CLI potential",
    "inline_work":  "inline work",
    "standard":     "standard",
    "heartbeat":    "heartbeat",
    "no_calls":     "No API calls today.",
    "no_inline":    "No inline work",
}

Presets available in scripts/:

  • lang_cs.py — Czech / Čeština

Implementation

Reference implementation: scripts/format_report.py

To apply to an existing installation:

python3 scripts/patch_format.py /path/to/anthropic-report.py
安全使用建议
This skill appears to do exactly what it says: add/replace a format_report implementation and provide localization. Before running patch_format.py, do a dry run (use --dry-run) and inspect the preview and the created backup (.py.pre-format-patch). Only run the patch on a trusted anthropic-report.py copy and verify the target defines the expected helpers (get_pricing, CET timezone, aggregate behavior) — otherwise the patched script may fail. Because the patcher overwrites files, avoid running it with elevated privileges or on system-wide scripts unless you have a backup and have reviewed the replacement function.
功能分析
Type: OpenClaw Skill Name: anthropic-usage-report Version: 1.0.0 The skill bundle contains a script (scripts/patch_format.py) designed to modify other Python files on the system by replacing code blocks using regular expressions. While this is aligned with the stated purpose of updating report formats, the capability to modify executable code is a high-risk behavior. Furthermore, the implementation is fragile and lacks robust validation; it injects code from scripts/format_report.py that relies on specific external dependencies (e.g., CET timezone, get_pricing function) being present in the target file, which could lead to script failure or corruption if misapplied. No clear evidence of intentional malice or data exfiltration was found.
能力评估
Purpose & Capability
Name/description describe formatting Anthropic usage reports and the package contains a report formatter, a patcher to insert that formatter into an existing anthropic-report.py, and a localization preset — all directly relevant to the stated purpose.
Instruction Scope
SKILL.md stays on-topic: it documents formatting rules, describes LANG localization, and instructs how to apply the reference formatter using patch_format.py. The patch script reads and overwrites a target Python script (creating a .pre-format-patch backup) — this is expected for a patch tool but means users should only run it on trusted files/paths.
Install Mechanism
No install spec, no downloads, and no external package installs — instruction-only with bundled reference scripts. This minimizes install-time risk.
Credentials
The skill requires no environment variables, binaries, or credentials. The code does not attempt to read secrets or network endpoints. It expects the target script to supply functions/objects such as get_pricing and CET timezone, which is reasonable for integrating the formatter.
Persistence & Privilege
always is false, and the skill does not request persistent system-wide privileges. The patch tool writes only the specified target file and a local backup; it does not modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install anthropic-usage-report
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /anthropic-usage-report 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Major update: shifts focus from usage querying scripts to defining a concise, clear format for Anthropic token/cost reports. - Replaces previous token/usage instructions with detailed report formatting guidelines and template. - Introduces strong icon rules: icons only on key metric lines (CLI/API %, cache %, inline work). - Details which lines get icons, conditional logic for error breakdowns, and English/Czech localization support. - Provides a reference implementation and patch script for applying the format template. - Removes all legacy usage scripts, test fixtures, and setup/readme guidance.
元数据
Slug anthropic-usage-report
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Anthropic Usage 是什么?

Format for Anthropic API usage reports generated by anthropic-report.py. Use this skill when creating, modifying, or discussing the format of Anthropic proxy... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。

如何安装 Anthropic Usage?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install anthropic-usage-report」即可一键安装,无需额外配置。

Anthropic Usage 是免费的吗?

是的,Anthropic Usage 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Anthropic Usage 支持哪些平台?

Anthropic Usage 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Anthropic Usage?

由 kubiczech808(@kubiczech808)开发并维护,当前版本 v1.0.0。

💬 留言讨论