Перейти к содержимому
TakoAPI
Назад к навыкам

session-watchdog

от xbillwatsonx

Productivity & Tasks
638Число загрузок по данным clawskills.sh
2Звёзды
0Просмотры
0 лайковВойдите, чтобы поставить лайк навыку
—Ещё нет оценок
Ваша оценка

Кратко

Monitor session context levels and proactively save checkpoints before compaction.

Описание

Что делает этот навык

Monitors token usage in active Claude sessions and triggers checkpoint saves to memory files before context compaction occurs. Tracks four threshold levels from safe to full (0–197k+ tokens) and prompts the user to continue, restart, or pause when nearing limits.

Saves context state before compaction happens automatically, giving users a choice instead of silently losing conversation history.

Когда его использовать

  • Checking remaining context before starting a large file edit
  • Saving pending tasks before a long conversation compacts
  • Answering 'how much context is left?' mid-session
  • Preserving decisions and configurations across session boundaries
  • Starting a new session with a recap of unresolved issues

Пример сценария

ВВОД

User asks: How much context do we have left?

АГЕНТ
  1. 1

    Run session_status to retrieve contextTokens value

  2. 2

    Compare tokens against defined thresholds (Safe / Warning / Critical / Full)

  3. 3

    If above 160k, read the current memory/YYYY-MM-DD.md file

  4. 4

    Append checkpoint with decisions, pending tasks, and modified file paths

  5. 5

    Alert user with current percentage and ask whether to continue, restart, or pause

ВЫВОД

Context is at ~82% (160k tokens). Checkpoint saved to memory/2026-03-19.md with pending tasks and recent decisions. User prompted to choose next step.

Установка

clawhub install xbillwatsonx/session-watchdog

Выполните команду CLI или вставьте промпт в Claude Code, Cursor, Codex — любой кодинг-агент, которым пользуетесь.

Ссылки