{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawmeter",
    "name": "Clawmeter",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Someone0070/clawmeter",
    "canonicalUrl": "https://clawhub.ai/Someone0070/clawmeter",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/clawmeter",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawmeter",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "CONTRIBUTING.md",
      "PACKAGE_SUMMARY.md",
      "PUBLICATION_READY.md",
      "PUBLISHING.md",
      "README.md"
    ],
    "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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.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/clawmeter"
    },
    "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/clawmeter",
    "agentPageUrl": "https://openagent3.xyz/skills/clawmeter/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawmeter/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawmeter/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "ClawMeter — Cost Tracking Dashboard",
        "body": "Track OpenClaw API usage and spending in real-time with budget alerts."
      },
      {
        "title": "Overview",
        "body": "ClawMeter is a self-hosted cost tracking dashboard that monitors your OpenClaw session logs, calculates token usage and API costs, and provides real-time analytics with customizable budget alerts.\n\nPerfect for:\n\nUsers who want visibility into their AI spending\nTeams managing OpenClaw deployments with budgets\nDevelopers optimizing model selection based on cost\nAnyone who wants to avoid surprise API bills"
      },
      {
        "title": "Prerequisites",
        "body": "OpenClaw installed and running\nNode.js v18+ (for the dashboard server)\nSession logs enabled in OpenClaw (default)"
      },
      {
        "title": "Setup",
        "body": "Clone or download ClawMeter:\ncd ~/.openclaw/workspace\ngit clone https://github.com/yourusername/clawmeter.git\ncd clawmeter\n\n\n\nInstall dependencies:\nnpm install\n\n\n\nConfigure (optional):\ncp .env.example .env\n# Edit .env to customize paths, budget limits, or alert settings\n\n\n\nIngest existing logs:\nnpm run ingest\n\n\n\nStart the dashboard:\nnpm start\n\n\n\nOpen dashboard:\nNavigate to http://localhost:3377"
      },
      {
        "title": "Commands",
        "body": "When this skill is installed, your OpenClaw agent can respond to:"
      },
      {
        "title": "Spending Queries",
        "body": "\"How much have I spent today?\"\n\nShows today's total spend and budget percentage\n\n\n\n\"What's my monthly spend?\"\n\nDisplays current month total and budget status\n\n\n\n\"Show me this week's costs\"\n\nSummarizes last 7 days of spending"
      },
      {
        "title": "Cost Analysis",
        "body": "\"Which model is most expensive?\"\n\nBreaks down costs by model (Claude, GPT, Gemini, etc.)\n\n\n\n\"Show my most expensive sessions\"\n\nLists top sessions by total cost\n\n\n\n\"What's my average daily spend?\"\n\nCalculates mean daily cost over the last 30 days"
      },
      {
        "title": "Dashboard & Reports",
        "body": "\"Open my cost dashboard\"\n\nProvides link to http://localhost:3377\n\n\n\n\"Generate a cost report\"\n\nExports summary data (today/week/month/all-time)"
      },
      {
        "title": "Data Management",
        "body": "\"Refresh cost data\"\n\nTriggers manual re-ingest of session logs\n\n\n\n\"Clear old cost data\"\n\n(Optional) Archive or delete data older than X days"
      },
      {
        "title": "API Endpoints",
        "body": "ClawMeter exposes a REST API that agents can query:"
      },
      {
        "title": "Summary Statistics",
        "body": "GET http://localhost:3377/api/summary\n\nResponse:\n\n{\n  \"today\": 2.15,\n  \"week\": 8.42,\n  \"month\": 32.76,\n  \"allTime\": 127.89,\n  \"sessions\": 234,\n  \"messages\": 1842,\n  \"budgetDaily\": 5.0,\n  \"budgetMonthly\": 100.0\n}"
      },
      {
        "title": "Daily Breakdown",
        "body": "GET http://localhost:3377/api/daily?days=30\n\nResponse:\n\n[\n  {\n    \"date\": \"2026-02-14\",\n    \"cost\": 2.15,\n    \"input_tokens\": 45820,\n    \"output_tokens\": 12340,\n    \"messages\": 18\n  }\n]"
      },
      {
        "title": "Sessions",
        "body": "GET http://localhost:3377/api/sessions?limit=50&offset=0\n\nResponse:\n\n[\n  {\n    \"id\": \"abc123\",\n    \"agent\": \"main\",\n    \"model\": \"claude-sonnet-4-5\",\n    \"total_cost\": 0.842,\n    \"message_count\": 12\n  }\n]"
      },
      {
        "title": "Model Breakdown",
        "body": "GET http://localhost:3377/api/models\n\nResponse:\n\n[\n  {\n    \"model\": \"claude-sonnet-4-5\",\n    \"provider\": \"anthropic\",\n    \"total_cost\": 45.62,\n    \"message_count\": 324\n  }\n]"
      },
      {
        "title": "Top Sessions",
        "body": "GET http://localhost:3377/api/top-sessions?limit=10"
      },
      {
        "title": "Budget Alerts",
        "body": "GET http://localhost:3377/api/alerts"
      },
      {
        "title": "Manual Ingest",
        "body": "POST http://localhost:3377/api/ingest"
      },
      {
        "title": "Environment Variables",
        "body": "Edit .env to customize:\n\n# Paths\nOPENCLAW_AGENTS_DIR=/home/youruser/.openclaw/agents\nCLAWMETER_DB=/home/youruser/.openclaw/workspace/clawmeter/data/clawmeter.db\n\n# Server\nPORT=3377\n\n# Budgets (USD)\nBUDGET_DAILY_LIMIT=5.00\nBUDGET_MONTHLY_LIMIT=100.00\n\n# Telegram alerts (optional)\nTELEGRAM_BOT_TOKEN=your_bot_token\nTELEGRAM_CHAT_ID=your_chat_id\n\n# Email alerts (optional)\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_USER=your@email.com\nSMTP_PASS=your_app_password\nALERT_EMAIL_TO=notify@yourdomain.com"
      },
      {
        "title": "Budget Alerts",
        "body": "ClawMeter automatically checks spending against configured thresholds and sends alerts via:\n\nTelegram — Instant notifications to your phone\nEmail — Delivered via SMTP\n\nAlert triggers:\n\nDaily spend exceeds BUDGET_DAILY_LIMIT\nMonthly spend exceeds BUDGET_MONTHLY_LIMIT\n\nAlert throttling: One alert per type per day (prevents spam)."
      },
      {
        "title": "Example 1: Daily Spend Check",
        "body": "User: \"How much have I spent today?\"\n\nAgent Response:\n\nLet me check your spending...\n\n📊 Today's Spend: $2.15\nBudget: $5.00 (43% used)\n\nYou have $2.85 remaining today.\n\nImplementation:\n\nconst res = await fetch('http://localhost:3377/api/summary');\nconst data = await res.json();\nconst pct = (data.today / data.budgetDaily * 100).toFixed(0);\nreturn `📊 Today's Spend: $${data.today.toFixed(2)}\\nBudget: $${data.budgetDaily.toFixed(2)} (${pct}% used)\\n\\nYou have $${(data.budgetDaily - data.today).toFixed(2)} remaining today.`;"
      },
      {
        "title": "Example 2: Model Comparison",
        "body": "User: \"Which model should I use to save money?\"\n\nAgent Response:\n\nBased on your usage history:\n\n💰 Cost per 1K messages:\n• Claude Haiku 3-5: $0.12\n• GPT-4o-mini: $0.18\n• Claude Sonnet 4-5: $0.45\n• Claude Opus 4: $1.23\n\nRecommendation: Use Haiku for simple tasks, Sonnet for complex work."
      },
      {
        "title": "Example 3: Budget Warning",
        "body": "Agent (proactive):\n\n⚠️ Budget Alert\n\nYou've spent $5.52 today, exceeding your $5.00 daily limit.\n\nTop sessions today:\n1. Code review task — $2.10\n2. Research project — $1.85\n3. Email drafting — $0.98\n\nConsider switching to a cheaper model or pausing non-urgent tasks."
      },
      {
        "title": "Overview Screen",
        "body": "Today's spend with budget progress bar\nWeekly and monthly totals\nAll-time spending and message count\nBudget status (green/yellow/red indicators)"
      },
      {
        "title": "Analytics",
        "body": "Daily cost chart (bar chart, 7/14/30/90 day views)\nModel breakdown (donut chart with percentages)\nTop sessions by cost\nRecent activity feed"
      },
      {
        "title": "Alerts History",
        "body": "View all triggered budget alerts\nSee when and why alerts fired\nTrack spending patterns over time"
      },
      {
        "title": "1. Personal Budget Management",
        "body": "Scenario: You want to keep OpenClaw costs under $100/month.\n\nSetup:\n\nSet BUDGET_MONTHLY_LIMIT=100.00\nEnable Telegram alerts\nCheck dashboard weekly\n\nResult: Get notified before you exceed budget, adjust usage accordingly."
      },
      {
        "title": "2. Team Cost Allocation",
        "body": "Scenario: Multiple team members use shared OpenClaw instance.\n\nSetup:\n\nClawMeter tracks costs by agent/session\nExport data via API for reporting\nAnalyze which agents/projects cost most\n\nResult: Fair cost distribution, identify optimization opportunities."
      },
      {
        "title": "3. Model Selection Optimization",
        "body": "Scenario: You're unsure which model to use for different tasks.\n\nSetup:\n\nRun experiments with different models\nCompare costs in ClawMeter dashboard\nAnalyze cost-per-message and cost-per-token\n\nResult: Data-driven model selection, optimize for cost/quality balance."
      },
      {
        "title": "4. Production Monitoring",
        "body": "Scenario: OpenClaw running in production, need cost visibility.\n\nSetup:\n\nClawMeter auto-ingests logs in real-time\nSet aggressive budget alerts\nMonitor dashboard for anomalies\n\nResult: Catch cost spikes immediately, prevent runaway spending."
      },
      {
        "title": "Dashboard shows $0.00",
        "body": "Cause: Session logs not found or not yet ingested.\n\nFix:\n\nVerify OPENCLAW_AGENTS_DIR points to correct path\nRun npm run ingest manually\nCheck that .jsonl files exist in agents/*/sessions/"
      },
      {
        "title": "Auto-watch not working",
        "body": "Cause: File watcher not detecting changes.\n\nFix:\n\nEnsure server is running (npm start)\nCheck terminal for 📥 X new events messages\nVerify file permissions on session directories"
      },
      {
        "title": "Budget alerts not sending",
        "body": "Cause: Missing or incorrect credentials.\n\nFix:\n\nDouble-check TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env\nFor email, verify SMTP settings\nCheck server logs for error messages"
      },
      {
        "title": "Database errors",
        "body": "Cause: Corrupted or locked database file.\n\nFix:\n\nStop the server\nBackup data/clawmeter.db\nDelete database and re-run npm run ingest"
      },
      {
        "title": "Custom Model Pricing",
        "body": "If you use custom models or pricing changes:\n\nEdit src/pricing.mjs\nAdd entry to MODEL_PRICING object:\n'your-custom-model': {\n  input: 2.50,    // per million tokens\n  output: 10.00,  // per million tokens\n  cacheRead: 0.25,   // optional\n  cacheWrite: 3.75   // optional\n}\n\n\nRestart server"
      },
      {
        "title": "Scheduled Reports",
        "body": "Use cron to schedule daily/weekly reports:\n\n# Daily summary at 9 AM\n0 9 * * * curl -s http://localhost:3377/api/summary | mail -s \"Daily Cost Report\" you@example.com"
      },
      {
        "title": "Data Export",
        "body": "Export raw data for external analysis:\n\n# Export all sessions to CSV\nsqlite3 data/clawmeter.db \"SELECT * FROM sessions\" -csv > sessions.csv"
      },
      {
        "title": "Running as a Service",
        "body": "Create systemd service for persistent operation:\n\n# /etc/systemd/system/clawmeter.service\n[Unit]\nDescription=ClawMeter Cost Tracking Dashboard\nAfter=network.target\n\n[Service]\nType=simple\nUser=youruser\nWorkingDirectory=/home/youruser/.openclaw/workspace/clawmeter\nExecStart=/usr/bin/npm start\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n\nEnable and start:\n\nsudo systemctl enable clawmeter\nsudo systemctl start clawmeter"
      },
      {
        "title": "Local Access Only",
        "body": "By default, ClawMeter binds to localhost:3377 and is not exposed to the internet.\n\nTo access remotely, use SSH tunneling:\n\nssh -L 3377:localhost:3377 your-server"
      },
      {
        "title": "Sensitive Data",
        "body": "Session logs may contain conversation data. ClawMeter:\n\nStores only usage metadata (tokens, costs, timestamps)\nDoes not store message content or prompts\nDatabase is local SQLite (no cloud sync)"
      },
      {
        "title": "API Authentication",
        "body": "ClawMeter currently has no authentication. For production:\n\nRun behind a reverse proxy (nginx/caddy) with auth\nUse firewall rules to restrict access\nDeploy on a private network"
      },
      {
        "title": "Resource Usage",
        "body": "CPU: Minimal (event-driven ingestion)\nRAM: ~50-100 MB\nDisk: Database grows ~1 KB per message (SQLite is very efficient)\nNetwork: None (all local)"
      },
      {
        "title": "Scalability",
        "body": "ClawMeter handles:\n\n100K+ messages easily\nYears of historical data without performance degradation\nMultiple agents (separated by directory structure)\n\nFor massive deployments (millions of messages), consider:\n\nPeriodic database archiving\nPostgreSQL backend (requires code changes)"
      },
      {
        "title": "Roadmap",
        "body": "Planned features:\n\nMulti-user authentication\n PostgreSQL support for large deployments\n Export to CSV/JSON\n Cost forecasting (predict monthly spend)\n Slack/Discord webhook support\n Token usage heatmaps\n Model performance tracking (latency, quality)\n Budget recommendations based on usage patterns"
      },
      {
        "title": "Support",
        "body": "Documentation: GitHub README\nIssues: GitHub Issues\nCommunity: OpenClaw Discord"
      },
      {
        "title": "License",
        "body": "MIT — Free and open source forever.\n\nMade with ⚡ by the OpenClaw community\n\nTrack your spending. Optimize your costs. Stay in control."
      }
    ],
    "body": "ClawMeter — Cost Tracking Dashboard\n\nTrack OpenClaw API usage and spending in real-time with budget alerts.\n\nOverview\n\nClawMeter is a self-hosted cost tracking dashboard that monitors your OpenClaw session logs, calculates token usage and API costs, and provides real-time analytics with customizable budget alerts.\n\nPerfect for:\n\nUsers who want visibility into their AI spending\nTeams managing OpenClaw deployments with budgets\nDevelopers optimizing model selection based on cost\nAnyone who wants to avoid surprise API bills\nInstallation\nPrerequisites\nOpenClaw installed and running\nNode.js v18+ (for the dashboard server)\nSession logs enabled in OpenClaw (default)\nSetup\n\nClone or download ClawMeter:\n\ncd ~/.openclaw/workspace\ngit clone https://github.com/yourusername/clawmeter.git\ncd clawmeter\n\n\nInstall dependencies:\n\nnpm install\n\n\nConfigure (optional):\n\ncp .env.example .env\n# Edit .env to customize paths, budget limits, or alert settings\n\n\nIngest existing logs:\n\nnpm run ingest\n\n\nStart the dashboard:\n\nnpm start\n\n\nOpen dashboard: Navigate to http://localhost:3377\n\nCommands\n\nWhen this skill is installed, your OpenClaw agent can respond to:\n\nSpending Queries\n\n\"How much have I spent today?\"\n\nShows today's total spend and budget percentage\n\n\"What's my monthly spend?\"\n\nDisplays current month total and budget status\n\n\"Show me this week's costs\"\n\nSummarizes last 7 days of spending\nCost Analysis\n\n\"Which model is most expensive?\"\n\nBreaks down costs by model (Claude, GPT, Gemini, etc.)\n\n\"Show my most expensive sessions\"\n\nLists top sessions by total cost\n\n\"What's my average daily spend?\"\n\nCalculates mean daily cost over the last 30 days\nDashboard & Reports\n\n\"Open my cost dashboard\"\n\nProvides link to http://localhost:3377\n\n\"Generate a cost report\"\n\nExports summary data (today/week/month/all-time)\nData Management\n\n\"Refresh cost data\"\n\nTriggers manual re-ingest of session logs\n\n\"Clear old cost data\"\n\n(Optional) Archive or delete data older than X days\nAPI Endpoints\n\nClawMeter exposes a REST API that agents can query:\n\nSummary Statistics\nGET http://localhost:3377/api/summary\n\n\nResponse:\n\n{\n  \"today\": 2.15,\n  \"week\": 8.42,\n  \"month\": 32.76,\n  \"allTime\": 127.89,\n  \"sessions\": 234,\n  \"messages\": 1842,\n  \"budgetDaily\": 5.0,\n  \"budgetMonthly\": 100.0\n}\n\nDaily Breakdown\nGET http://localhost:3377/api/daily?days=30\n\n\nResponse:\n\n[\n  {\n    \"date\": \"2026-02-14\",\n    \"cost\": 2.15,\n    \"input_tokens\": 45820,\n    \"output_tokens\": 12340,\n    \"messages\": 18\n  }\n]\n\nSessions\nGET http://localhost:3377/api/sessions?limit=50&offset=0\n\n\nResponse:\n\n[\n  {\n    \"id\": \"abc123\",\n    \"agent\": \"main\",\n    \"model\": \"claude-sonnet-4-5\",\n    \"total_cost\": 0.842,\n    \"message_count\": 12\n  }\n]\n\nModel Breakdown\nGET http://localhost:3377/api/models\n\n\nResponse:\n\n[\n  {\n    \"model\": \"claude-sonnet-4-5\",\n    \"provider\": \"anthropic\",\n    \"total_cost\": 45.62,\n    \"message_count\": 324\n  }\n]\n\nTop Sessions\nGET http://localhost:3377/api/top-sessions?limit=10\n\nBudget Alerts\nGET http://localhost:3377/api/alerts\n\nManual Ingest\nPOST http://localhost:3377/api/ingest\n\nConfiguration\nEnvironment Variables\n\nEdit .env to customize:\n\n# Paths\nOPENCLAW_AGENTS_DIR=/home/youruser/.openclaw/agents\nCLAWMETER_DB=/home/youruser/.openclaw/workspace/clawmeter/data/clawmeter.db\n\n# Server\nPORT=3377\n\n# Budgets (USD)\nBUDGET_DAILY_LIMIT=5.00\nBUDGET_MONTHLY_LIMIT=100.00\n\n# Telegram alerts (optional)\nTELEGRAM_BOT_TOKEN=your_bot_token\nTELEGRAM_CHAT_ID=your_chat_id\n\n# Email alerts (optional)\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_USER=your@email.com\nSMTP_PASS=your_app_password\nALERT_EMAIL_TO=notify@yourdomain.com\n\nBudget Alerts\n\nClawMeter automatically checks spending against configured thresholds and sends alerts via:\n\nTelegram — Instant notifications to your phone\nEmail — Delivered via SMTP\n\nAlert triggers:\n\nDaily spend exceeds BUDGET_DAILY_LIMIT\nMonthly spend exceeds BUDGET_MONTHLY_LIMIT\n\nAlert throttling: One alert per type per day (prevents spam).\n\nAgent Integration Examples\nExample 1: Daily Spend Check\n\nUser: \"How much have I spent today?\"\n\nAgent Response:\n\nLet me check your spending...\n\n📊 Today's Spend: $2.15\nBudget: $5.00 (43% used)\n\nYou have $2.85 remaining today.\n\n\nImplementation:\n\nconst res = await fetch('http://localhost:3377/api/summary');\nconst data = await res.json();\nconst pct = (data.today / data.budgetDaily * 100).toFixed(0);\nreturn `📊 Today's Spend: $${data.today.toFixed(2)}\\nBudget: $${data.budgetDaily.toFixed(2)} (${pct}% used)\\n\\nYou have $${(data.budgetDaily - data.today).toFixed(2)} remaining today.`;\n\nExample 2: Model Comparison\n\nUser: \"Which model should I use to save money?\"\n\nAgent Response:\n\nBased on your usage history:\n\n💰 Cost per 1K messages:\n• Claude Haiku 3-5: $0.12\n• GPT-4o-mini: $0.18\n• Claude Sonnet 4-5: $0.45\n• Claude Opus 4: $1.23\n\nRecommendation: Use Haiku for simple tasks, Sonnet for complex work.\n\nExample 3: Budget Warning\n\nAgent (proactive):\n\n⚠️ Budget Alert\n\nYou've spent $5.52 today, exceeding your $5.00 daily limit.\n\nTop sessions today:\n1. Code review task — $2.10\n2. Research project — $1.85\n3. Email drafting — $0.98\n\nConsider switching to a cheaper model or pausing non-urgent tasks.\n\nDashboard Features\nOverview Screen\nToday's spend with budget progress bar\nWeekly and monthly totals\nAll-time spending and message count\nBudget status (green/yellow/red indicators)\nAnalytics\nDaily cost chart (bar chart, 7/14/30/90 day views)\nModel breakdown (donut chart with percentages)\nTop sessions by cost\nRecent activity feed\nAlerts History\nView all triggered budget alerts\nSee when and why alerts fired\nTrack spending patterns over time\nUse Cases\n1. Personal Budget Management\n\nScenario: You want to keep OpenClaw costs under $100/month.\n\nSetup:\n\nSet BUDGET_MONTHLY_LIMIT=100.00\nEnable Telegram alerts\nCheck dashboard weekly\n\nResult: Get notified before you exceed budget, adjust usage accordingly.\n\n2. Team Cost Allocation\n\nScenario: Multiple team members use shared OpenClaw instance.\n\nSetup:\n\nClawMeter tracks costs by agent/session\nExport data via API for reporting\nAnalyze which agents/projects cost most\n\nResult: Fair cost distribution, identify optimization opportunities.\n\n3. Model Selection Optimization\n\nScenario: You're unsure which model to use for different tasks.\n\nSetup:\n\nRun experiments with different models\nCompare costs in ClawMeter dashboard\nAnalyze cost-per-message and cost-per-token\n\nResult: Data-driven model selection, optimize for cost/quality balance.\n\n4. Production Monitoring\n\nScenario: OpenClaw running in production, need cost visibility.\n\nSetup:\n\nClawMeter auto-ingests logs in real-time\nSet aggressive budget alerts\nMonitor dashboard for anomalies\n\nResult: Catch cost spikes immediately, prevent runaway spending.\n\nTroubleshooting\nDashboard shows $0.00\n\nCause: Session logs not found or not yet ingested.\n\nFix:\n\nVerify OPENCLAW_AGENTS_DIR points to correct path\nRun npm run ingest manually\nCheck that .jsonl files exist in agents/*/sessions/\nAuto-watch not working\n\nCause: File watcher not detecting changes.\n\nFix:\n\nEnsure server is running (npm start)\nCheck terminal for 📥 X new events messages\nVerify file permissions on session directories\nBudget alerts not sending\n\nCause: Missing or incorrect credentials.\n\nFix:\n\nDouble-check TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env\nFor email, verify SMTP settings\nCheck server logs for error messages\nDatabase errors\n\nCause: Corrupted or locked database file.\n\nFix:\n\nStop the server\nBackup data/clawmeter.db\nDelete database and re-run npm run ingest\nAdvanced Configuration\nCustom Model Pricing\n\nIf you use custom models or pricing changes:\n\nEdit src/pricing.mjs\nAdd entry to MODEL_PRICING object:\n'your-custom-model': {\n  input: 2.50,    // per million tokens\n  output: 10.00,  // per million tokens\n  cacheRead: 0.25,   // optional\n  cacheWrite: 3.75   // optional\n}\n\nRestart server\nScheduled Reports\n\nUse cron to schedule daily/weekly reports:\n\n# Daily summary at 9 AM\n0 9 * * * curl -s http://localhost:3377/api/summary | mail -s \"Daily Cost Report\" you@example.com\n\nData Export\n\nExport raw data for external analysis:\n\n# Export all sessions to CSV\nsqlite3 data/clawmeter.db \"SELECT * FROM sessions\" -csv > sessions.csv\n\nRunning as a Service\n\nCreate systemd service for persistent operation:\n\n# /etc/systemd/system/clawmeter.service\n[Unit]\nDescription=ClawMeter Cost Tracking Dashboard\nAfter=network.target\n\n[Service]\nType=simple\nUser=youruser\nWorkingDirectory=/home/youruser/.openclaw/workspace/clawmeter\nExecStart=/usr/bin/npm start\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n\n\nEnable and start:\n\nsudo systemctl enable clawmeter\nsudo systemctl start clawmeter\n\nSecurity Considerations\nLocal Access Only\n\nBy default, ClawMeter binds to localhost:3377 and is not exposed to the internet.\n\nTo access remotely, use SSH tunneling:\n\nssh -L 3377:localhost:3377 your-server\n\nSensitive Data\n\nSession logs may contain conversation data. ClawMeter:\n\nStores only usage metadata (tokens, costs, timestamps)\nDoes not store message content or prompts\nDatabase is local SQLite (no cloud sync)\nAPI Authentication\n\nClawMeter currently has no authentication. For production:\n\nRun behind a reverse proxy (nginx/caddy) with auth\nUse firewall rules to restrict access\nDeploy on a private network\nPerformance\nResource Usage\nCPU: Minimal (event-driven ingestion)\nRAM: ~50-100 MB\nDisk: Database grows ~1 KB per message (SQLite is very efficient)\nNetwork: None (all local)\nScalability\n\nClawMeter handles:\n\n100K+ messages easily\nYears of historical data without performance degradation\nMultiple agents (separated by directory structure)\n\nFor massive deployments (millions of messages), consider:\n\nPeriodic database archiving\nPostgreSQL backend (requires code changes)\nRoadmap\n\nPlanned features:\n\n Multi-user authentication\n PostgreSQL support for large deployments\n Export to CSV/JSON\n Cost forecasting (predict monthly spend)\n Slack/Discord webhook support\n Token usage heatmaps\n Model performance tracking (latency, quality)\n Budget recommendations based on usage patterns\nSupport\nDocumentation: GitHub README\nIssues: GitHub Issues\nCommunity: OpenClaw Discord\nLicense\n\nMIT — Free and open source forever.\n\nMade with ⚡ by the OpenClaw community\n\nTrack your spending. Optimize your costs. Stay in control."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Someone0070/clawmeter",
    "publisherUrl": "https://clawhub.ai/Someone0070/clawmeter",
    "owner": "Someone0070",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawmeter",
    "downloadUrl": "https://openagent3.xyz/downloads/clawmeter",
    "agentUrl": "https://openagent3.xyz/skills/clawmeter/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawmeter/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawmeter/agent.md"
  }
}