Skip to main content

codex-path-deletion-guard

Install and operate the codex `path-deletion-guard.py` PreToolUse hook that allows deletions inside /tmp (and $TMPDIR) but blocks rm/rmdir/shred/find -delete/git destructive ops/apply_patch deletes/Python os.remove+shutil.rmtree outside those dirs. Emits the Codex-canonical hookSpecificOutput.permissionDecision JSON, exits 2 on deny, fails closed on parse error. Use when asked to "guard codex against deletion", "block destructive commands outside /tmp", or when running sandbox_mode=danger-full-access and wanting pre-execution safety. The hook is unit-tested by 38 cases but Codex 0.144.5 has known limits on hook enforcement (unified_exec skips PreToolUse); read Pitfall

Jump to install

Source facts

Repository
jleechanorg/claude-commands
Last source activity
August 2, 2026 at 01:06
Detected SKILL.md language
English
Stars
3
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.