memory-add
Warn
Audited by Gen Agent Trust Hub on Jun 16, 2026
Risk Level: MEDIUMCOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill utilizes dynamic context injection (
!```bash) inSKILL.mdto process user-supplied input through the$ARGUMENTSvariable. - Evidence: The script captures
$ARGUMENTSusing a heredoc (<<'__MEMADD_EOF__'). If the user provides input containing the delimiter__MEMADD_EOF__, they can terminate the heredoc prematurely and inject arbitrary shell commands that will execute when the skill is invoked. - [PROMPT_INJECTION]: The skill creates an indirect prompt injection surface by persisting user data into a shared memory file (Category 8).
- Ingestion points: User input from
$ARGUMENTSis appended to~/.claude/memory/staging.mdby theappend.shscript. - Boundary markers: Absent. Content is only prefixed with a bullet point (
-), which does not provide a clear boundary to prevent the agent from misinterpreting stored text as instructions during future retrieval. - Capability inventory: The skill possesses file system write capabilities (
mkdir,printf >>). - Sanitization: The
append.shscript validates that input is not empty and is a single line, but it does not sanitize the content for nested instructions or command injection sequences.
Audit Metadata