# Send Context Sentinel to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "context-sentinel",
    "name": "Context Sentinel",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/Nietzsche247/context-sentinel",
    "canonicalUrl": "https://clawhub.ai/Nietzsche247/context-sentinel",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/context-sentinel",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-sentinel",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "context-sentinel",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T18:50:58.682Z",
      "expiresAt": "2026-05-07T18:50:58.682Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-sentinel",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-sentinel",
        "contentDisposition": "attachment; filename=\"context-sentinel-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "context-sentinel"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/context-sentinel"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/context-sentinel",
    "downloadUrl": "https://openagent3.xyz/downloads/context-sentinel",
    "agentUrl": "https://openagent3.xyz/skills/context-sentinel/agent",
    "manifestUrl": "https://openagent3.xyz/skills/context-sentinel/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/context-sentinel/agent.md"
  }
}
```
## Documentation

### 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.

### Protocol Summary

Opus 4.6: Use until 80% context, then switch to Opus 4.5.
Opus 4.5: Use until 80% context, then switch to Gemini 2.5 Pro.
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

Execute the script:
Run the check_context.ps1 script to get the current session status and determine the required action.
powershell -File scripts/check_context.ps1



Evaluate the output:
The script will return one of three possible string commands:

SWITCH_TO:<model_id>
HANDOFF_NOW
STATUS_OK



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:

## 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:

## 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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Nietzsche247
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T18:50:58.682Z
- Expires at: 2026-05-07T18:50:58.682Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/context-sentinel)
- [Send to Agent page](https://openagent3.xyz/skills/context-sentinel/agent)
- [JSON manifest](https://openagent3.xyz/skills/context-sentinel/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/context-sentinel/agent.md)
- [Download page](https://openagent3.xyz/downloads/context-sentinel)