Token Manager
ReviewAudited by ClawScan on May 10, 2026.
Overview
The skill mostly matches a token-cost tracker, but its API-key handling can send the wrong provider key to Moonshot and its privacy wording is broader than the code supports.
Install only if you are comfortable running local Node scripts and optional cron jobs. Set only the provider API key needed for the check, avoid relying on the scheduler's fallback key selection, and do not pass sensitive prompt text to token-estimate functions unless you are willing for it to be sent to the provider API.
Findings (4)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
A provider API key could be sent to the wrong provider during balance checks, exposing a credential outside its intended boundary.
The scheduler does not select the API key by provider. A default or requested Moonshot check can reuse an OpenAI or Anthropic key if MOONSHOT_API_KEY is absent.
const apiKey = process.env.MOONSHOT_API_KEY || process.env.OPENAI_API_KEY || process.env.ANTHROPIC_API_KEY; ... const balance = await queryBalance(provider, apiKey);
Require the matching environment variable for each provider, fail closed when it is missing, and declare the expected credentials in metadata.
Users may believe no prompt text or message content leaves the machine when token estimation can send supplied content to a provider API.
The code is capable of posting supplied text/messages to Moonshot's token-count endpoint, so the blanket no-upload privacy claim is not fully accurate unless narrowed to no non-provider telemetry.
Security Notice: ... No data uploaded to third-party ... makeRequest(config, config.tokenEstimateEndpoint, 'POST', { model: model || 'kimi-k2.5', messages }, ...)Clarify which commands send text to provider APIs, avoid claiming no uploads, and ask for explicit user approval before sending sensitive text for token counting.
If enabled, the balance checker will run automatically and use available API-key environment variables on schedule.
The skill documents an optional persistent hourly cron job. This matches scheduled monitoring, but it keeps running after setup.
openclaw cron add --name "token-balance-check" --schedule "0 * * * *" --command "cd /path/to/token-manager && node scripts/scheduler.js check moonshot 5"
Enable the cron job only if you want ongoing monitoring, and document how to pause or remove it.
Local usage history can reveal work patterns and provider/model usage even though the file does not store session content.
The skill stores cross-session provider, model, token, cost, and timing metrics locally for up to 90 days.
const SESSION_FILE = path.join(DATA_DIR, 'sessions.json'); ... data.sessions = data.sessions.filter(s => new Date(s.timestamp) > ninetyDaysAgo); ... saveSessions(data);
Keep the .data directory private, delete it when no longer needed, and avoid recording sensitive project identifiers in model/provider fields.
