Best effort, ask only. Asks a person before a shell command deletes or overwrites a file git holds no copy of: an untracked file, or a tracked file with uncommitted changes. Reads rm, git checkout and git restore of a path, git rm -f, and mv or cp onto a file; globs are expanded. Ignored files, clean tracked files and paths outside the repository pass. Misses: scripts, find -delete, redirections.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ask Uncommitted Deletes?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/open-coder-ai-ask-uncommitted-deletes)
---
name: ask-uncommitted-deletes
description: "Best effort, ask only. Asks a person before a shell command deletes or overwrites a file git holds no copy of: an untracked file, or a tracked file with uncommitted changes. Reads rm, git checkout and git restore of a path, git rm -f, and mv or cp onto a file; globs are expanded. Ignored files, clean tracked files and paths outside the repository pass. Misses: scripts, find -delete, redirections."
metadata:
chock.artifact: rule
chock.enforcement: advise
chock.coverage_without_chock: advisory
---
# Ask Before Deleting Uncommitted Files
Best effort, ask only. Asks a person before a shell command deletes or overwrites a file git holds no copy of: an untracked file, or a tracked file with uncommitted changes. Reads rm, git checkout and git restore of a path, git rm -f, and mv or cp onto a file; globs are expanded. Ignored files, clean tracked files and paths outside the repository pass. Misses: scripts, find -delete, redirections.
```
ask_person: destroys(untracked|modified_tracked) via rm|git(checkout|restore path)|git rm -f|mv|cp onto; name(file, why); say(commit|stash|ask first)
pass: git_has_copy(clean_tracked)|ignored|outside_repo|restore --staged|clean -n|clean -X|rm -rf of safe dirs (block-destructive-commands owns); unreadable_target: ask only if repo has untracked|modified
```
This skill is advisory: the client reading it has no mechanism to enforce it. The same policy compiled by `chock` can refuse an agent's shell command before it runs. See https://github.com/open-coder-ai/chock