← 返回 Skills 市场
srikanth235

GreenClaw

作者 srikanth235 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
256
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install greenclaw
功能描述
Token usage analytics and budget alerting for the GreenClaw inference proxy. Query spending, set budget alerts, and track savings.
使用说明 (SKILL.md)

GreenClaw Usage Analytics

You have access to the greenclaw CLI tool for querying token usage, cost analytics, and managing budget alerts. Run it via npx greenclaw (requires pnpm install and pnpm build first). All commands output JSON.

Available Commands

Usage Queries

Daily summary:

 npx greenclaw usage summary --period day

Weekly or monthly summary:

 npx greenclaw usage summary --period week
 npx greenclaw usage summary --period month

Breakdown by model, tier, or provider:

 npx greenclaw usage breakdown --by model --period day
 npx greenclaw usage breakdown --by tier --period week
 npx greenclaw usage breakdown --by provider --period month

Trends over time:

 npx greenclaw usage trends --period day --last 7
 npx greenclaw usage trends --period week --last 4

Budget Alerts

List alert rules:

 npx greenclaw alerts list

Set a daily cost budget:

 npx greenclaw alerts set --name "daily budget" --metric daily_cost --threshold 50 --unit usd --period day

Set a weekly token limit:

 npx greenclaw alerts set --name "weekly tokens" --metric weekly_cost --threshold 100 --unit usd --period week

Set a per-model cost cap:

 npx greenclaw alerts set --name "gpt-4 cap" --metric per_model_cost --threshold 30 --unit usd --period day --model gpt-4

Check alerts now:

 npx greenclaw alerts check

View alert history:

 npx greenclaw alerts history --last 10

Remove an alert rule:

 npx greenclaw alerts remove \x3Crule-id>

Raw Traces

Aggregated stats:

 npx greenclaw traces --stats

Filter by tier or model:

 npx greenclaw traces --tier HEARTBEAT
 npx greenclaw traces --model gpt-4o-mini

How to Present Results

  • Parse the JSON output and present it in a clear, readable format
  • For summaries: show total tokens, cost, savings, and request count
  • For breakdowns: show a table with group key, tokens, cost, savings
  • For alerts: explain which rules triggered and current metric values
  • Round dollar amounts to 2 decimal places
  • Use natural language to explain savings (e.g., "You saved $8.91 today by routing 412 requests through cheaper models")

Environment

The greenclaw CLI uses the GREENCLAW_TELEMETRY_DB environment variable for the SQLite database path (defaults to data/telemetry.db).

安全使用建议
This skill appears to do what it claims (usage analytics) but the SKILL.md and registry metadata don't match in important ways. Before installing or running it: 1) Ask the publisher for the package source (npm package name, homepage, or GitHub repo) and verify the package and its maintainers. 2) Don't run 'npx pnpm install' or 'npx greenclaw' on important hosts without inspecting the package first—npx/pnpm will fetch and run code (including build scripts). Prefer to inspect the package source, audit its install scripts, or run it in an isolated container. 3) Be aware the tool reads a SQLite telemetry DB (GREENCLAW_TELEMETRY_DB / data/telemetry.db); ensure that database doesn't contain secrets you don't want exposed and consider pointing the tool to a copy or a restricted path. 4) Ask the author to update the registry metadata to declare required binaries (node, npm, npx, pnpm) and any environment variables/config paths and to provide a verified homepage or repository. If you cannot verify provenance, treat this skill as potentially risky and run it only in a sandbox.
功能分析
Type: OpenClaw Skill Name: greenclaw Version: 1.0.0 The skill bundle provides instructions for an AI agent to use a CLI tool called `greenclaw` for monitoring token usage, cost analytics, and budget management. The instructions in SKILL.md are consistent with the stated purpose of the tool, involving standard CLI commands for querying a local SQLite database (defaulting to data/telemetry.db) and presenting JSON results to the user. No malicious patterns such as data exfiltration, unauthorized network access, or obfuscated code were found.
能力评估
Purpose & Capability
The SKILL.md describes token usage analytics, budget alerts, and traces for a GreenClaw inference proxy — that matches the skill name and description. Nothing in the instructions obviously tries to do unrelated actions (no cloud credential requests or unrelated remote services).
Instruction Scope
The runtime instructions tell the agent to run 'npx greenclaw' (after 'pnpm install' and 'pnpm build') and to read/use a local SQLite DB (GREENCLAW_TELEMETRY_DB, default data/telemetry.db). The registry metadata declared no env vars or config paths, but the SKILL.md references an environment variable and a local DB path. The instructions also implicitly require Node/npm/pnpm/npx to be present; those required binaries are not declared. Running npx/pnpm can fetch and execute arbitrary code from the npm registry and run package build scripts, which expands the runtime scope beyond simple CLI use.
Install Mechanism
There is no install spec in the registry metadata, yet SKILL.md expects to install and run a package via pnpm/npx. That means the agent (or user) will fetch code from the npm registry at runtime with no vendoring, checksum, or provenance declared — moderate-to-high operational risk if the package or its dependencies are malicious or compromised.
Credentials
The skill declares no required environment variables or credentials, but the instructions reference GREENCLAW_TELEMETRY_DB for the SQLite path and default to data/telemetry.db. This is an undeclared data/config access requirement. The skill also implicitly requires Node/npm/pnpm tooling (binaries) which are not declared. Asking the agent to read a local telemetry DB can expose sensitive usage data; the absence of explicit env/config declarations is a proportionality mismatch.
Persistence & Privilege
The skill is instruction-only and not marked 'always:true'. It does not request persistent presence or modify other skills' configs. Autonomous model invocation remains allowed (platform default) but is not combined with other high-privilege flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install greenclaw
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /greenclaw 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of greenclaw-usage: - Provides token usage analytics and budget alerting for the GreenClaw inference proxy. - Includes CLI commands to query usage summaries, breakdowns, and trends. - Enables setting and managing budget alerts for costs and token usage, with support for per-model alerts. - Allows viewing raw trace statistics filtered by tier or model. - Guides on presenting analytics data and savings in readable formats. - Uses an environment variable for database configuration.
元数据
Slug greenclaw
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

GreenClaw 是什么?

Token usage analytics and budget alerting for the GreenClaw inference proxy. Query spending, set budget alerts, and track savings. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 256 次。

如何安装 GreenClaw?

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

GreenClaw 是免费的吗?

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

GreenClaw 支持哪些平台?

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

谁开发了 GreenClaw?

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

💬 留言讨论