Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Automates model switching across a cascading protocol as session context grows. Runs as a cron job or heartbeat check, outputting one of three commands: switch model, trigger handoff, or do nothing. Designed to reduce token costs by degrading from high-cost to high-context models at defined thresholds.
Centralizes cascading model logic into a single reusable script instead of duplicating threshold checks across every agent's heartbeat file.
When to use it
- Switching from Opus 4.6 to a cheaper model mid-session
- Preventing context overflow in long-running agent sessions
- Automating handoffs before a session hits its limit
- Replacing manual context checks in a HEARTBEAT.md workflow
- Keeping multi-step agent pipelines alive across model boundaries
Example Workflow
Here's how your AI assistant might use this skill in practice.
User runs the context sentinel as part of a scheduled heartbeat
- 1Execute check_context.ps1 via PowerShell
- 2Read the script output string
- 3If SWITCH_TO:<model_id>, call session_status with the new model ID
- 4If HANDOFF_NOW, write to the handoff file to trigger the handoff process
- 5If STATUS_OK, take no action
Session continues on the appropriate model or handoff is initiated before context is exhausted