Implement cost control mechanisms for OpenRouter usage. Use when managing budgets or preventing overspend. Trigger with phrases like 'openrouter budget', 'openrouter spending limit', 'cost control', 'openrouter limit spend'.
From openrouter-packnpx claudepluginhub nickloveinvesting/nick-love-plugins --plugin openrouter-packThis skill is limited to using the following tools:
references/automatic-cost-controls.mdreferences/budget-alerts.mdreferences/budget-tracking.mdreferences/cost-dashboard.mdreferences/errors.mdreferences/examples.mdreferences/request-level-controls.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
This skill demonstrates setting up spending limits, per-request budgets, and automated cost monitoring to prevent unexpected charges.
max_tokens in every request to cap completion length and prevent runaway costsusage field in each response and multiply by model pricing to track cumulative spend in your application/api/v1/auth/key periodically to check remaining credits and alert when balance drops below a threshold| Error | Cause | Fix |
|---|---|---|
| 402 Payment Required | Account credits exhausted | Top up credits or switch to free models |
| Budget exceeded locally | Middleware blocked the request | Increase budget limit or optimize prompts to reduce token usage |
| Inaccurate cost tracking | Using stale pricing data | Refresh model pricing from /models endpoint daily |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.