Model Failover Guard
v1.0.0Automatically monitors model health and switches between primary and fallback models to maintain stability and recover when possible.
⭐ 0· 292·3 current·3 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (model failover) align with required actions: reading/writing ~/.openclaw/openclaw.json, enumerating configured models, testing models via the 'openclaw' CLI, and restarting the gateway. All requested resources and behaviors are coherent with implementing a failover guard.
Instruction Scope
SKILL.md and the runtime script limit actions to model health checking, switching the primary model in OpenClaw config, saving state/logs under ~/.openclaw, and restarting the gateway. The script does not access unrelated system paths, environment secrets, or external network endpoints beyond invoking the local 'openclaw' CLI.
Install Mechanism
This is instruction-only in the registry (no automated install spec). README suggests installing via 'npx skills add ...' from GitHub, but nothing is downloaded/installed automatically by the skill itself in the package contents. Included Python script is local and executed by the user. No high-risk external downloads or obscure URLs are used in the provided files.
Credentials
The skill requests no environment variables, credentials, or unrelated config paths. It reads/writes OpenClaw's config and state/log files under the user's home directory — appropriate and necessary for its function. No broad or unrelated secrets are requested.
Persistence & Privilege
The skill will modify the OpenClaw config (~/.openclaw/openclaw.json), write state and logs (~/.openclaw/*), and restart the OpenClaw gateway via 'openclaw gateway restart'. These behaviors are expected for a failover tool but do require filesystem and process-control privileges (ability to write the config and restart the service). 'always' is false and the skill does not attempt to alter other skills' configs.
Assessment
This skill appears to do what it claims, but review and take these precautions before enabling it: 1) Backup your OpenClaw config (~/.openclaw/openclaw.json) so you can restore the primary model if needed. 2) Verify the 'openclaw' CLI is the expected binary on PATH (the script calls it to test models and restart the gateway). 3) Inspect config.json (copy of config.example.json) to confirm preferred/excluded providers and candidate models — ensure no unexpected provider IDs appear that could point to untrusted endpoints. 4) Run the script once in a non-production environment (python3 .../failover.py once) to observe behavior and logs (~/.openclaw/failover.log) before enabling a loop or systemd service. 5) If you have strict process-control policies, note the script restarts the gateway; plan for maintenance windows. Overall the code is coherent and limited to the stated purpose; use the normal operational precautions above.Like a lobster shell, security has layers — review code before you run it.
auto-switchvk971969ng4w32ppr0he0yw4dx9827bv6failovervk971969ng4w32ppr0he0yw4dx9827bv6latestvk971969ng4w32ppr0he0yw4dx9827bv6modelvk971969ng4w32ppr0he0yw4dx9827bv6
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
