Model Guard for Openclaw

An automated quota monitoring and model switching tool for Anti-Gravity LLMs.

sarielwang93
v1.0.0
Feb 8, 2026
2
2.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install model-guard

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install model-guard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Model Guard?

Model Guard is a specialized utility for the Openclaw Skills ecosystem designed to maximize uptime and cost-efficiency when working with large language models. It continuously monitors Anti-Gravity model quotas and dynamically reconfigures your environment to use the provider with the most available resources. This ensures that your AI agents remain functional even when specific model limits are reached, providing a seamless failover mechanism that keeps your development pipeline moving.

By leveraging this tool, developers can avoid the frustration of interrupted services due to quota exhaustion. As a core component of Openclaw Skills, Model Guard acts as a protective layer, ensuring that your default model is always the one best equipped to handle the next request, while providing a reliable safety net through its fallback logic.

Model Guard Use Cases

  • Preventing Quota Exceeded errors during long-running agentic workflows.
  • Automatically cycling through multiple model providers to balance load effectively.
  • Ensuring basic agent functionality remains active with a fallback model during high-usage periods.
  • Maintaining high availability for autonomous systems built with Openclaw Skills.

How Model Guard Works

  1. The skill queries the current API usage and remaining quotas for all configured Anti-Gravity models.
  2. It compares the remaining percentages and identifies the model currently holding the highest capacity.
  3. The system programmatically updates the environment configuration to set this model as the new default.
  4. If the logic detects that all primary models have fallen below the 20% threshold, it automatically triggers a switch to the gemini-flash fallback model.

Model Guard Setup

To get started with this skill in your environment, follow these steps:

# Navigate to your skill directory
cd skills/model-guard

# Trigger the guard manually to verify configuration
model-guard

For automated monitoring, it is recommended to set up a cron job or heartbeat trigger. To check quotas every 30 minutes, add the following to your crontab:

*/30 * * * * model-guard

Model Guard Data Schema & Taxonomy

The skill manages its logic and state through a centralized configuration file. Users can modify these parameters within the Openclaw Skills file structure:

Parameter Description Default Value
THRESHOLD The percentage of remaining quota that triggers the fallback mechanism. 20%
FALLBACK_MODEL The specific model ID used when all primary models are exhausted. gemini-flash
MONITOR_LIST The array of Anti-Gravity models to be tracked by the guard. Anti-Gravity Models

Model Guard Advanced Features

  • Customizable usage thresholds to prevent total exhaustion of premium model tokens.
  • Integration with heartbeat services for real-time model health monitoring.
  • Seamless failover to native models to ensure zero-downtime for Openclaw Skills agents.
  • Low-overhead execution designed for frequent background monitoring.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*