Openrouter Usage
v0.1.0Track OpenRouter API spending — credit balance, per-model cost breakdown, and spending projections from OpenClaw session logs.
⭐ 2· 388·3 current·3 all-time
byLuis Cajigas@lcajigasm
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
The skill claims to report OpenRouter credits and per-model usage from OpenClaw session logs and the code does exactly that: it queries openrouter.ai for credit info and parses ~/.openclaw/agents/*/sessions/*.jsonl for per-model cost. The only required binary is the CLI wrapper it installs (openrouter-usage), which is consistent with the README/SKILL.md.
Instruction Scope
SKILL.md instructs running the provided CLI and documents that the API key is auto-discovered and that session parsing is local (reads ~/.openclaw/agents/*/sessions/*.jsonl). The Python script also only reads those local files and calls the OpenRouter API; it does not reference other system paths or external endpoints beyond openrouter.ai.
Install Mechanism
There is no remote installer: install.sh writes a wrapper to ~/.local/bin and can optionally symlink the skill into ~/.openclaw/workspace/skills — this is a local install and expected. Note: the registry metadata called this an instruction-only skill, but code files and an installer are present in the package (minor inconsistency). Also README suggests cloning a GitHub repo as the install source, but the registry entry lists source/homepage as unknown; verify the repository origin before running the installer.
Credentials
No required environment variables are declared, which matches registry metadata; however the script will optionally use OPENROUTER_API_KEY (env) or keys found in ~/.openclaw/agents/*/agent/auth.json. This is proportionate for its purpose (it needs an OpenRouter key to query credits) but you should be aware the key will be sent to openrouter.ai in an Authorization header.
Persistence & Privilege
The skill does not request always:true. The installer may create a CLI in ~/.local/bin and optionally link the skill into the user's OpenClaw workspace (with explicit prompt). It does not modify other skills or global system config beyond those user-visible local changes.
Assessment
This package appears internally consistent with its purpose, but before installing: 1) verify the package source (the registry lists source/homepage as unknown; prefer installing from a trusted GitHub repo or reviewing the code you downloaded), 2) review install.sh to confirm you are comfortable with a CLI being placed in ~/.local/bin and an optional symlink into ~/.openclaw/workspace/skills, 3) understand the tool will read your OpenClaw session logs (~/.openclaw/agents/*/sessions/*.jsonl) and any OpenClaw auth files (~/.openclaw/agents/*/agent/auth.json) to auto-discover keys, and it will send your OpenRouter API key to openrouter.ai when fetching credits — if you are uneasy, create or use a limited/revocable API key, or run the script in a sandbox and inspect its output first.Like a lobster shell, security has layers — review code before you run it.
latestvk97dz0ww7crhmyhjjw7bw2bhcs81xjc5
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
💰 Clawdis
Binsopenrouter-usage
