Nietzsche247

Context Sentinel

AIエージェントv1.0.0
作者:Nietzsche247更新日 2026-05-17context-sentinel@clawhub_nietzsche247/context-sentinel
タスク自動化ワークフロー編成コンテキスト管理#Cron Job

AlphaMoatによると、2026-09時点でContext Sentinelのダウンロード数は2,510、スター数は4で、AIスキル全体5,078件中4,090位、AIエージェントでは969件中832位です。

インストール数
102
ダウンロード数
2510
スター数
4
総合順位
#4,090
全体の上位 81% · AIエージェントの上位 86%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗76251042
SkillHub ↗10224744—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

ガイドはcronやheartbeatで定期実行する方法を示しますが、参照されるスクリプトの実装は提供資料に含まれていません。自動化の前に実際のロジックを確認し、モデル切り替えや引き継ぎの許可範囲を確認してください。出力文字列だけを根拠に未検証の操作を実行しないでください。

資料公開日 2026-10-29

できること

  • 定期的なコンテキスト確認の組み込み方を計画する。
  • 状態出力に応じた処理分岐を説明する。
  • 自動化前に確認が必要なスクリプトと引き継ぎロジックを特定する。

使う場面

  • セッションコンテキストの監視やモデル切り替え手順を計画するとき。
  • heartbeatや定期ジョブに状態確認を追加する前。
  • 自動切り替えや引き継ぎファイル書き込みを有効にする前に、実スクリプトと許可範囲を確認するとき。

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

ガイドに基づいて状態出力の分岐と次の手動確認項目を説明してください。モデル切り替えや引き継ぎファイル書き込みは行わないでください。
定期確認の安全審査リストを作成し、先に確認すべき欠落スクリプトと引き継ぎロジックを示してください。

月次の推移

ダウンロード数2510
1103185926142026-03 · ダウンロード数 12072026-05 · ダウンロード数 17772026-07 · ダウンロード数 21782026-08 · ダウンロード数 23622026-09 · ダウンロード数 251026-0326-09
スター数4
3452026-03 · スター数 42026-05 · スター数 42026-07 · スター数 42026-08 · スター数 42026-09 · スター数 426-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-092510—4
2026-082362+8.4%4
2026-072178—4
2026-051777—4
2026-031207—4

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 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.
すべて表示(全 70 行)
## 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.

AIエージェントの人気スキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。