{"id":"710950e3-2489-4223-81b6-2f4e75d21fe2","entityType":"agent","slug":"clawhub-oldyoungcn-openclaw-token-monitor","name":"OpenClaw Token Monitor","canonicalUrl":"https://www.xpersona.co/agent/clawhub-oldyoungcn-openclaw-token-monitor","canonicalPath":"/agent/clawhub-oldyoungcn-openclaw-token-monitor","generatedAt":"2026-10-14T02:34:57.273Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T21:45:28.880Z","emptyReason":null},"description":"OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场... Skill: OpenClaw Token Monitor Owner: oldyoungcn Summary: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场... Tags: analytics:1.0.0, latest:1.2.0, monitor:1.0.0, openclaw:1.0.0, token:1.0.0 Version history: v1.2.0 | 2026-04-17T08:34:45.589Z | auto Version 1.2.0 introduces new updates and improvements: - Bumped","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 989 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17e65t4ggd677ty7kkatxvng583t6zf:openclaw-token-monitor","sourceUrl":"https://clawhub.ai/oldyoungcn/openclaw-token-monitor","homepage":"https://clawhub.ai/oldyoungcn/skills/openclaw-token-monitor","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/oldyoungcn/openclaw-token-monitor","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/oldyoungcn/skills/openclaw-token-monitor","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:45:28.880Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:45:28.880Z","emptyReason":null},"stars":null,"forks":null,"downloads":989,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.2.0","tractionLabel":"989 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:45:28.868Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T21:45:28.880Z","lastCrawledAt":"2026-10-11T21:45:28.868Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T21:45:28.868Z","lastVerifiedAt":null,"highlights":[{"version":"1.2.0","createdAt":"2026-04-17T08:34:45.589Z","changelog":"Version 1.2.0 introduces new updates and improvements: - Bumped version from 1.1.1 to 1.2.0. - Updated SKILL.md metadata to reflect new version. - Made changes to server and frontend scripts (token-monitor.js, token-monitor.html). - Updated package.json for versioning and possible dependency adjustments.","fileCount":6,"zipByteSize":24622},{"version":"1.1.1","createdAt":"2026-04-17T03:37:18.874Z","changelog":"v1.1.1: fix IIFE scope bug, date-display stuck, cost ¥153m→¥0.15","fileCount":5,"zipByteSize":18732},{"version":"1.1.0","createdAt":"2026-04-17T03:01:15.707Z","changelog":"Version 1.1.0 - Bumped version to 1.1.0 in SKILL.md and package.json. - No functional changes documented in SKILL.md.","fileCount":5,"zipByteSize":18733},{"version":"1.0.0","createdAt":"2026-04-17T01:51:55.602Z","changelog":"OpenClaw Token Monitor v1.0.0 — 实时 Token 消耗与历史数据分析中心 - 新增 SQLite 持久化存储，消耗历史数据不丢失 - 实时监控 Token 消耗与速率，每 3 秒自动更新 - 支持按日、按小时查看历史消耗趋势和会话详情 - 基于 MiniMax 定价，自动估算人民币消耗 - 可通过滚轮缩放图表 X 轴、防卡顿采样展示 - 环形图显示会话占比，支持一键导出 PNG 图表","fileCount":5,"zipByteSize":18727}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17e65t4ggd677ty7kkatxvng583t6zf:openclaw-token-monitor","setupComplexity":"low","setupSteps":["Node.js workspace detected. Install dependencies securely: run `npm ci --ignore-scripts` to prevent post-install lifecycle triggers from running arbitrary code, then selectively audit the dependency tree.","Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-14T02:34:57.273Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-oldyoungcn-openclaw-token-monitor/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T21:45:28.880Z","emptyReason":null},"readme":"Skill: OpenClaw Token Monitor\n\nOwner: oldyoungcn\n\nSummary: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场...\n\nTags: analytics:1.0.0, latest:1.2.0, monitor:1.0.0, openclaw:1.0.0, token:1.0.0\n\nVersion history:\n\nv1.2.0 | 2026-04-17T08:34:45.589Z | auto\n\nVersion 1.2.0 introduces new updates and improvements:\n\n- Bumped version from 1.1.1 to 1.2.0.\n- Updated SKILL.md metadata to reflect new version.\n- Made changes to server and frontend scripts (token-monitor.js, token-monitor.html).\n- Updated package.json for versioning and possible dependency adjustments.\n\nv1.1.1 | 2026-04-17T03:37:18.874Z | user\n\nv1.1.1: fix IIFE scope bug, date-display stuck, cost ¥153m→¥0.15\n\nv1.1.0 | 2026-04-17T03:01:15.707Z | auto\n\nVersion 1.1.0\n\n- Bumped version to 1.1.0 in SKILL.md and package.json.\n- No functional changes documented in SKILL.md.\n\nv1.0.0 | 2026-04-17T01:51:55.602Z | auto\n\nOpenClaw Token Monitor v1.0.0 — 实时 Token 消耗与历史数据分析中心\n\n- 新增 SQLite 持久化存储，消耗历史数据不丢失\n- 实时监控 Token 消耗与速率，每 3 秒自动更新\n- 支持按日、按小时查看历史消耗趋势和会话详情\n- 基于 MiniMax 定价，自动估算人民币消耗\n- 可通过滚轮缩放图表 X 轴、防卡顿采样展示\n- 环形图显示会话占比，支持一键导出 PNG 图表\n\nArchive index:\n\nArchive v1.2.0: 6 files, 24622 bytes\n\nFiles: package.json (425b), scripts/token-monitor.html (58355b), scripts/token-monitor.js (19646b), skill-card.md (2429b), SKILL.md (2531b), _meta.json (141b)\n\nFile v1.2.0:SKILL.md\n\n---\nname: token-monitor\ndescription: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场景：(1) 用户要求查看 Token 消耗 (2) 监控 AI 模型使用量 (3) 分析日/小时级别消耗趋势 (4) 排查 Token 异常消耗。\nauthor: OldYoung\nemail: ericyang81@gmail.com\nversion: 1.2.0\ntags: latest\n---\n\n# OpenClaw Token 监控中心\n\n## 快速开始\n\n```bash\n# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000\n```\n\n## 功能一览\n\n| 模块 | 说明 |\n|------|------|\n| 📊 **实时曲线** | 每 3 秒轮询，蓝线显示每次轮询的 Token 增量，橙线显示速率 (tokens/s) |\n| 📈 **历史视图** | 点 ← → 或日期下拉，查看任意一天的完整消耗曲线 |\n| 🏺 **SQLite 持久化** | 数据写入 `/workspace/data/token_history.db`，刷新页面不丢失 |\n| 💰 **人民币估算** | 基于 MiniMax 官方定价（输入 ¥2.1/百万，输出 ¥8.4/百万） |\n| 📋 **会话详情表** | 每会话 Input/Output/Total Tokens、费用、占比条 |\n| 🍩 **环形图** | 各会话 Token 消耗占比分布 |\n| 🔍 **滚轮缩放** | 鼠标在图表上滚轮可放大/缩小 X 轴 |\n| 📷 **导出图片** | 点击\"📷 导出图表\"下载 PNG |\n\n## 数据存储\n\n- **数据库**: `data/token_history.db`（SQLite）\n- **表**: `snapshots`（每次轮询各会话明细）、`rate_history`（每次轮询速率）、`daily_summary`（每日汇总）\n- **轮询间隔**: 3 秒（可在页面顶部调整）\n- **保留策略**: 永久保留，按日期查询\n\n## 技术细节\n\n- **服务器**: `token-monitor.js`（Node.js，端口 3000）\n- **前端**: `token-monitor.html`（Chart.js + chartjs-plugin-zoom，纯前端无需构建）\n- **数据库**: sql.js（WASM 版本，无需本地 SQLite 编译）\n- **API**: `/data`（实时快照）、`/api/daily?date=YYYY-MM-DD`（历史数据）、`/api/dates`（可用日期列表）\n- **依赖**: `openclaw sessions --active --json`（数据来源）\n\n## 目录结构\n\n```\nskills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘\n```\n\nFile v1.2.0:_meta.json\n\n{\n  \"ownerId\": \"kn7bgd4p01x4sjnysfm79rj07x82sfz1\",\n  \"slug\": \"openclaw-token-monitor\",\n  \"version\": \"1.2.0\",\n  \"publishedAt\": 1776414885589\n}\n\nFile v1.2.0:skill-card.md\n\n## Description:\n\nOpenClaw Token Monitor provides a local dashboard for tracking active OpenClaw token usage, SQLite-backed history, session summaries, token-rate trends, and CNY cost estimates.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[oldyoungcn](https://clawhub.ai/user/oldyoungcn)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to inspect OpenClaw token consumption, review daily or hourly usage trends, and investigate unusual token spend across active sessions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The dashboard can expose detailed session telemetry through an unauthenticated local network service.\n\nMitigation: Bind the service to localhost before use on shared or reachable networks and add authentication if remote access is required.\n\nRisk: Wildcard CORS and insufficient API input validation can broaden access to telemetry endpoints.\n\nMitigation: Remove wildcard CORS and validate API inputs, including date and polling parameters.\n\nRisk: Session-level token history is persisted locally and may retain sensitive usage metadata longer than intended.\n\nMitigation: Define a retention policy for the SQLite history database and clear or rotate stored telemetry when it is no longer needed.\n\nRisk: Rendering session data with innerHTML can create web UI exposure if session fields contain unexpected content.\n\nMitigation: Render session data with text-safe DOM APIs or sanitize values before insertion into the page.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/oldyoungcn/skills/openclaw-token-monitor)\n- [Publisher profile](https://clawhub.ai/user/oldyoungcn)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline shell commands and dashboard usage guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [The skill starts or explains a local Node dashboard that serves token telemetry and stores history in SQLite.]\n\n## Skill Version(s):\n\n1.2.0 (source: frontmatter, package.json, server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.2.0:package.json\n\n{\n  \"name\": \"token-monitor\",\n  \"version\": \"1.2.0\",\n  \"description\": \"OpenClaw Token \\u5b9e\\u65f6\\u76d1\\u63a7\\u9762\\u677f - SQLite \\u6301\\u4e45\\u5316\\u3001\\u5b9e\\u65f6\\u66f2\\u7ebf\\u3001\\u5386\\u53f2\\u89c6\\u56fe\\u3001\\u4eba\\u6c11\\u5e01\\u8d39\\u7528\\u4f30\\u7b97\",\n  \"author\": \"OldYoung <ericyang81@gmail.com>\",\n  \"main\": \"scripts/token-monitor.js\",\n  \"keywords\": [\n    \"openclaw\",\n    \"token\",\n    \"monitor\",\n    \"analytics\"\n  ]\n}\n\nArchive v1.1.1: 5 files, 18732 bytes\n\nFiles: package.json (425b), scripts/token-monitor.html (46444b), scripts/token-monitor.js (16905b), SKILL.md (2531b), _meta.json (141b)\n\nFile v1.1.1:SKILL.md\n\n---\nname: token-monitor\ndescription: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场景：(1) 用户要求查看 Token 消耗 (2) 监控 AI 模型使用量 (3) 分析日/小时级别消耗趋势 (4) 排查 Token 异常消耗。\nauthor: OldYoung\nemail: ericyang81@gmail.com\nversion: 1.1.1\ntags: latest\n---\n\n# OpenClaw Token 监控中心\n\n## 快速开始\n\n```bash\n# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000\n```\n\n## 功能一览\n\n| 模块 | 说明 |\n|------|------|\n| 📊 **实时曲线** | 每 3 秒轮询，蓝线显示每次轮询的 Token 增量，橙线显示速率 (tokens/s) |\n| 📈 **历史视图** | 点 ← → 或日期下拉，查看任意一天的完整消耗曲线 |\n| 🏺 **SQLite 持久化** | 数据写入 `/workspace/data/token_history.db`，刷新页面不丢失 |\n| 💰 **人民币估算** | 基于 MiniMax 官方定价（输入 ¥2.1/百万，输出 ¥8.4/百万） |\n| 📋 **会话详情表** | 每会话 Input/Output/Total Tokens、费用、占比条 |\n| 🍩 **环形图** | 各会话 Token 消耗占比分布 |\n| 🔍 **滚轮缩放** | 鼠标在图表上滚轮可放大/缩小 X 轴 |\n| 📷 **导出图片** | 点击\"📷 导出图表\"下载 PNG |\n\n## 数据存储\n\n- **数据库**: `data/token_history.db`（SQLite）\n- **表**: `snapshots`（每次轮询各会话明细）、`rate_history`（每次轮询速率）、`daily_summary`（每日汇总）\n- **轮询间隔**: 3 秒（可在页面顶部调整）\n- **保留策略**: 永久保留，按日期查询\n\n## 技术细节\n\n- **服务器**: `token-monitor.js`（Node.js，端口 3000）\n- **前端**: `token-monitor.html`（Chart.js + chartjs-plugin-zoom，纯前端无需构建）\n- **数据库**: sql.js（WASM 版本，无需本地 SQLite 编译）\n- **API**: `/data`（实时快照）、`/api/daily?date=YYYY-MM-DD`（历史数据）、`/api/dates`（可用日期列表）\n- **依赖**: `openclaw sessions --active --json`（数据来源）\n\n## 目录结构\n\n```\nskills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘\n```\n\nFile v1.1.1:_meta.json\n\n{\n  \"ownerId\": \"kn7bgd4p01x4sjnysfm79rj07x82sfz1\",\n  \"slug\": \"openclaw-token-monitor\",\n  \"version\": \"1.1.1\",\n  \"publishedAt\": 1776397038874\n}\n\nFile v1.1.1:package.json\n\n{\n  \"name\": \"token-monitor\",\n  \"version\": \"1.1.1\",\n  \"description\": \"OpenClaw Token \\u5b9e\\u65f6\\u76d1\\u63a7\\u9762\\u677f - SQLite \\u6301\\u4e45\\u5316\\u3001\\u5b9e\\u65f6\\u66f2\\u7ebf\\u3001\\u5386\\u53f2\\u89c6\\u56fe\\u3001\\u4eba\\u6c11\\u5e01\\u8d39\\u7528\\u4f30\\u7b97\",\n  \"author\": \"OldYoung <ericyang81@gmail.com>\",\n  \"main\": \"scripts/token-monitor.js\",\n  \"keywords\": [\n    \"openclaw\",\n    \"token\",\n    \"monitor\",\n    \"analytics\"\n  ]\n}\n\nArchive v1.1.0: 5 files, 18733 bytes\n\nFiles: package.json (425b), scripts/token-monitor.html (46444b), scripts/token-monitor.js (16905b), SKILL.md (2531b), _meta.json (141b)\n\nFile v1.1.0:SKILL.md\n\n---\nname: token-monitor\ndescription: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场景：(1) 用户要求查看 Token 消耗 (2) 监控 AI 模型使用量 (3) 分析日/小时级别消耗趋势 (4) 排查 Token 异常消耗。\nauthor: OldYoung\nemail: ericyang81@gmail.com\nversion: 1.1.0\ntags: latest\n---\n\n# OpenClaw Token 监控中心\n\n## 快速开始\n\n```bash\n# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000\n```\n\n## 功能一览\n\n| 模块 | 说明 |\n|------|------|\n| 📊 **实时曲线** | 每 3 秒轮询，蓝线显示每次轮询的 Token 增量，橙线显示速率 (tokens/s) |\n| 📈 **历史视图** | 点 ← → 或日期下拉，查看任意一天的完整消耗曲线 |\n| 🏺 **SQLite 持久化** | 数据写入 `/workspace/data/token_history.db`，刷新页面不丢失 |\n| 💰 **人民币估算** | 基于 MiniMax 官方定价（输入 ¥2.1/百万，输出 ¥8.4/百万） |\n| 📋 **会话详情表** | 每会话 Input/Output/Total Tokens、费用、占比条 |\n| 🍩 **环形图** | 各会话 Token 消耗占比分布 |\n| 🔍 **滚轮缩放** | 鼠标在图表上滚轮可放大/缩小 X 轴 |\n| 📷 **导出图片** | 点击\"📷 导出图表\"下载 PNG |\n\n## 数据存储\n\n- **数据库**: `data/token_history.db`（SQLite）\n- **表**: `snapshots`（每次轮询各会话明细）、`rate_history`（每次轮询速率）、`daily_summary`（每日汇总）\n- **轮询间隔**: 3 秒（可在页面顶部调整）\n- **保留策略**: 永久保留，按日期查询\n\n## 技术细节\n\n- **服务器**: `token-monitor.js`（Node.js，端口 3000）\n- **前端**: `token-monitor.html`（Chart.js + chartjs-plugin-zoom，纯前端无需构建）\n- **数据库**: sql.js（WASM 版本，无需本地 SQLite 编译）\n- **API**: `/data`（实时快照）、`/api/daily?date=YYYY-MM-DD`（历史数据）、`/api/dates`（可用日期列表）\n- **依赖**: `openclaw sessions --active --json`（数据来源）\n\n## 目录结构\n\n```\nskills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘\n```\n\nFile v1.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7bgd4p01x4sjnysfm79rj07x82sfz1\",\n  \"slug\": \"openclaw-token-monitor\",\n  \"version\": \"1.1.0\",\n  \"publishedAt\": 1776394875707\n}\n\nFile v1.1.0:package.json\n\n{\n  \"name\": \"token-monitor\",\n  \"version\": \"1.1.0\",\n  \"description\": \"OpenClaw Token \\u5b9e\\u65f6\\u76d1\\u63a7\\u9762\\u677f - SQLite \\u6301\\u4e45\\u5316\\u3001\\u5b9e\\u65f6\\u66f2\\u7ebf\\u3001\\u5386\\u53f2\\u89c6\\u56fe\\u3001\\u4eba\\u6c11\\u5e01\\u8d39\\u7528\\u4f30\\u7b97\",\n  \"author\": \"OldYoung <ericyang81@gmail.com>\",\n  \"main\": \"scripts/token-monitor.js\",\n  \"keywords\": [\n    \"openclaw\",\n    \"token\",\n    \"monitor\",\n    \"analytics\"\n  ]\n}\n\nArchive v1.0.0: 5 files, 18727 bytes\n\nFiles: package.json (325b), scripts/token-monitor.html (46444b), scripts/token-monitor.js (16905b), SKILL.md (2531b), _meta.json (141b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: token-monitor\ndescription: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场景：(1) 用户要求查看 Token 消耗 (2) 监控 AI 模型使用量 (3) 分析日/小时级别消耗趋势 (4) 排查 Token 异常消耗。\nauthor: OldYoung\nemail: ericyang81@gmail.com\nversion: 1.0.0\ntags: latest\n---\n\n# OpenClaw Token 监控中心\n\n## 快速开始\n\n```bash\n# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000\n```\n\n## 功能一览\n\n| 模块 | 说明 |\n|------|------|\n| 📊 **实时曲线** | 每 3 秒轮询，蓝线显示每次轮询的 Token 增量，橙线显示速率 (tokens/s) |\n| 📈 **历史视图** | 点 ← → 或日期下拉，查看任意一天的完整消耗曲线 |\n| 🏺 **SQLite 持久化** | 数据写入 `/workspace/data/token_history.db`，刷新页面不丢失 |\n| 💰 **人民币估算** | 基于 MiniMax 官方定价（输入 ¥2.1/百万，输出 ¥8.4/百万） |\n| 📋 **会话详情表** | 每会话 Input/Output/Total Tokens、费用、占比条 |\n| 🍩 **环形图** | 各会话 Token 消耗占比分布 |\n| 🔍 **滚轮缩放** | 鼠标在图表上滚轮可放大/缩小 X 轴 |\n| 📷 **导出图片** | 点击\"📷 导出图表\"下载 PNG |\n\n## 数据存储\n\n- **数据库**: `data/token_history.db`（SQLite）\n- **表**: `snapshots`（每次轮询各会话明细）、`rate_history`（每次轮询速率）、`daily_summary`（每日汇总）\n- **轮询间隔**: 3 秒（可在页面顶部调整）\n- **保留策略**: 永久保留，按日期查询\n\n## 技术细节\n\n- **服务器**: `token-monitor.js`（Node.js，端口 3000）\n- **前端**: `token-monitor.html`（Chart.js + chartjs-plugin-zoom，纯前端无需构建）\n- **数据库**: sql.js（WASM 版本，无需本地 SQLite 编译）\n- **API**: `/data`（实时快照）、`/api/daily?date=YYYY-MM-DD`（历史数据）、`/api/dates`（可用日期列表）\n- **依赖**: `openclaw sessions --active --json`（数据来源）\n\n## 目录结构\n\n```\nskills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘\n```\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7bgd4p01x4sjnysfm79rj07x82sfz1\",\n  \"slug\": \"openclaw-token-monitor\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776390715602\n}\n\nFile v1.0.0:package.json\n\n{\n  \"name\": \"token-monitor\",\n  \"version\": \"1.0.0\",\n  \"description\": \"OpenClaw Token 实时监控面板 - SQLite 持久化、实时曲线、历史视图、人民币费用估算\",\n  \"author\": \"OldYoung <ericyang81@gmail.com>\",\n  \"main\": \"scripts/token-monitor.js\",\n  \"keywords\": [\"openclaw\", \"token\", \"monitor\", \"analytics\"]\n}","readmeExcerpt":"Skill: OpenClaw Token Monitor Owner: oldyoungcn Summary: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场... Tags: analytics:1.0.0, latest:1.2.0, monitor:1.0.0, openclaw:1.0.0, token:1.0.0 Version history: v1.2.0 | 2026-04-17T08:34:45.589Z | auto Version 1.2.0 introduces new updates and improvements: - Bumped ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000"},{"language":"text","snippet":"skills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘"},{"language":"bash","snippet":"# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000"},{"language":"text","snippet":"skills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘"},{"language":"bash","snippet":"# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000"},{"language":"text","snippet":"skills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: token-monitor\ndescription: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场景：(1) 用户要求查看 Token 消耗 (2) 监控 AI 模型使用量 (3) 分析日/小时级别消耗趋势 (4) 排查 Token 异常消耗。\nauthor: OldYoung\nemail: ericyang81@gmail.com\nversion: 1.2.0\ntags: latest\n---\n\n# OpenClaw Token 监控中心\n\n## 快速开始\n\n```bash\n# 启动监控服务\nnode skills/token-monitor/scripts/token-monitor.js\n\n# 访问面板\nopen http://192.168.50.210:3000\n```\n\n## 功能一览\n\n| 模块 | 说明 |\n|------|------|\n| 📊 **实时曲线** | 每 3 秒轮询，蓝线显示每次轮询的 Token 增量，橙线显示速率 (tokens/s) |\n| 📈 **历史视图** | 点 ← → 或日期下拉，查看任意一天的完整消耗曲线 |\n| 🏺 **SQLite 持久化** | 数据写入 `/workspace/data/token_history.db`，刷新页面不丢失 |\n| 💰 **人民币估算** | 基于 MiniMax 官方定价（输入 ¥2.1/百万，输出 ¥8.4/百万） |\n| 📋 **会话详情表** | 每会话 Input/Output/Total Tokens、费用、占比条 |\n| 🍩 **环形图** | 各会话 Token 消耗占比分布 |\n| 🔍 **滚轮缩放** | 鼠标在图表上滚轮可放大/缩小 X 轴 |\n| 📷 **导出图片** | 点击\"📷 导出图表\"下载 PNG |\n\n## 数据存储\n\n- **数据库**: `data/token_history.db`（SQLite）\n- **表**: `snapshots`（每次轮询各会话明细）、`rate_history`（每次轮询速率）、`daily_summary`（每日汇总）\n- **轮询间隔**: 3 秒（可在页面顶部调整）\n- **保留策略**: 永久保留，按日期查询\n\n## 技术细节\n\n- **服务器**: `token-monitor.js`（Node.js，端口 3000）\n- **前端**: `token-monitor.html`（Chart.js + chartjs-plugin-zoom，纯前端无需构建）\n- **数据库**: sql.js（WASM 版本，无需本地 SQLite 编译）\n- **API**: `/data`（实时快照）、`/api/daily?date=YYYY-MM-DD`（历史数据）、`/api/dates`（可用日期列表）\n- **依赖**: `openclaw sessions --active --json`（数据来源）\n\n## 目录结构\n\n```\nskills/token-monitor/\n├── SKILL.md          # 本文件\n├── package.json\n└── scripts/\n    ├── token-monitor.js   # 服务器（轮询 + SQLite + API）\n    └── token-monitor.html # 前端仪表盘\n```"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7bgd4p01x4sjnysfm79rj07x82sfz1\",\n  \"slug\": \"openclaw-token-monitor\",\n  \"version\": \"1.2.0\",\n  \"publishedAt\": 1776414885589\n}"},{"path":"skill-card.md","content":"## Description:\n\nOpenClaw Token Monitor provides a local dashboard for tracking active OpenClaw token usage, SQLite-backed history, session summaries, token-rate trends, and CNY cost estimates.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[oldyoungcn](https://clawhub.ai/user/oldyoungcn)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to inspect OpenClaw token consumption, review daily or hourly usage trends, and investigate unusual token spend across active sessions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The dashboard can expose detailed session telemetry through an unauthenticated local network service.\n\nMitigation: Bind the service to localhost before use on shared or reachable networks and add authentication if remote access is required.\n\nRisk: Wildcard CORS and insufficient API input validation can broaden access to telemetry endpoints.\n\nMitigation: Remove wildcard CORS and validate API inputs, including date and polling parameters.\n\nRisk: Session-level token history is persisted locally and may retain sensitive usage metadata longer than intended.\n\nMitigation: Define a retention policy for the SQLite history database and clear or rotate stored telemetry when it is no longer needed.\n\nRisk: Rendering session data with innerHTML can create web UI exposure if session fields contain unexpected content.\n\nMitigation: Render session data with text-safe DOM APIs or sanitize values before insertion into the page.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/oldyoungcn/skills/openclaw-token-monitor)\n- [Publisher profile](https://clawhub.ai/user/oldyoungcn)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline shell commands and dashboard usage guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [The skill starts or explains a local Node dashboard that serves token telemetry and stores history in SQLite.]\n\n## Skill Version(s):\n\n1.2.0 (source: frontmatter, package.json, server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"package.json","content":"{\n  \"name\": \"token-monitor\",\n  \"version\": \"1.2.0\",\n  \"description\": \"OpenClaw Token \\u5b9e\\u65f6\\u76d1\\u63a7\\u9762\\u677f - SQLite \\u6301\\u4e45\\u5316\\u3001\\u5b9e\\u65f6\\u66f2\\u7ebf\\u3001\\u5386\\u53f2\\u89c6\\u56fe\\u3001\\u4eba\\u6c11\\u5e01\\u8d39\\u7528\\u4f30\\u7b97\",\n  \"author\": \"OldYoung <ericyang81@gmail.com>\",\n  \"main\": \"scripts/token-monitor.js\",\n  \"keywords\": [\n    \"openclaw\",\n    \"token\",\n    \"monitor\",\n    \"analytics\"\n  ]\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场... Skill: OpenClaw Token Monitor Owner: oldyoungcn Summary: OpenClaw Token 实时监控面板。支持：(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗（增量曲线） (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算（MiniMax 官方定价） (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场... Tags: analytics:1.0.0, latest:1.2.0, monitor:1.0.0, openclaw:1.0.0, token:1.0.0 Version history: v1.2.0 | 2026-04-17T08:34:45.589Z | auto Version 1.2.0 introduces new updates and improvements: - Bumped","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":905,"uniquenessScore":58,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T21:45:28.880Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T21:45:28.880Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-14T02:34:57.273Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}