context-restore
Reviewed
at commit 0e4c0dd
New version, not yet reviewed
Hands a skill or command call the current text of its file when the file changed on disk after the session loaded it, and hands the model a rules file or the…
0 upvotes
Log in to upvote or save- Made by
- Kerem Gok
- Pinned commit
-
0e4c0dd09165cae2933d79eda6069c6df477137f - What we checked
-
Fixes the case where a skill, command or rules file changed on disk after the session loaded it: the call gets the file's current text, and changed rules files and the global CLAUDE.md are sent to Claude again. It reads those files in your project and Claude config folder, writes nothing and uses no network.
Review details
Static review of the source at the pinned commit; not run. Registers session.start (reads CLAUDE_CONFIG_DIR or HOME to find the Claude config directory, records start time, registers /context-restore with on/off), skill.prompt (after the engine expanded a skill or command, compares the engine text with the file on disk and substitutes or appends the current file text; for skills also notes files of the skill folder Claude read that changed), tool.call for Read (main agent only; records the file's modification time), prompt.attachment of type instructions (records rules files under a /rules/ path and the global CLAUDE.md with their text) and prompt.submit (adds the new text of changed rules files as context for Claude). Runtime calls: $.fs.exists, $.fs.stat, $.fs.read (project .claude/commands, the config dir commands, plugins/installed_plugins.json for plugin install paths, SKILL.md files, rules files, global CLAUDE.md), $.env.get, $.store get/set for the on/off flag, $.sidebar and $.ui.log for messages. No network, no process calls, no writes. Contents it hands to Claude are files Claude already loaded or may read. npm dev dependencies not reviewed; the eslint config and Makefile are dev tooling not loaded by the hooks.
- What it uses
-
- Reads your prompts: yes
- Sees tool calls: yes
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
Hands a skill or command call the current text of its file when the file changed on disk after the session loaded it, and hands the model a rules file or the global CLAUDE.md that changed on disk.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/context-restore/)