← Back to Skills Marketplace
kubiczech808

Anthropic Usage

by kubiczech808 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
94
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install anthropic-usage-report
Description
Format for Anthropic API usage reports generated by anthropic-report.py. Use this skill when creating, modifying, or discussing the format of Anthropic proxy...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install anthropic-usage-report
  3. After installation, invoke the skill by name or use /anthropic-usage-report
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug anthropic-usage-report
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 94 downloads so far.

How do I install Anthropic Usage?

Run "/install anthropic-usage-report" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Anthropic Usage free?

Yes, Anthropic Usage is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Anthropic Usage support?

Anthropic Usage is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Anthropic Usage?

It is built and maintained by kubiczech808 (@kubiczech808); the current version is v1.0.0.

💬 Comments