Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

costclawcostclaw 分析

Agent Skill

costclaw 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,651

周安装

190

GitHub Stars

公开资料未说明

下载量

1,505
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:costclaw(costclaw 分析)
来源仓库:https://github.com/morpheis/costclaw
安装命令:
openclaw skills install costclaw
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install costclaw

简介

costclaw是OpenClaw的零设置令牌成本分析器,可快速获得优化成本的准确金额报告。

  • 适合需要分析AI模型调用成本的场景,提供详细的成本排名数据。
  • 无需Python依赖项,通过简单命令即可获取成本分析结果。
  • 使用前需确认是否具备足够的API访问权限和网络连接能力。
  • 建议结合具体使用场景核对成本计算模型的准确性。

SKILL.md

name
costclaw
version
0.2.0
description
>
license
MIT
compatibility
OpenClaw v2026.2+
metadata
author
ClawdActual
homepage
https://github.com/Morpheis/costclaw
category
optimization
tags
[cost, tokens, optimization, budget, savings, billing]

CostClaw — Token Usage Optimizer

One command. Zero setup. Real dollar amounts.

Most OpenClaw users overpay by 50-90%. CostClaw reads your actual config and workspace, then tells you exactly what to change and how much you'll save.

Why CostClaw vs Alternatives?

FeatureCostClawOthers
Zero setup✅ Just run it❌ Install Python scripts, configure integration
Reads YOUR config✅ Actual gateway config + workspace❌ Generic advice
Dollar amounts per file✅ "$TOOLS.md costs $4.20/mo"❌ "Consider trimming"
Priority ranking✅ Top actions by savings❌ Unranked checklist
Before/after estimate✅ Current vs optimized cost❌ Percentage ranges
Single command./scripts/analyze.sh❌ 4+ scripts to learn

Usage

As an Agent (Recommended)

When the user asks about costs, the agent should:

  1. Run the analyzer script:
   bash scripts/analyze.sh [workspace_path]

Default workspace: current directory. Pass explicit path if needed.

  1. For JSON output (machine-readable):
   bash scripts/analyze.sh [workspace_path] json
  1. Present findings using the report output — prioritized recommendations with dollar amounts.

Trigger Phrases

Activate this skill when users say anything like:

  • "How much am I spending on tokens?"
  • "Why is my API bill so high?"
  • "Optimize my costs" / "Help me save money"
  • "Run a cost audit"
  • "Is my setup efficient?"

What the Analyzer Checks

  1. Workspace files — Size of every .md file injected per turn, with per-file monthly cost
  2. Installed skills — Count and estimated token overhead from skill descriptions
  3. Model pricing — Current cost based on detected/configured default model
  4. Heartbeat impact — Cost of heartbeat polling at current interval
  5. Context injection total — Sum of all per-turn token overhead

Reading the Report

The report has 5 sections:

  1. 📁 Workspace Files — Each file with size, estimated tokens, and monthly cost. Flagged: ⚠ LARGE (>10K tokens), ⚡ MEDIUM (>5K tokens), ✓ OK.
  1. 🔧 Skills — Count of installed skills and their aggregate token cost.
  1. ⚙️ Model & Config — Detected default model and its pricing tier.
  1. 💰 Cost Summary — Daily and monthly estimates based on actual workspace + assumed turns/day.
  1. 📋 Ranked Recommendations — Prioritized by monthly savings. Each recommendation includes:

- What to change - Why it saves money - Estimated monthly savings in dollars - How to implement it

Agent Actions After Analysis

Based on findings, the agent should:

  • For oversized files (>10K tokens): Offer to trim them — move rarely-used sections to memory/ files, archive old content
  • For model routing: Suggest config changes for heartbeat/cron model overrides
  • For skill bloat: Identify unused skills and offer to disable them
  • For heartbeat frequency: Calculate optimal interval considering cache TTL

Pricing Reference (March 2026)

The analyzer uses these rates. Update scripts/pricing.env to override.

ProviderModelInput $/MTokOutput $/MTokCache ReadCache Write
AnthropicClaude Opus 4$15.00$75.00$1.875$18.75
AnthropicClaude Sonnet 4.5$3.00$15.00$0.30$3.75
AnthropicClaude Haiku 4$0.80$4.00$0.08$1.00
OpenAIGPT-4.1$2.00$8.00$0.50
OpenAIGPT-4.1 mini$0.40$1.60$0.10
OpenAIo3$2.00$8.00
OpenAIo4-mini$1.10$4.40
GoogleGemini 2.5 Pro$1.25$10.00
GoogleGemini 2.5 Flash$0.15$0.60

Key Optimization Patterns

1. Workspace File Trimming (Biggest Win)

Most agents load 30-80K tokens of workspace files every turn. Trimming to essentials saves 50-80% of input costs.

2. Model Routing for Background Tasks

Heartbeats and cron jobs don't need Opus. Route to Haiku/Flash for 10-20x savings on background work.

3. Heartbeat Cache Alignment

Set heartbeat interval to 55 minutes (just under Anthropic's 1h cache TTL). Keeps cache warm = cache-read rates instead of cache-write rates.

4. Lazy Skill Loading

Each skill description adds ~200-500 tokens to system prompt. 20 skills = 4-10K extra tokens/turn. Consider a skill index that loads on-demand.

5. Context Pruning

Enable compaction.mode: aggressive with maxTokens: 8000 to auto-trim conversation history.

Privacy

All analysis runs locally. No data leaves your machine. No API calls for the audit.


🦞 CostClaw Pro — Deep Optimization Package

The free analyzer gives you a ranked report. CostClaw Pro gives you the tools to automate savings:

  • Session Cost Tracking — Log per-session token costs to JSONL for historical analysis
  • Spend Alerts — Configurable daily spend thresholds with notifications
  • Automated Config Patches — One-command config optimization with dry-run mode
  • Cost History Viewer — Historical trend analysis with stats
  • Pre-built Routing Configs — Optimal, balanced, and aggressive-savings model routing templates
  • 5,600+ Word Optimization Guide — Every pattern explained with implementation details
  • Full Model Comparison Matrix — Pricing, performance, and recommendations for every major provider

Get CostClaw Pro: https://buy.polar.sh/polar_cl_qKdQKVcwHd4TUo8jXWrDoZyjHZm3rSciMyVCG00EJlO

Storefront: https://polar.sh/morpheis


Author: ClawdActual (@clawdactual) License: MIT

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.25%
按下载量换算1,057

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills