← 返回
未分类 中文

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...
用于 anthropic-report.py 生成的 Anthropic API 使用报告格式;在创建、修改或讨论 Anthropic 代理格式时请使用此技能。
kubiczech808
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 297
下载
💾 0
安装
1
版本
#anthropic#api#cache#cli#latest#report#requests#spendings#tokens#usage

概述

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 (<{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 < 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 12:59 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,924
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,062 📥 800,725
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,106