owayo

Safe Rm — AI skill for Claude Code

AI community

Secure file deletion CLI for AI agents with Git-aware protection.

How to install Safe Rm

This entry records only its repository, not the path inside it, so there is no exact command to give. Open owayo/safe-rm and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Safe Rm does

Secure file deletion CLI for AI agents with Git-aware protection.

Alternatives in AI

  • Ccstatusline — by sirmalloc - A highly customizable status line formatter for Claude Code CLI that displays model info, git b 5.5k ★
  • Ff Ruyijs — This is a lightweight, headless browser purpose-built for AI agents (such as Codex or Claude Code) to perform 865 ★
  • Cplt — Sandbox for AI coding agents 114 ★

README

safe-rm

Secure file deletion CLI for AI agents with Git-aware protection

Supported Platforms

Linux macOS

CI Release License

English | 日本語


`safe-rm` is a CLI tool that prevents AI agents from accidentally deleting files outside the project or critical Git metadata. By default it enforces project containment and blocks Git administrative paths such as `.git`. In **strict mode** (`allow_project_deletion = false`), it also enforces Git-aware access control and blocks deletion of modified, staged, or untracked files.

It is meant to stand in for `rm` in AI agents such as Claude Code: a `PreToolUse` hook rejects `rm` and `rmdir` in Bash tool calls and tells the agent to use `safe-rm` instead (see [Claude Code Integration](#claude-code-integration)).

Features

  • Path Containment: Block deletion of files outside project directory
  • Strict-Mode Git Status Protection: When allow_project_deletion = false, prevent deletion of modified, staged, or untracked files. The check uses the Git repository that actually owns each target — both the cwd-side checker and a discovery from the target itself are evaluated, and the deep