Openrouter Toolkit

v1.0.0

The definitive OpenRouter skill — intelligent model routing by task type, cost tracking with budget alerts, automatic fallback chains, side-by-side model com...

1· 525·5 current·5 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for aiwithabidi/openrouter-toolkit.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Openrouter Toolkit" (aiwithabidi/openrouter-toolkit) from ClawHub.
Skill page: https://clawhub.ai/aiwithabidi/openrouter-toolkit
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: OPENROUTER_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install openrouter-toolkit

ClawHub CLI

Package manager switcher

npx clawhub@latest install openrouter-toolkit
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (OpenRouter routing, cost tracking, fallbacks) match the required env var (OPENROUTER_API_KEY) and the script's behavior (calls to openrouter.ai endpoints). The models referenced are plausible for an OpenRouter aggregator.
Instruction Scope
SKILL.md instructs running the included Python script and describes features. The script only reads OPENROUTER_API_KEY, makes API calls to openrouter.ai, and writes a local SQLite DB for cost logs — all within the declared scope. It does not read unrelated system files or other secrets.
Install Mechanism
No install spec (instruction-only with an included script). The script requires the 'requests' Python package (documented in SKILL.md). Nothing is downloaded from arbitrary URLs or written to system paths outside the skill's baseDir/data.
Credentials
Only OPENROUTER_API_KEY is required and declared as the primary credential. The script does not request other credentials or environment variables, and it does not store prompt text in the local DB (it logs usage metrics and cost).
Persistence & Privilege
The skill is not forced-always (always: false). It stores local cost data under {baseDir}/data/openrouter_costs.db, which is appropriate for its budget tracking purpose and does not modify other skills or global agent settings.
Assessment
This skill appears to do what it says: it sends prompts to OpenRouter, logs usage/costs locally, and helps pick models. Before installing: (1) Be prepared that your prompts and inputs will be sent to OpenRouter (so don't send secrets you don't want transmitted). (2) The skill requires your OPENROUTER_API_KEY — consider using a key with limited scope/quota. (3) The script writes a local SQLite DB at {baseDir}/data/openrouter_costs.db (it logs usage/costs but not full prompt text). (4) Verify you trust the publisher/homepage if you plan to run the included Python script; inspect the rest of the truncated code if you want absolute assurance (the provided file was truncated in the listing but appears consistent). (5) Ensure the environment has the 'requests' package installed. Overall, nothing in the package appears disproportionate or unexpected for an OpenRouter routing/costing tool.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🔀 Clawdis
EnvOPENROUTER_API_KEY
Primary envOPENROUTER_API_KEY
latestvk97emsgkbr1xatqjxvr0b1mc6n82czde
525downloads
1stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

🔀 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

Comments

Loading comments...