Nietzsche247

Context Sentinel

AI Agentv1.0.0
By Nietzsche247Updated 2026-05-17context-sentinel@clawhub_nietzsche247/context-sentinel
Task AutomationWorkflow OrchestrationContext Management#Cron Job

According to AlphaMoat, as of 2026-09, Context Sentinel has 2,510 downloads and 4 stars — ranked #4,090 of 5,078 AI skills overall, and #832 of 969 in AI Agent.

Installs
102
Downloads
2.5K
Stars
4
Overall Rank
#4,090
Top 81% overall · Top 86% in AI Agent
PlatformInstallsDownloadsStarsComments
ClawHub ↗762.5K42
SkillHub ↗1022.5K4—

Platforms count differently and update at different times.

What this skill does

The guide suggests running the check periodically through cron or a heartbeat, but the referenced script implementation is not included in the available material. Review the actual logic and confirm authorization boundaries for model switching and handoff before automation; do not execute unverified actions based only on an output string.

Profile published 2026-10-29

What you can do with it

  • Plan how to integrate periodic context checks.
  • Explain the handling branches represented by the status output.
  • Identify the script and handoff logic that must be reviewed before automation.

When to use it

  • When planning session-context monitoring or model-switching workflows.
  • Before adding status checks to a heartbeat or scheduled job.
  • Before enabling automatic switching or writing handoff files, when the actual script and authorization need review.

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Explain the status-output branches and next manual review steps from the guide; do not switch models or write handoff files.
Draft a safety-review checklist for periodic checks and identify the missing script and handoff logic that must be examined first.

Monthly Trend

Downloads2.5K
1.1K1.9K2.6K2026-03 · Downloads 1.2K2026-05 · Downloads 1.8K2026-07 · Downloads 2.2K2026-08 · Downloads 2.4K2026-09 · Downloads 2.5K26-0326-09
Stars4
3452026-03 · Stars 42026-05 · Stars 42026-07 · Stars 42026-08 · Stars 42026-09 · Stars 426-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-092.5K—4
2026-082.4K+8.4%4
2026-072.2K—4
2026-051.8K—4
2026-031.2K—4

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

2.4 KB · ClawHub v1.0.0
---
name: context-sentinel
description: "Monitors session context and automatically manages model switching based on a cascading protocol. Use as part of a heartbeat or cron job to maintain session health and optimize token usage."
version: 1.0.0
---

# Context Sentinel

This skill provides a script to automate the "Cascading Model Protocol," ensuring the agent gracefully degrades from high-cost models to high-context models as the session grows.
Show all (70 lines)
## Protocol Summary

1.  **Opus 4.6:** Use until 80% context, then switch to Opus 4.5.
2.  **Opus 4.5:** Use until 80% context, then switch to Gemini 2.5 Pro.
3.  **Gemini Pro:** Use until 80% context, then trigger a handoff.

This skill operationalizes the logic defined in `MEMORY.md`.

## How to Use

This skill is designed to be run periodically, either via a `cron` job or as part of the main agent's `HEARTBEAT.md` checklist.

### Workflow

1.  **Execute the script:**
    Run the `check_context.ps1` script to get the current session status and determine the required action.

    ```powershell
    powershell -File scripts/check_context.ps1
    ```

2.  **Evaluate the output:**
    The script will return one of three possible string commands:
    *   `SWITCH_TO:<model_id>`
    *   `HANDOFF_NOW`
    *   `STATUS_OK`

3.  **Take Action:**
    Based on the output, execute the appropriate agent command.

    *   If `SWITCH_TO:<model_id>`, run `session_status` with the new model ID:
        ```
        session_status model=<model_id>
        ```

    *   If `HANDOFF_NOW`, trigger the handoff process by writing to the handoff file. This is typically done by running a specific, pre-defined prompt or script.

    *   If `STATUS_OK`, no action is needed.

### Example Usage in `HEARTBEAT.md`

You can replace the manual checks in your `HEARTBEAT.md` with a call to this skill's script.

**Old `HEARTBEAT.md`:**
```markdown
## Cascading Model Protocol (Check Every Heartbeat)
1.  **Check Status:** Get current model and context %.
2.  **Opus 4.6:** If model is `Opus 4.6` and context > 80% -> Switch to `Opus 4.5`.
...
```

**New `HEARTBEAT.md` using this skill:**
```markdown
## Context Sentinel (Check Every Heartbeat)
1. Run `powershell -File skills/context-sentinel/scripts/check_context.ps1`.
2. Evaluate the output and take action (`SWITCH_TO`, `HANDOFF_NOW`, or `STATUS_OK`).
```

This makes the logic reusable and keeps the `HEARTBEAT.md` file clean and focused on execution.

Popular in AI Agent

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.