agent-restore-context-setup
Pass
Audited by Gen Agent Trust Hub on May 16, 2026
Risk Level: SAFEPROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [PROMPT_INJECTION]: The skill is designed to perform indirect prompt injection as a core feature. It reads the contents of local files matching a specific pattern and injects them verbatim into the model's context during session startup.
- Ingestion points: The
agent-restore-context.shscript reads all files in the project root matching the pattern.agent-restore-context-*. - Boundary markers: Absent. The contents are output directly to the model without delimiters or instructions to treat the data as untrusted.
- Capability inventory: The skill utilizes
catto read files andechofor output formatting within the bash script. - Sanitization: Absent. No filtering or validation is performed on the content of the matched files before injection.
- [COMMAND_EXECUTION]: The skill modifies the agent's configuration files (
.claude/settings.jsonor.claude/settings.local.json) to register aSessionStarthook. This hook automatically executes a local bash script (agent-restore-context.sh) whenever the conversation is cleared or compacted. Additionally, the setup process useschmod +xto modify the execution permissions of the script.
Audit Metadata