TopRank Skills

Home / Claw Skills / Autres / llm-supervisor
Official OpenClaw rules 15%

llm-supervisor

Graceful rate limit handling with Ollama fallback. Notifies on rate limits, offers local model switch with confirmation for code tasks.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 llm-supervisor 技能。 若已安装,则直接安装 llm-supervisor 技能。

Overview

Skill Key
dhardie/llm-supervisor
Author
dhardie
Source Repo
openclaw/skills
Version
-
Source Path
skills/dhardie/llm-supervisor
Latest Commit SHA
2ac2355c91c04f62ae6b0b135fd261d6524ec2d6

Extracted Content

SKILL.md excerpt

# LLM Supervisor 🔮

Handles rate limits and model fallbacks gracefully.

## Behavior

### On Rate Limit / Overload Errors

When I encounter rate limits or overload errors from cloud providers (Anthropic, OpenAI):

1. **Tell the user immediately** — Don't silently fail or retry endlessly
2. **Offer local fallback** — Ask if they want to switch to Ollama
3. **Wait for confirmation** — Never auto-switch for code generation tasks

### Confirmation Required

Before using local models for code generation, ask:
> "Cloud is rate-limited. Switch to local Ollama (`qwen2.5:7b`)? Reply 'yes' to confirm."

For simple queries (chat, summaries), can switch without confirmation if user previously approved.

## Commands

### `/llm status`
Report current state:
- Which provider is active (cloud/local)
- Ollama availability and models
- Recent rate limit events

### `/llm switch local`
Manually switch to Ollama for the session.

### `/llm switch cloud`
Switch back to cloud provider.

## Using Ollama

```bash
# Check available models
ollama list

# Run a query
ollama run qwen2.5:7b "your prompt here"

# For longer prompts, use stdin
echo "your prompt" | ollama run qwen2.5:7b
```

## Installed Models

Check with `ollama list`. Configured default: `qwen2.5:7b`

## State Tracking

Track in memory during session:
- `currentProvider`: "cloud" | "local"  
- `lastRateLimitAt`: timestamp or null
- `localConfirmedForCode`: boolean

Reset to cloud at session start.

README excerpt

# LLM Supervisor

Automatically switches OpenClaw between cloud and local LLMs when rate limits occur — without silently degrading code quality.

## What this skill does

- Monitors cloud LLM errors (e.g. Anthropic rate limits)
- Automatically switches the **main agent** to a local Ollama model
- Ensures **new agents inherit** the active LLM mode
- Requires **explicit user confirmation** before running code tasks on local LLMs
- Automatically switches back to cloud when manually requested

## Why this exists

Cloud LLMs are powerful but rate-limited.  
Local LLMs are reliable but weaker for code.

This skill provides:
- Reliability without dead bots
- Transparency when switching models
- Safety for production codebases

## Default behavior

- Enabled by default
- Auto-switches to local on cloud rate limit
- Chat and planning are always allowed
- Code tasks on local require confirmation:
  `CONFIRM LOCAL CODE`

## Commands

- `/llm status` — show current mode
- `/llm switch local` — force local mode
- `/llm switch cloud` — return to cloud

## Configuration

The following options are configurable:

- `localModel` (default: `qwen2.5:7b`)
- `cooldownMinutes`
- `requireConfirmationForLocalCode`
- `confirmationPhrase`

## Safety

This skill will never:
- Silently downgrade code generation quality
- Burn cloud credits unexpectedly
- Modify existing agents mid-task

## License

MIT

Related Claw Skills