cache-monitor

Hash static-layer files at session start to detect prompt cache drift.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Ghenghis/openclaw-claude-code-integration --skill cache-monitor-ghenghis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cache-monitor
Source: https://github.com/Ghenghis/openclaw-claude-code-integration/tree/main/skills/cache-monitor
Command: npx skills add https://github.com/Ghenghis/openclaw-claude-code-integration --skill cache-monitor-ghenghis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

追踪静态层文件哈希,检测 prompt cache 失效,帮助快速定位导致缓存失效的变更。

Core Features & Use Cases

  • 哈希对比静态层文件(SOUL.md、AGENTS.md、TOOLS.md、USER.md、IDENTITY.md、HEARTBEAT.md、STATIC.md),在会话启动时自动检测变更
  • 变更时输出警告,未变更则静默通过,方便持续集成与运维跟踪
  • 维持本地状态文件 ~/.openclaw/workspace/.cache-monitor.json,包含 last_updated、hashes、change_log

Quick Start

初始化哈希记录并在每次会话启动时通过 PreAgentStart 钩子自动监控缓存漂移。

Frequently Asked Questions about cache-monitor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect prompt cache drift in static files at session start?

You can detect prompt cache drift by hashing key static files like SOUL.md and AGENTS.md at session start using a PreAgentStart hook. The tool compares current hashes against stored values to warn you of any changes.

What is static layer prompt cache drift and how does hashing detect it?

Static layer prompt cache drift occurs when synchronized files change unexpectedly, invalidating cached prompts. Hashing detects this drift by generating unique file signatures at session start and comparing them against a baseline to emit warnings if they differ.

How to track static layer file changes for OpenClaw workflows?

Track static layer file changes in OpenClaw workflows by initializing a hash record that monitors core files. A script-based interface checks these hashes automatically via a session-start hook, maintaining a local state file to log changes.

Does cache-monitor require any external dependencies to track file hashes?

No, cache-monitor requires zero external dependencies to track file hashes. It operates independently using a script-based interface to initialize and check file hashes, storing the state locally in a JSON format without needing additional packages.

What happens when a static layer file hash mismatch is detected during a session?

When a static layer file hash mismatch is detected during a session, the system emits a warning to alert you of the drift. If no changes are found, it silently passes, allowing continuous integration and operations tracking without interruption.

Can I integrate cache drift detection into continuous integration and operations tracking?

Yes, you can integrate cache drift detection into continuous integration and operations tracking. The tool provides a script-based interface that emits warnings on file changes and stays silent on pass-through, making it suitable for automated CI pipelines.