← Back to Skills Marketplace
neuralshift1

Iblai Openclaw Router

by Neuralshift1 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
602
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install iblai-openclaw-router
Description
Cost-optimizing model router for OpenClaw. Automatically routes each request to the cheapest capable Claude model (Haiku/Sonnet/Opus) using weighted scoring....
README (SKILL.md)

iblai-router

A zero-dependency proxy that sits between OpenClaw and the Anthropic API, routing each request to the cheapest capable model using a 14-dimension weighted scorer (\x3C1ms overhead).

Install

Run the install script to set up everything automatically:

bash "$(dirname "$0")/scripts/install.sh"

This will:

  1. Copy server.js and config.json to ~/.openclaw/workspace/router/
  2. Create and start a systemd service (iblai-router) on port 8402
  3. Register iblai-router/auto as an OpenClaw model provider

After install, iblai-router/auto is available anywhere OpenClaw accepts a model ID.

Verify

curl -s http://127.0.0.1:8402/health | jq .
curl -s http://127.0.0.1:8402/stats | jq .

Use

Set iblai-router/auto as the model for any scope:

Scope How
Cron job Set model to iblai-router/auto in job config
Subagents agents.defaults.subagents.model = "iblai-router/auto"
Per-session /model iblai-router/auto
All sessions agents.defaults.model.primary = "iblai-router/auto"

Tip: Keep the main interactive session on a fixed model (e.g. Opus). Use the router for cron jobs, subagents, and background tasks where cost savings compound.

Customize

All config lives in ~/.openclaw/workspace/router/config.json and hot-reloads on save — no restart needed.

Models

Change the models per tier:

{
  "models": {
    "LIGHT":  "claude-3-5-haiku-20241022",
    "MEDIUM": "claude-sonnet-4-20250514",
    "HEAVY":  "claude-opus-4-20250514"
  }
}

Non-Anthropic models (OpenAI, Google)

Set apiBaseUrl to route through OpenRouter:

{
  "models": {
    "LIGHT":  "openai/gpt-4.1-mini",
    "MEDIUM": "openai/gpt-4.1",
    "HEAVY":  "openai/o3"
  },
  "apiBaseUrl": "https://openrouter.ai/api/v1"
}

Update the API key in the systemd service when switching providers, then systemctl daemon-reload && systemctl restart iblai-router.

Scoring

Keyword lists control which tier handles a request:

  • simpleKeywords, relayKeywords → push toward LIGHT (cheap)
  • imperativeVerbs, codeKeywords, agenticKeywords → push toward MEDIUM
  • technicalKeywords, reasoningKeywords, domainKeywords → push toward HEAVY (capable)

Tune boundaries and weights in config.json to match your workload. See the full README for details.

Uninstall

bash "$(dirname "$0")/scripts/uninstall.sh"

Stops the service, removes the systemd unit, and deletes router files. Reminder: switch any workloads using iblai-router/auto back to a direct model first.

Usage Guidance
This package implements a local proxy and will install a systemd service and modify your OpenClaw config. Before installing: 1) Inspect server.js and config.json yourself to confirm behavior and upstream URLs. 2) Edit scripts/install.sh to avoid auto-extracting your API key (the script greps ~/.openclaw/agents/main/agent/auth-profiles.json) — do not allow the installer to embed secrets into /etc/systemd/system/*.service. Prefer using an EnvironmentFile with restricted permissions or systemd secret mechanisms, or export ANTHROPIC_API_KEY at runtime instead. 3) Back up ~/.openclaw/openclaw.json and test registration manually rather than letting the installer modify it automatically. 4) If you must run it, run in an isolated environment (container or VM) first and verify that the router only forwards to your configured LLM provider. 5) After install, check /etc/systemd/system/iblai-router.service for embedded secrets and remove/rotate any secret that was written there. The inconsistencies (metadata claiming no env vars / instruction-only vs included code that needs a key and writes configs) are likely sloppy engineering but could expose secrets if installed without care.
Capability Analysis
Type: OpenClaw Skill Name: iblai-openclaw-router Version: 1.0.0 The skill bundle is classified as suspicious due to two primary vulnerabilities, despite its stated benign purpose of cost-optimizing model routing. First, the `scripts/install.sh` script reads the sensitive `~/.openclaw/agents/main/agent/auth-profiles.json` file to auto-detect the Anthropic API key. While this key is intended for local use by the systemd service, accessing this credential file is a high-risk operation. Second, the `server.js` proxy allows the `apiBaseUrl` to be configured in `config.json` to an arbitrary endpoint. If an attacker could manipulate `config.json` (e.g., via prompt injection against the agent), this could lead to the exfiltration of the API key and all LLM prompt/response data to an attacker-controlled server. While the documentation suggests legitimate use with OpenRouter, the underlying capability is a significant vulnerability. These are risky capabilities without clear evidence of intentional malicious exploitation within the provided files, hence 'suspicious' rather than 'malicious'.
Capability Assessment
Purpose & Capability
The code and README implement a local Anthropic/OpenRouter proxy which matches the stated purpose. However the registry metadata declared 'no required env vars' and 'instruction-only' while the package includes server.js and install scripts that require an ANTHROPIC_API_KEY and create a systemd service — an incoherence between claims and actual requirements.
Instruction Scope
SKILL.md and README instruct running scripts that will copy files to ~/.openclaw/workspace/router, create/enable a systemd service, and modify ~/.openclaw/openclaw.json to register the provider. The installer also attempts to auto-detect an Anthropic key by grepping ~/.openclaw/agents/main/agent/auth-profiles.json. Reading/writing other agent config and extracting API keys is outside a purely 'instruction-only' description and broadens scope.
Install Mechanism
Install is local (no external downloads) and just copies files and creates a systemd unit. That itself is reasonable for a local proxy, but the installer writes the detected Anthropic API key directly into the systemd unit (Environment=ANTHROPIC_API_KEY=...). Embedding secrets into unit files can expose them to other users/processes and is poor secret management.
Credentials
The package metadata declares no required env vars, but server.js requires ANTHROPIC_API_KEY and the install script actively searches for the user's Anthropic key and places it into the unit file. The README also suggests configuring 'apiKey passthrough' in OpenClaw, but the router ignores incoming x-api-key and uses the environment key — this mismatch is confusing and potentially leads to unexpected key usage/exposure.
Persistence & Privilege
The installer creates a persistent systemd service (Restart=always) and registers a model provider in OpenClaw config. Persistent local services and config changes are expected for this functionality, but combined with the secret-handling behavior above this persistence increases the blast radius if misconfigured.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install iblai-openclaw-router
  3. After installation, invoke the skill by name or use /iblai-openclaw-router
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of iblai-router: a zero-dependency, cost-optimizing proxy for OpenClaw. - Automatically routes requests to the cheapest capable Claude model (Haiku, Sonnet, Opus) using a weighted scoring system. - Supports Anthropic models directly; OpenAI and Google models supported via OpenRouter integration. - Easy installation, health verification, and customizable configuration without service restarts. - Scoring algorithm leverages keyword lists to select appropriate model tier for each request. - Includes simple uninstall script and guidance for safely switching workloads.
Metadata
Slug iblai-openclaw-router
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Iblai Openclaw Router?

Cost-optimizing model router for OpenClaw. Automatically routes each request to the cheapest capable Claude model (Haiku/Sonnet/Opus) using weighted scoring.... It is an AI Agent Skill for Claude Code / OpenClaw, with 602 downloads so far.

How do I install Iblai Openclaw Router?

Run "/install iblai-openclaw-router" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Iblai Openclaw Router free?

Yes, Iblai Openclaw Router is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Iblai Openclaw Router support?

Iblai Openclaw Router is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Iblai Openclaw Router?

It is built and maintained by Neuralshift1 (@neuralshift1); the current version is v1.0.0.

💬 Comments