← 返回 Skills 市场
dhardie

LLM Supervisor

作者 dhardie · GitHub ↗ · v0.3.0
cross-platform ⚠ suspicious
2900
总下载
3
收藏
11
当前安装
7
版本数
在 OpenClaw 中安装
/install llm-supervisor
功能描述
Graceful rate limit handling with Ollama fallback. Notifies on rate limits, offers local model switch with confirmation for code tasks.
使用说明 (SKILL.md)

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

# 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.

安全使用建议
This skill is not obviously malicious, but review and test it before enabling in production: - Behavior mismatch: SKILL.md/README give the impression of 'ask before switching', but the code immediately switches to local on rate-limit events and only blocks code tasks. If you need an explicit ask-before-switch flow for non-code tasks, modify the onLLMError handler. - Configuration inconsistencies: The code checks ctx.config.confirmationPhrase but skill.json lists requireConfirmationForCode; there's no guaranteed default confirmationPhrase. Without a configured confirmationPhrase, local code tasks will be blocked until you set one. Verify and set these config keys (e.g., localModel, confirmationPhrase, requireConfirmationForCode) as desired. - Confirmation detection is a simple substring match of the last user message (case-insensitive). That can produce false positives or be accidentally triggered; consider a stricter confirmation mechanism if needed. - The skill forces 'anthropic:default' in cloud mode, which may override your intended cloud provider/profile. If you use different cloud profiles, adjust onAgentStart. - The skill points local Ollama at http://127.0.0.1:11434 — ensure the local Ollama server is trusted and secured. Recommended actions before install: inspect/adjust config defaults, test in a non-production workspace, and consider adding explicit user prompts for switching non-code workloads if you want user consent prior to any auto-switch.
功能分析
Type: OpenClaw Skill Name: llm-supervisor Version: 0.3.0 The OpenClaw AgentSkills skill 'llm-supervisor' is designed to manage LLM usage, gracefully handling cloud rate limits by switching to a local Ollama model. The code and documentation consistently align with this stated purpose, implementing features like automatic fallback, user notification, and explicit confirmation for code generation tasks when using local models. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, prompt injection attempts against the agent, obfuscation, or suspicious supply chain practices. All operations are performed through the OpenClaw SDK and are transparently communicated to the user, indicating benign intent.
能力评估
Purpose & Capability
The skill's name/description align with the implementation: it listens for LLM errors, switches the agent to a local Ollama model (baseUrl http://127.0.0.1:11434), and blocks code tasks until confirmation. It does not request external credentials or unusual binaries. Note: onAgentStart forces 'anthropic:default' when in cloud mode which may override user-selected cloud providers unexpectedly.
Instruction Scope
SKILL.md and README describe offering a fallback and asking the user; the implementation actually auto-switches to local when a rate-limit error is detected and then notifies users. Code tasks are blocked until the user confirms, but the auto-switch happens immediately for non-code work. The confirmation check looks for ctx.config.confirmationPhrase inside the last user message (case-insensitive substring match), which may be brittle (false positives/negatives) and can be bypassed or accidentally satisfied. If confirmationPhrase is not configured, the current code will always treat it as not confirmed, effectively blocking local code tasks indefinitely.
Install Mechanism
Instruction-only + bundled source; no install spec, no downloads, and no external package installation. Risk from install mechanism is low.
Credentials
The skill requires no environment variables, no credentials, and no special config paths. The requested capabilities (changing agent LLM profile, storing a small state) are proportionate to its stated purpose.
Persistence & Privilege
The skill registers hooks that alter new agents' LLM profiles and can block task execution — this is expected for a supervisor-type skill. always:false (not force-included) is appropriate. Be aware that it broadcasts notifications via ctx.notify.all when switching modes (may notify all users).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install llm-supervisor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /llm-supervisor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.3.0
Initial release
v0.2.0
Clean publish - rate limit detection, cloud/local switching, safety confirmation
v0.1.3
Clean publish with SKILL.md, dist, all hooks
v0.1.2
- Updated skill version to 0.1.2 in skill.json. - No functional or documentation changes.
v0.1.1
- Simplified and condensed documentation in SKILL.md for easier reading. - Clarified supported features and commands. - Added explicit confirmation phrase for local code generation. - Listed the default local model directly. - Reduced description length for improved accessibility.
v0.1.0
Initial release. - Automatically switches between cloud and local LLMs to prevent downtime from rate limits - Ensures new agents inherit the current LLM mode - Explicit user confirmation required before local LLMs can generate code - Offers commands to check status and switch LLM modes manually - Provides configuration options for switching behavior and safety
v1.0.0
LLM Supervisor 1.0.0 – Automatic LLM Fallbacks and Safe Switching - Automatically detects cloud LLM (e.g., Anthropic) rate limits and switches the main agent to a local LLM (Ollama) to prevent downtime. - Ensures new agents inherit the current (cloud or local) LLM mode. - Requires explicit user confirmation before allowing code-generation via local LLMs to maintain code quality. - Provides commands for status checking and manual switching between cloud and local modes. - Offers configurable options for model selection, switching behavior, and confirmation safety.
元数据
Slug llm-supervisor
版本 0.3.0
许可证
累计安装 14
当前安装数 11
历史版本数 7
常见问题

LLM Supervisor 是什么?

Graceful rate limit handling with Ollama fallback. Notifies on rate limits, offers local model switch with confirmation for code tasks. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2900 次。

如何安装 LLM Supervisor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install llm-supervisor」即可一键安装,无需额外配置。

LLM Supervisor 是免费的吗?

是的,LLM Supervisor 完全免费(开源免费),可自由下载、安装和使用。

LLM Supervisor 支持哪些平台?

LLM Supervisor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 LLM Supervisor?

由 dhardie(@dhardie)开发并维护,当前版本 v0.3.0。

💬 留言讨论