Network skill. Ask the user before running it, and run it only with their yes.
node ${CLAUDE_PLUGIN_ROOT}/scripts/openrouter.mjs key --yes
node ${CLAUDE_PLUGIN_ROOT}/scripts/openrouter.mjs generation gen-abc123 --yes
node ${CLAUDE_PLUGIN_ROOT}/scripts/openrouter.mjs credits --yes
--yes the script prints the call it would make and sends nothing.OPENROUTER_API_KEY (credits: OPENROUTER_MANAGEMENT_KEY). A key the user stored as the plugin option openrouterApiKey arrives as OPENROUTER_API_KEY too: the plugin's SessionStart hook puts it there for this session's commands when the variable is not already set (ADR-506). Never ask the user to paste a key, never print, log or write one.usage.cost / total_cost is authoritative; do not recompute it from list prices.credits needs a management key (a normal key returns 403). A fresh generation can 404 briefly: retry.usage, the provider's charge in upstream_inference_cost: show both, labelled.openrouter/auto can change the billed model: report model and provider_name as returned.