higress-group/higress-standalone/higress-auto-router
Claude Code and agent skill by higress-group/higress-standalone
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install higress-group/higress-standalone/higress-auto-routerSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Higress Auto Router SKILL
Configure automatic model routing based on user's natural language requests.
Description
This skill enables users to configure Higress AI Gateway's model-router plugin through natural language commands. When a user describes their routing preference (e.g., "route to claude-opus-4.5 when solving difficult problems"), this skill will:
- Analyze user's request to understand the routing intent
- Generate appropriate regex patterns that are distinctive and easy to remember
- Modify model-router configuration file inside the container at
/data/wasmplugins/model-router.internal.yaml - Trigger Higress configuration reload (no container restart needed)
- Confirm the configuration and explain how to trigger the route
When to Use
Use this skill when:
- User wants to configure automatic model routing
- User mentions keywords like "route to", "switch model", "use model when", "auto routing"
- User describes scenarios that should trigger specific models
Prerequisites
- Higress AI Gateway container running
- Container name:
higress-ai-gateway(default) or user-specified - Ability to execute
docker execcommands
Configuration Location
Inside Container: /data/wasmplugins/model-router.internal.yaml Default Container Name: higress-ai-gateway
Workflow
Step 1: Parse User Intent
Extract from the user's request:
- Target model: The model they want to route to (e.g.,
claude-opus-4.5,qwen-coder) - Trigger scenario: When they want this routing to happen (e.g., "difficult problems", "coding tasks")
Step 2: Generate Pattern and Trigger Phrase
Based on the scenario, generate:
- A memorable trigger phrase users can use (Chinese and English options)
- A regex pattern to match the trigger phrase
Common mappings:
| Scenario | Trigger Phrases | Pattern | |||
|---|---|---|---|---|---|
| Complex/difficult reasoning | 深入思考, deep thinking | `(?i)^(深入思考 | deep thinking)` | ||
| Coding tasks | 写代码, code:, coding: | `(?i)^(写代码 | code: | coding:)` | |
| Creative writing | 创意写作, creative: | `(?i)^(创意写作 | creative:)` | ||
| Translation | 翻译:, translate: | `(?i)^(翻译: | translate:)` | ||
| Math problems | 数学题, math: | `(?i)^(数学题 | math:)` | ||
| Image generation | 画图:, draw:, image: | `(?i)^(画图: | draw: | image:)` | |
| Quick answers | 快速回答, quick: | `(?i)^(快速回答 | quick:)` |
Step 3: Determine Container Name
Try to find the Higress container:
- Default:
higress-ai-gateway - If not found, list running containers and ask user to specify
- Use
docker ps --filter "name=higress"to find containers
Step 4: Read Existing Configuration
Read the current model-router.internal.yaml file from inside the container:
Example configuration structure:
Step 5: Check for Conflicts
Before adding a new rule:
- Parse existing rules from config
- Check if the new pattern conflicts with existing ones
- If conflict detected, suggest alternative trigger phrases
Step 6: Modify Configuration File Inside Container
Use docker exec to modify the YAML file directly inside the container:
Recommended approach: Copy out, modify, copy in for safety and proper YAML formatting.
Important:
- Ensure proper YAML indentation (2 spaces per level)
- Keep existing
modelToHeaderconfiguration - Use
(?i)for case-insensitive patterns - Use
^to anchor pattern to message start (prevents false matches)
Step 7: Trigger Configuration Reload
After modifying the configuration, trigger Higress to reload the plugin configuration without restarting the container:
Note: Higress watches configuration files in /data/wasmplugins/ and automatically reloads when they are modified. Touching the file ensures the timestamp is updated to trigger the reload.
Step 8: Confirm to User
After successful configuration, inform the user:
Example response:
Error Handling
- Container not found: List running containers and ask user to specify the correct container name
- Pattern conflicts: Suggest alternative trigger phrases
- Invalid model name: List available models from configured providers
- YAML parsing errors: Report the issue and suggest reviewing the file manually
- Permission errors: Ensure the Docker socket is accessible and the user has necessary permissions
Examples
User: 我希望在解决困难问题时路由到claude-opus-4.5的模型
Response:
User: 写代码的时候用qwen-coder
Response:
Implementation Notes
When implementing this skill:
- Determine container name: Use
docker psto find the running Higress container - Use docker cp for safety: Copy the file out, modify with a YAML library, then copy it back
- Validate YAML: Before copying back, validate the YAML syntax
- Trigger reload: Higress automatically watches for file changes in
/data/wasmplugins/ - No restart needed: Configuration changes are hot-reloaded by Higress
- Handle timestamps: Touch the file after modification to ensure Higress detects the change
Example Python Implementation
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingall-in-one/clawdbot-integration/plugin/higress-auto-router/SKILL.md
Popularity
- Repository stars
- 111
- Repository forks
- 27
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/higress-group/higress-standalone/higress-auto-router)