← 返回
未分类

claw-turbo

Zero-latency regex-based skill routing middleware for OpenClaw. Intercepts known user commands (deploy, restart, print, check logs, etc.) using compiled rege...
零延迟的基于正则表达式的技能路由中间件,用于 OpenClaw。通过编译的正则拦截已知的用户指令(如 deploy、restart、print、check logs 等),将其路由到对应技能。
jacobye2017-afk jacobye2017-afk 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 317
下载
💾 0
安装
1
版本
#latest

概述

What is claw-turbo?

claw-turbo is a zero-latency, zero-ML skill routing middleware that sits between OpenClaw and your local LLM (Ollama). It intercepts user messages using regex pattern matching and executes skill scripts directly — no LLM inference needed.

Simple commands get instant, perfect execution. Complex queries still go to your LLM.

User message → claw-turbo (regex match, <0.01ms)
                  ├── MATCH → execute script directly (0ms, 100% accurate)
                  └── NO MATCH → forward to LLM (normal processing)

Why use claw-turbo?

ApproachLatencyAccuracyDependencies
-------------------------------------------
claw-turbo5 us100%PyYAML only
LLM routing (Gemma/Llama)2-10s~80%Ollama + VRAM
Semantic routing50-200ms~95%embedding model

Local LLMs are unreliable for simple, repetitive commands:

  • They don't always follow tool-calling instructions
  • They hallucinate flags and wrong parameters
  • Context window limits cause instruction loss

Installation

git clone https://github.com/jacobye2017-afk/claw-turbo.git
cd claw-turbo
pip install -e .

Quick Start

1. Define routes in routes.yaml

routes:
  - name: deploy-staging
    description: "Deploy a service to staging"
    patterns:
      - 'deploy\s+(?P<service>\w+)\s+(?:to\s+)?staging'
    command: 'bash /opt/scripts/deploy.sh {{service}} staging'
    response_template: "Deployed {{service}} to staging"

  - name: restart-service
    patterns:
      - 'restart\s+(?P<service>[\w-]+)'
    command: 'systemctl restart {{service}}'
    response_template: "Restarted {{service}}"

2. Test matching

claw-turbo test "deploy auth-service to staging"
# MATCHED: deploy-staging
#   Captures: {'service': 'auth-service'}
#   Time: 4.8us

3. Start the proxy

claw-turbo serve --port 11435

Then change OpenClaw's Ollama baseUrl to http://127.0.0.1:11435.

Use Cases

  • DevOps: "restart nginx", "deploy to staging", "show logs for api-server"
  • Document processing: "print report ABC123", "generate invoice 456"
  • IoT / smart office: "turn on lights", "set AC to 22 degrees"
  • Data pipelines: "run ETL for 2024-01", "refresh dashboard"
  • Customer service: "check order ORD-789", "refund order ORD-789"

Features

  • Sub-microsecond regex matching (compiled patterns)
  • Named capture groups → template variables
  • Hot-reload routes.yaml (no restart needed)
  • Transparent HTTP proxy (Ollama API compatible)
  • Multi-language patterns (Chinese, English, any language)
  • Zero ML dependencies (PyYAML + stdlib only)
  • Works fully offline

CLI

claw-turbo serve [--port 11435]     Start HTTP proxy
claw-turbo test "message"           Test pattern matching
claw-turbo routes                   List all routes
claw-turbo add-skill <path>         Generate route from SKILL.md

Links

  • GitHub: https://github.com/jacobye2017-afk/claw-turbo
  • Author: Jacob Ye (@jacobye2017-afk)
  • License: MIT

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 23:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Find Skills

guipi888
场景驱动+关键词双模式技能发现工具。当用户用自然语言描述场景/需求(如"我想做一个海报""帮我分析股票"),或明确说"安装技能/find skills/找个skill"时,自动从官方内置、本地已安装、SkillHub、虾评、GitHub、C
★ 1,488 📥 552,300
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,124 📥 843,201
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 843 📥 321,788