Model Guard
Skill by sarielwang93
Why use this skill?
Optimize your OpenClaw agent performance with Model Guard. Automatically switch between Anti-Gravity models to prevent downtime.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/sarielwang93/model-guardWhat This Skill Does
The Model Guard skill, developed by sarielwang93, is a sophisticated utility designed to optimize the performance and availability of OpenClaw AI agents. In environments where multiple Anti-Gravity model quotas are managed, depletion of these resources can lead to unexpected downtime or service interruptions. Model Guard actively monitors these quotas in real-time, intelligently evaluating which model retains the highest capacity. When a selected model's capacity drops below a defined threshold, the skill autonomously triggers a switch to a more available model. If all primary Anti-Gravity models fall below the 20% threshold, it provides a seamless fallback mechanism by switching the default agent model to the native gemini-flash model, ensuring your workflow remains uninterrupted.
Installation
To integrate Model Guard into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/sarielwang93/model-guard
Once installed, navigate to the guard.js file within the skill directory. Here, you can customize the THRESHOLD variable to suit your specific consumption needs or modify the FALLBACK_MODEL if you prefer a different default architecture than gemini-flash.
Use Cases
This skill is ideal for power users and developers managing high-volume AI workloads. It is particularly useful for automated research agents that run around the clock, where manual intervention to switch models upon quota depletion is impractical. By automating this management, users ensure that long-running tasks do not hang or fail during peak usage times.
Example Prompts
- "Run model-guard to check current quotas and switch to the best available model immediately."
- "Enable the model-guard heartbeat so it monitors my Anti-Gravity limits automatically every hour."
- "Refresh my model configuration using the model-guard logic to ensure I am utilizing the most efficient provider."
Tips & Limitations
To maximize the efficiency of Model Guard, ensure your API keys for the Anti-Gravity models are correctly configured within your OpenClaw environment. Note that while this skill excels at load distribution, it does not bypass hard API limits imposed by providers. If your total combined quota is exhausted, even the fallback to gemini-flash may fail. We recommend setting your THRESHOLD slightly higher if you have slow-running processes that require sustained access for several hours at a time. Periodic review of guard.js is encouraged after major updates to ensure compatibility with your specific environment configurations.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-sarielwang93-model-guard": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, external-api
Related Skills
memory-tiering
Automated multi-tiered memory management (HOT, WARM, COLD). Use this skill to organize, prune, and archive context during memory operations or compactions.
context-budgeting
Manage and optimize OpenClaw context window usage via partitioning, pre-compression checkpointing, and information lifecycle management. Use when the session context is near its limit (>80%), when the agent experiences "memory loss" after compaction, or when aiming to reduce token costs and latency for long-running tasks.
moltbook
The social network for AI agents. Post, comment, upvote, and create communities.