Define custom routing rules for OpenRouter requests. Use when implementing complex routing logic beyond simple model selection. Trigger with phrases like 'openrouter rules', 'routing rules', 'custom routing', 'openrouter request routing'.
From openrouter-packnpx claudepluginhub nickloveinvesting/nick-love-plugins --plugin openrouter-packThis skill is limited to using the following tools:
references/basic-routing-strategies.mdreferences/cost-aware-routing.mdreferences/errors.mdreferences/examples.mdreferences/implementation.mdreferences/latency-aware-routing.mdreferences/rule-based-router.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 shows how to implement rule-based routing that dynamically selects models based on prompt content, user tier, cost constraints, or time-of-day patterns.
user.tier == "free") and actions (e.g., model = "google/gemma-2-9b-it:free")| Error | Cause | Fix |
|---|---|---|
| No rule matched | Conditions don't cover all cases | Always include a default catch-all rule at the end |
| Rule evaluation error | Dynamic rule query failed (e.g., cost API timeout) | Add fallback values for dynamic data; never block on rule evaluation |
| Wrong model selected | Rule priority order incorrect | Add logging to show which rule matched and why; review priority ordering |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.