Home Tutorials Categories Skills About
ZH EN JA KO
πŸ”€

Claw Router

Routing AI Models & Routing

Install Command

npx clawhub@latest install clawrouter

Installation Guide

1
Check Environment

Make sure Node.js 22+ and OpenClaw are installed. Run openclaw --version in your terminal to verify.

2
Run Installation

Run the install command above in your terminal. ClawHub will automatically download and install Claw Router to the ~/.openclaw/skills/ directory.

3
Verify Installation

Run openclaw skills list to check your installed skills and confirm Claw Router appears in the list.

4
Configure (Optional)

Follow the configuration instructions in the description below to add skill settings to ~/.config/openclaw/openclaw.json5.

Manual Installation: Copy the Skill folder to ~/.openclaw/skills/ or the skills/ directory in your project root. Make sure the folder contains a SKILL.md file.
Smart Routing Cost Optimization Multi-Model

Detailed Description

Claw Router is OpenClaw's intelligent dispatch center. It automatically selects the most suitable AI model based on the complexity, type, and user preferences of the conversation.

Core Features

  • Smart Routing: Uses cheaper, faster models for simple questions and high-end models for complex ones
  • Rule Configuration: Set routing rules, such as sending code questions to Claude and creative writing to GPT-4
  • Cost Optimization: Automatically balances answer quality with API spending
  • Load Balancing: Distributes requests across multiple models of equal capability
  • Fallback Mechanism: Automatically switches to backup models when the primary model is unavailable

Configuration

{
  skills: {
    clawrouter: {
      routes: [
        { match: "code|programming|debug", model: "claude-sonnet-4-20250514" },
        { match: "translate", model: "gpt-4o" },
        { match: "*", model: "claude-haiku" }  // Default
      ],
      fallbackModel: "claude-haiku",
      costLimit: 10  // Daily cost limit (USD)
    }
  }
}

Use Cases

  • Automatically select the most cost-effective model for different types of conversations
  • Keep API spending within budget
  • Automatically switch to backup models when the primary API is rate-limited or down
  • Assign different models based on user roles in team scenarios