{
  "schemaVersion": "1.0",
  "item": {
    "slug": "costlens",
    "name": "CostLens",
    "source": "tencent",
    "type": "skill",
    "category": "其他",
    "sourceUrl": "https://clawhub.ai/mike007jd/costlens",
    "canonicalUrl": "https://clawhub.ai/mike007jd/costlens",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/costlens",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=costlens",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "bin/costlens.js",
      "fixtures/events.json",
      "package.json",
      "src/index.js",
      "test.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/costlens"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/costlens",
    "agentPageUrl": "https://openagent3.xyz/skills/costlens/agent",
    "manifestUrl": "https://openagent3.xyz/skills/costlens/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/costlens/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "CostLens",
        "body": "OpenClaw 成本和 Token 使用监控工具。"
      },
      {
        "title": "功能",
        "body": "monitor: 实时监控成本和预算状态\nreport: 导出成本报表\nbudget check: 预算检查，超支时返回非零退出码"
      },
      {
        "title": "支持模型费率",
        "body": "模型Input/1kOutput/1kgpt-4.1$0.01$0.03gpt-4o-mini$0.00015$0.0006claude-3-5-sonnet$0.003$0.015default$0.002$0.008\n\n事件可覆盖默认费率：inputCostPer1k, outputCostPer1k"
      },
      {
        "title": "事件格式",
        "body": "[\n  {\n    \"model\": \"gpt-4.1\",\n    \"promptTokens\": 1500,\n    \"completionTokens\": 800,\n    \"timestamp\": \"2026-02-26T10:00:00Z\"\n  }\n]"
      },
      {
        "title": "用法",
        "body": "# 监控（表格输出）\nnode bin/costlens.js monitor --events ./events.json --budget 10.00 --threshold 80\n\n# 预算检查（超支时退出码 2）\nnode bin/costlens.js budget check --events ./events.json --budget 5.00 --format json\n\n# 导出报表\nnode bin/costlens.js report --events ./events.json --out ./reports/cost-report.json"
      },
      {
        "title": "输出字段",
        "body": "总调用次数、总 Token 数、总成本\n按模型分组（调用次数、Token、成本）\n按天分组的成本趋势\n预算使用率、告警级别（ok/warning/critical）"
      }
    ],
    "body": "CostLens\n\nOpenClaw 成本和 Token 使用监控工具。\n\n功能\nmonitor: 实时监控成本和预算状态\nreport: 导出成本报表\nbudget check: 预算检查，超支时返回非零退出码\n支持模型费率\n模型\tInput/1k\tOutput/1k\ngpt-4.1\t$0.01\t$0.03\ngpt-4o-mini\t$0.00015\t$0.0006\nclaude-3-5-sonnet\t$0.003\t$0.015\ndefault\t$0.002\t$0.008\n\n事件可覆盖默认费率：inputCostPer1k, outputCostPer1k\n\n事件格式\n[\n  {\n    \"model\": \"gpt-4.1\",\n    \"promptTokens\": 1500,\n    \"completionTokens\": 800,\n    \"timestamp\": \"2026-02-26T10:00:00Z\"\n  }\n]\n\n用法\n# 监控（表格输出）\nnode bin/costlens.js monitor --events ./events.json --budget 10.00 --threshold 80\n\n# 预算检查（超支时退出码 2）\nnode bin/costlens.js budget check --events ./events.json --budget 5.00 --format json\n\n# 导出报表\nnode bin/costlens.js report --events ./events.json --out ./reports/cost-report.json\n\n输出字段\n总调用次数、总 Token 数、总成本\n按模型分组（调用次数、Token、成本）\n按天分组的成本趋势\n预算使用率、告警级别（ok/warning/critical）"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mike007jd/costlens",
    "publisherUrl": "https://clawhub.ai/mike007jd/costlens",
    "owner": "mike007jd",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/costlens",
    "downloadUrl": "https://openagent3.xyz/downloads/costlens",
    "agentUrl": "https://openagent3.xyz/skills/costlens/agent",
    "manifestUrl": "https://openagent3.xyz/skills/costlens/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/costlens/agent.md"
  }
}