agent-restore-context-setup
Installation
SKILL.md
Setup Restore Context
Set up a generic SessionStart hook that re-injects context after /clear or
/compact. Any skill that writes a .agent-restore-context-<name> file in the
project root will have its contents automatically injected into the fresh
conversation.
How It Works
- Skills write
.agent-restore-context-<skill-name>files with resume prompts. - A
SessionStarthook with matcherclear|compactrunsagent-restore-context.sh. - The script globs for
.agent-restore-context-*and outputs their contents. - The model receives that output and follows the resume instructions.
- Skills manage their own file lifecycle (write/delete).