{"success":true,"name":"shell-safe-agent-mail","description":"Use when sending agents/mail.mjs messages containing backticks, $(), or literal shell commands.","category":"unitary","path":"unitary/shell-safe-agent-mail/SKILL.md","file":"SKILL.md","content":"---\nname: shell-safe-agent-mail\ndescription: Use when sending agents/mail.mjs messages containing backticks, $(), or literal shell commands.\n---\n> Imported from [PRIVATE_HOST] `~/unitary/generated/agents/handoff/data/skills/opportunity-searcher/shell-safe-agent-mail`. Paths are relative to `[PRIVATE_HOST]:[PATH]`; run commands there via `ssh [PRIVATE_HOST] 'cd ~/unitary && ...'`. Owner send rules from skill i7-remote-ops still apply.\n\n\n1. When an agents/mail.mjs message contains literal commands, avoid backticks inside a shell double-quoted --body: the shell executes them before sending.\n2. Use a single-quoted heredoc to build the body, then pass its variable in double quotes:\nbody=$(cat <<'MAIL_BODY'\nLiteral command text, including backticks or $(), goes here.\nMAIL_BODY\n)\nnode agents/mail.mjs send --from opportunity-searcher --to developer --subject 'Subject' --body \"$body\"\n3. Verify the returned letter ID. If unexpected command output appears before it, check whether the shell executed message text.\n\nLinked: S:brimind-codex-rails (safely reports failing commands); B:nested-bwrap-namespace-refusal (notification exposed the quoting trap)\nEvidence: Transcript: the developer notification unexpectedly reran search.mjs as codex pid=527 before returning letter 6ad28f31e3976266f9b4a2b4.\nLearned: 2026-10-18, handoff h_opportunity-_202610180615_6bc7.\n","linked_files":[],"origin":"brimind","owner_id":null,"source":"router"}