Install
openclaw skills install @mfang0126/check-ai-creditsopenclaw skills install @mfang0126/check-ai-creditsUse when the user asks how much credit/balance/quota is left on an AI provider (DeepSeek, DeepInfra, Codex, Grok, MiMo, Claude, Gemini, Kimi, OpenRouter, apikey.fun) — or "还剩多少钱 / 查额度 / 查余额".
check-ai-credits # all configured providers
check-ai-credits <provider> # one: deepseek|deepinfra|codex|grok|mimo|claude|gemini|kimi|openrouter|apikeyfun
check-ai-credits --json # machine-readable snapshots
check-ai-credits --trend # burn rate + days-left from history
check-ai-credits --list # credential detection status per provider
check-ai-credits deepinfra --models # per-model month breakdown
Binary location: dist/check-ai-credits after bun run build, or run
directly with bun src/cli.ts.
--json returns the snapshot schema
(provider, source, timestamp, currency, balance, usedPercent, resetsAt, monthCost, monthPeriod, details, error). Check error first; a non-null
error means the balance fields are unreliable. authHint carries the login
URL when credentials expired.
DEEPSEEK_API_KEY missing → key resolves from process env first, then
$HERMES_HOME/.env; set it there, never hardcode.codex/grok auth token is expired → run the vendor CLI once (codex /
grok login); this tool never refreshes tokens itself because that would
rotate the CLI's refresh token.codexbar … returned no data → Claude/Gemini/Kimi/OpenRouter/apikeyfun
need the CodexBar app installed; run codexbar usage once interactively.Read-only credential access, no secret echo in any output mode, no telemetry.
Do not edit provider files to "fix" a failure without checking the endpoint
semantics in docs/MIGRATION.md first (DeepInfra costs are in cents; Grok
units are credits, not dollars).