Skip to content
Back to skills

Openrouter Routing Rules

ASecurity

Implement intelligent model routing based on request characteristics. Use when optimizing for cost, speed, or quality per request. Trigger with phrases like 'openrouter routing', 'model selection', 'smart routing', 'dynamic model'.

  • 2,688 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 7, 2026
ai-agentsjavascriptpythonjava

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill openrouter-routing-rules --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openrouter Routing Rules?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openrouter Routing Rules
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeremylongshore-openrouter-routing-rules/badge)](https://www.skillsdirectory.com/skills/jeremylongshore-openrouter-routing-rules)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openrouter-routing-rules
description: |
  Implement intelligent model routing based on request characteristics. Use when optimizing for cost, speed, or quality per request. Trigger with phrases like 'openrouter routing', 'model selection', 'smart routing', 'dynamic model'.
allowed-tools: Read, Write, Edit, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
---
# OpenRouter Routing Rules

## Overview

This skill covers implementing request-based routing logic to select optimal models based on content, urgency, or cost constraints.

## Prerequisites

- OpenRouter integration
- Understanding of model capabilities and pricing

## Instructions

Follow these steps to implement this skill:

1. **Verify Prerequisites**: Ensure all prerequisites listed above are met
2. **Review the Implementation**: Study the code examples and patterns below
3. **Adapt to Your Environment**: Modify configuration values for your setup
4. **Test the Integration**: Run the verification steps to confirm functionality
5. **Monitor in Production**: Set up appropriate logging and monitoring

## Overview

This skill covers implementing request-based routing logic to select optimal models based on content, urgency, or cost constraints.

## Prerequisites

- OpenRouter integration
- Understanding of model capabilities and pricing

## Basic Routing Strategies

### Content-Based Routing
```python
def route_by_content(prompt: str) -> str:
    """Route to appropriate model based on content analysis."""
    prompt_lower = prompt.lower()

    # Code-related
    if any(word in prompt_lower for word in ["code", "function", "debug", "python", "javascript"]):
        return "anthropic/claude-3.5-sonnet"

## Detailed Reference

See `{baseDir}/references/implementation.md` for complete implementation guide.

Files in this skill

  • SKILL.md1.8 KB
  • references/basic-routing-strategies.md1.6 KB
  • references/cost-aware-routing.md1.6 KB
  • references/errors.md323 B
  • references/examples.md87 B
  • references/implementation.md13 KB
  • references/latency-aware-routing.md1.8 KB
  • references/rule-based-router.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.