← 返回 Skills 市场
echoudhry

Clawculator

作者 echoudhry · GitHub ↗ · v1.2.1
cross-platform ✓ 安全检测通过
496
总下载
1
收藏
0
当前安装
12
版本数
在 OpenClaw 中安装
/install clawculator
功能描述
Analyze OpenClaw costs and detect billing issues. Source code is fully bundled — nothing is fetched at runtime. Requires only the node binary.
使用说明 (SKILL.md)

clawculator

Cost forensics for OpenClaw. Finds billing issues in your config, sessions, and workspace. Pure deterministic logic — no AI, no network calls, no external dependencies.

Source code is fully bundled in this skill folder. Nothing is fetched at runtime. You can audit every file before running.

Files this skill reads:

  • ~/.openclaw/openclaw.json — your OpenClaw config
  • ~/.openclaw/agents/main/sessions/sessions.json — session token usage
  • ~/clawd/ — workspace root file count only (no file contents read)
  • /tmp/openclaw — log directory (read only, if present)

Files this skill may write (only when --md is used):

  • ./clawculator-report.md — markdown report
  • Custom path via --out=PATH

No network requests are made. No shell commands are spawned.

Session keys are truncated in all output (first 8 chars + ellipsis) to avoid exposing sensitive identifiers.


Usage

When the user types clawculator, check my costs, analyze spend, or cost report, run:

node {baseDir}/run.js --md

Return the full markdown report to the user inline.

When the user types snapshot, share my grade, cost grade, clawculator snapshot, or what's my grade, run:

node {baseDir}/run.js --snapshot

Return the terminal card output to the user. This shows their grade (A+ to D), cost range, setup complexity, and findings — designed to be screenshot and shared.

Flags

  • --snapshot — shareable grade card (terminal output, screenshot-ready)
  • --md — write markdown report and print to stdout
  • --json — machine-readable JSON to stdout
  • --out=PATH — custom output path for --md
  • node {baseDir}/run.js --help — full usage

What it catches

  • 💓 Heartbeat running on paid model instead of Ollama
  • 🔧 Skill polling loops on paid model
  • 📱 WhatsApp groups auto-joined on primary model
  • 🪝 Hooks (boot-md, command-logger, session-memory) on Sonnet
  • 💬 Orphaned sessions still holding tokens
  • 🤖 maxConcurrent too high — burst cost multiplier
  • 📁 Workspace root bloat inflating context
  • ⚙️ Primary model cost awareness

All findings include exact fix commands.

安全使用建议
This skill appears internally consistent and does what it says: it inspects your OpenClaw config and session transcripts, computes cost estimates, and emits reports. Before running, consider: 1) inspect the bundled files (run.js, analyzer.js, reporter/mdReport/htmlReport) yourself — the author encourages auditing the folder. 2) The tool reads ~/.openclaw and session .jsonl transcripts which can contain usage records and identifiers; displayed session keys are truncated but some cost and timestamp data will be included in reports. 3) The skill writes a markdown report only when you pass --md (or --out=PATH) — be careful with the output path. 4) The README includes example curl/npx install commands; those would fetch code from the network if you run them yourself — the skill as packaged does not perform network requests. If you are comfortable with these behaviors and have inspected the bundled source, the skill is coherent with its stated purpose.
功能分析
Type: OpenClaw Skill Name: clawculator Version: 1.2.1 Clawculator is a cost-analysis tool designed to audit OpenClaw configuration files and session logs for expensive API usage patterns. The code performs deterministic logic to identify 'cost leaks' (e.g., high-cost models used for heartbeats or polling) and generates local reports in Markdown, HTML, and terminal formats. While the tool reads sensitive files such as `openclaw.json` and session transcripts, it lacks any network-egress capabilities (no fetch/http requests to external domains) and explicitly truncates session keys in its output to prevent credential exposure. The use of a local-only web server in `webDashboard.js` and `child_process.exec` to open a browser are standard for local utility dashboards and do not show malicious intent.
能力评估
Purpose & Capability
Name/description (cost forensics for OpenClaw) match the code and runtime instructions. The skill only requires node and reads OpenClaw config, session logs, workspace counts, and /tmp/openclaw for logs — all directly relevant to analyzing spend and session activity.
Instruction Scope
SKILL.md explicitly lists the files the skill reads and the files it may write; the code implements those reads (openclaw.json, sessions.json, session .jsonl transcripts, workspace file counts, /tmp logs). The skill watches and tails transcript .jsonl files (liveDashboard) and parses usage entries. It claims no network calls and no shell commands; the provided source files contain only local fs/path/os usage and no networking or child_process exec. Note: session keys/IDs are truncated when displayed, but the tool does read files that may contain tokens or API usage transcripts — outputs can therefore reveal truncated identifiers and cost data.
Install Mechanism
No install specification is included; all source code is bundled in the skill folder. There are no runtime downloads or archive extraction steps in the provided code. (The README shows user-directed curl/npx examples for manual installation, but those are optional user actions, not behavior of the skill itself.)
Credentials
The skill requires no declared environment variables or credentials. It may read an optional OPENCLAW_HOME environment variable as a fallback when discovering files (liveDashboard uses process.env.OPENCLAW_HOME). This is reasonable and proportional, but users should be aware the tool will read filesystem locations in the user's home directory (e.g., ~/.openclaw and ~/clawd).
Persistence & Privilege
The skill is not always-enabled and does not request persistent system privileges. It writes only when the user passes --md (writes a markdown report to the current working directory or --out path). The live dashboard opens file watchers while running but does not change other skills' configs or system settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawculator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawculator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.1
clawculator 1.2.1 - Updated snapshotCard.js - No user-facing changes documented - Maintenance update, no impact on usage or features
v1.2.0
- Improved snapshot card output in snapshotCard.js. - Enhances clarity and readability of the grade display for sharing and screenshots.
v1.0.9
clawculator v1.0.9 - Added interactive dashboard and shareable cost grade card features (`--snapshot` flag, terminal card output). - New dashboard files: `liveDashboard.js`, `snapshotCard.js`, and `webDashboard.js`. - Expanded usage: new trigger phrases for grade/snapshot output and updated documentation. - Internal code updates to support new flags and terminal report generation.
v1.1.0
No user-facing changes detected in this version.
v1.0.8
clawculator 1.0.8 - Updated htmlReport.js and mdReport.js (details not specified). - No user-facing changes described in the provided SKILL.md.
v1.0.7
clawculator 1.0.7 - Updated analyzer.js, htmlReport.js, and reporter.js with improvements. - No user-facing changes in the SKILL.md file. - Internal logic and/or reporting may be enhanced or stabilized.
v1.0.6
- Improved documentation in README.md and SKILL.md for clarity and completeness. - Internal code updates to analyzer.js and htmlReport.js for enhanced reporting and analysis accuracy. - No changes to usage, output, or runtime requirements.
v1.0.5
- Added HTML report generation support via the new htmlReport.js file and a new --report flag. - Introduced README.md for documentation. - Simplified file writing rules: now only writes markdown reports with --md and HTML with --report; removed shell/spawn behavior for opening files. - Updated SKILL.md: clarified file access, removed mention of shell commands/network access, and detailed the new flag usage. - Minor code and flag usage updates in analyzer.js, mdReport.js, reporter.js, and run.js.
v1.0.3
- Updated SKILL.md to clarify which files are read and written, including temporary log directories and output report files. - Added details on session key truncation for privacy in all outputs. - Clarified `--report` behavior: HTML is opened locally and never makes network calls. - Improved flag descriptions for report output and custom paths. - mdReport.js and reporter.js updated to match new file-reading/writing behaviors.
v1.0.2
- All source code is now bundled directly in the skill folder; nothing is fetched at runtime. - Skill only reads specific OpenClaw config, session, and workspace directories (never writes or makes network calls). - Updated install and runtime instructions: runs via node with local entry point. - Improved description and documentation for transparency and detailed file access. - Added analyzer.js, mdReport.js, reporter.js, and run.js to implement fully local analysis.
v1.0.1
Version 1.0.1 - No file changes detected in this release. - No user-facing changes.
v1.0.0
Initial release of clawculator. - Analyze your OpenClaw setup for cost inefficiencies and potential billing issues. - Detects heartbeat on paid models, unnecessary polling, WhatsApp group auto-joins, orphaned sessions, workspace bloat, and more. - Delivers a detailed report with fix recommendations using deterministic offline logic—no AI, no data leaves your device. - Supports output in Markdown, JSON, or via an HTML dashboard. - User-invocable via natural language commands like "check my costs" or "cost report."
元数据
Slug clawculator
版本 1.2.1
许可证
累计安装 0
当前安装数 0
历史版本数 12
常见问题

Clawculator 是什么?

Analyze OpenClaw costs and detect billing issues. Source code is fully bundled — nothing is fetched at runtime. Requires only the node binary. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 496 次。

如何安装 Clawculator?

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

Clawculator 是免费的吗?

是的,Clawculator 完全免费(开源免费),可自由下载、安装和使用。

Clawculator 支持哪些平台?

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

谁开发了 Clawculator?

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

💬 留言讨论