openrouter-toolkit

The definitive OpenRouter skill — intelligent model routing by task type, cost tracking with budget alerts, automatic fallback chains, side-by-side model comparison, and savings recommendations. Use for optimizing AI model selection, controlling costs, and building resilient LLM pipelines.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "openrouter-toolkit" with this command: npx skills add aiwithabidi/openrouter-toolkit

🔀 OpenRouter Toolkit

The definitive OpenRouter skill for OpenClaw agents. Intelligent model routing, cost tracking, fallback chains, and model comparison — all in one toolkit.

Features

  • Smart Routing — Automatically pick the best model for code, reasoning, creative, fast, or cheap tasks
  • Cost Tracking — Log every API call with cost, track daily/weekly/monthly spend
  • Fallback Chains — If primary model fails or times out, auto-retry with fallbacks
  • Model Comparison — Send the same prompt to N models, compare quality and cost side-by-side
  • Budget Alerts — Set spending limits and get warned before you blow your budget
  • Live Model Data — Pulls real pricing and capabilities from OpenRouter's API

Requirements

  • OPENROUTER_API_KEY — Your OpenRouter API key
  • Python 3.10+ with requests (included in most environments)

Usage

Smart Routing

python3 {baseDir}/scripts/openrouter_toolkit.py route --task code
python3 {baseDir}/scripts/openrouter_toolkit.py route --task reasoning
python3 {baseDir}/scripts/openrouter_toolkit.py route --task creative
python3 {baseDir}/scripts/openrouter_toolkit.py route --task fast
python3 {baseDir}/scripts/openrouter_toolkit.py route --task cheap

Model Comparison

python3 {baseDir}/scripts/openrouter_toolkit.py compare --prompt "Explain recursion" --models "anthropic/claude-sonnet-4,openai/gpt-4o-mini"

Fallback Chain

python3 {baseDir}/scripts/openrouter_toolkit.py fallback --prompt "Hello" --chain "anthropic/claude-opus-4,anthropic/claude-sonnet-4,openai/gpt-4o-mini"

Cost Tracking

python3 {baseDir}/scripts/openrouter_toolkit.py cost --period daily
python3 {baseDir}/scripts/openrouter_toolkit.py cost --period weekly
python3 {baseDir}/scripts/openrouter_toolkit.py cost --period monthly

Budget Alerts

python3 {baseDir}/scripts/openrouter_toolkit.py budget --set 50.00
python3 {baseDir}/scripts/openrouter_toolkit.py budget --check

List Models

python3 {baseDir}/scripts/openrouter_toolkit.py models --top 20
python3 {baseDir}/scripts/openrouter_toolkit.py models --search claude
python3 {baseDir}/scripts/openrouter_toolkit.py models --best code

How Smart Routing Works

The router scores models based on task type using these heuristics:

TaskPrioritizesExample Models
codeHigh context, code benchmarksClaude Opus, GPT-4o
reasoningThinking/reasoning capabilityClaude Opus, o1
creativeCreative writing qualityClaude Sonnet, GPT-4o
fastLow latency, good enough qualityClaude Haiku, GPT-4o-mini
cheapLowest cost per tokenGemini Flash, GPT-4o-mini

Data Storage

Cost logs are stored in SQLite at {baseDir}/data/openrouter_costs.db.

Credits

Built by M. Abidi | agxntsix.ai YouTube | GitHub Part of the AgxntSix Skill Suite for OpenClaw agents.

📅 Need help setting up OpenClaw for your business? Book a free consultation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

Bitcoin and Tether on Arkade

Send and receive Bitcoin over Arkade (offchain), onchain (via onboard/offboard), and Lightning. Swap USDC/USDT stablecoins.

Registry SourceRecently Updated
1.4K3tiero
Web3

OK Computers + Ring Gates + Net Protocol

Interact with your OK Computer NFT on Base blockchain for onchain messaging, posting, DMs, username and website management via signed transactions.

Registry SourceRecently Updated
Web3

Xian SDK

Build applications on the Xian blockchain using the xian-py Python SDK. Use when developing apps that interact with Xian — wallets, transactions, smart contracts, state queries, token transfers. Covers sync and async patterns.

Registry SourceRecently Updated
1.1K0endogen
Web3

Github Copilot Cli

Efficient daily use of GitHub Copilot CLI for senior engineers. Use when planning, prompting, reviewing, or chaining Copilot CLI commands (gh copilot) to explore codebases, draft changes, debug issues, or accelerate workflows without losing architectural intent.

Registry SourceRecently Updated
1.8K10wilsonle