{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/context-sentinel",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-sentinel",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/context-sentinel",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Context Sentinel",
        "body": "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."
      },
      {
        "title": "Protocol Summary",
        "body": "Opus 4.6: Use until 80% context, then switch to Opus 4.5.\nOpus 4.5: Use until 80% context, then switch to Gemini 2.5 Pro.\nGemini Pro: Use until 80% context, then trigger a handoff.\n\nThis skill operationalizes the logic defined in MEMORY.md."
      },
      {
        "title": "How to Use",
        "body": "This skill is designed to be run periodically, either via a cron job or as part of the main agent's HEARTBEAT.md checklist."
      },
      {
        "title": "Workflow",
        "body": "Execute the script:\nRun the check_context.ps1 script to get the current session status and determine the required action.\npowershell -File scripts/check_context.ps1\n\n\n\nEvaluate the output:\nThe script will return one of three possible string commands:\n\nSWITCH_TO:<model_id>\nHANDOFF_NOW\nSTATUS_OK\n\n\n\nTake Action:\nBased on the output, execute the appropriate agent command.\n\n\nIf SWITCH_TO:<model_id>, run session_status with the new model ID:\nsession_status model=<model_id>\n\n\n\nIf 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.\n\n\nIf STATUS_OK, no action is needed."
      },
      {
        "title": "Example Usage in HEARTBEAT.md",
        "body": "You can replace the manual checks in your HEARTBEAT.md with a call to this skill's script.\n\nOld HEARTBEAT.md:\n\n## Cascading Model Protocol (Check Every Heartbeat)\n1.  **Check Status:** Get current model and context %.\n2.  **Opus 4.6:** If model is `Opus 4.6` and context > 80% -> Switch to `Opus 4.5`.\n...\n\nNew HEARTBEAT.md using this skill:\n\n## Context Sentinel (Check Every Heartbeat)\n1. Run `powershell -File skills/context-sentinel/scripts/check_context.ps1`.\n2. Evaluate the output and take action (`SWITCH_TO`, `HANDOFF_NOW`, or `STATUS_OK`).\n\nThis makes the logic reusable and keeps the HEARTBEAT.md file clean and focused on execution."
      }
    ],
    "body": "Context Sentinel\n\nThis 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.\n\nProtocol Summary\nOpus 4.6: Use until 80% context, then switch to Opus 4.5.\nOpus 4.5: Use until 80% context, then switch to Gemini 2.5 Pro.\nGemini Pro: Use until 80% context, then trigger a handoff.\n\nThis skill operationalizes the logic defined in MEMORY.md.\n\nHow to Use\n\nThis skill is designed to be run periodically, either via a cron job or as part of the main agent's HEARTBEAT.md checklist.\n\nWorkflow\n\nExecute the script: Run the check_context.ps1 script to get the current session status and determine the required action.\n\npowershell -File scripts/check_context.ps1\n\n\nEvaluate the output: The script will return one of three possible string commands:\n\nSWITCH_TO:<model_id>\nHANDOFF_NOW\nSTATUS_OK\n\nTake Action: Based on the output, execute the appropriate agent command.\n\nIf SWITCH_TO:<model_id>, run session_status with the new model ID:\n\nsession_status model=<model_id>\n\n\nIf 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.\n\nIf STATUS_OK, no action is needed.\n\nExample Usage in HEARTBEAT.md\n\nYou can replace the manual checks in your HEARTBEAT.md with a call to this skill's script.\n\nOld HEARTBEAT.md:\n\n## Cascading Model Protocol (Check Every Heartbeat)\n1.  **Check Status:** Get current model and context %.\n2.  **Opus 4.6:** If model is `Opus 4.6` and context > 80% -> Switch to `Opus 4.5`.\n...\n\n\nNew HEARTBEAT.md using this skill:\n\n## Context Sentinel (Check Every Heartbeat)\n1. Run `powershell -File skills/context-sentinel/scripts/check_context.ps1`.\n2. Evaluate the output and take action (`SWITCH_TO`, `HANDOFF_NOW`, or `STATUS_OK`).\n\n\nThis makes the logic reusable and keeps the HEARTBEAT.md file clean and focused on execution."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Nietzsche247/context-sentinel",
    "publisherUrl": "https://clawhub.ai/Nietzsche247/context-sentinel",
    "owner": "Nietzsche247",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}