一键导入
destructive-command-safety
Use when about to run any git state-modifying command, file deletion, or irreversible operation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when about to run any git state-modifying command, file deletion, or irreversible operation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when reviewing a spec or task graph for completeness before implementation
Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, logging in, or automating browser actions
Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, logging in, or automating browser actions
Use when decomposing a spec, design, or feature description into a task dependency graph with self-evaluating acceptance criteria
Use when doing creative product, feature, component, functionality, or behavior design work
Use when infrastructure or features are built but before declaring done -- verifies work is wired into the system and actively used
| name | destructive-command-safety |
| description | Use when about to run any git state-modifying command, file deletion, or irreversible operation |
Irreversible operations deserve explicit confirmation. The cost of pausing is low; the cost of lost work is high.
NO DESTRUCTIVE COMMANDS WITHOUT EXPLICIT USER CONFIRMATION
File operations:
rm / rm -rf — delete files/directoriesrmdir — remove directoriesunlink — remove filesGit state-modifying:
git checkout — can overwrite uncommitted changesgit reset — can lose commitsgit clean — deletes untracked filesgit stash — hides changesgit rebase — rewrites historygit merge — modifies branchesgit push --force — overwrites remote historygit commit --amend — rewrites last commitgit worktree remove [--force] — worktrees are disposable; all work must be committed to a branch before removalgit worktree prune — cleans up stale worktree referencesgit branch -d (lowercase -d only) — safe delete, refuses if branch is not merged. git branch -D (uppercase) is still dangerous.git status, git log, git diffgit branch (list only)git worktree list (read-only)git show, git blamels, cat, find, grepgo test, uv run pytest, ruff checkBefore any dangerous command:
When the user says "archive X":
mv X archive/)When in doubt, prefer archiving over deleting.
WRONG:
"Let me clean that up"
rm -rf /tmp/old-cache/
RIGHT:
"I can delete /tmp/old-cache/. Should I run `rm -rf /tmp/old-cache/`?"
[wait for explicit "yes"]
WRONG:
"Let me restore that file"
git checkout HEAD -- file.go
RIGHT:
"I can restore file.go from git. This will overwrite any uncommitted changes.
Run `git checkout HEAD -- file.go`?"
[wait for user confirmation]
rm without askinggit reset --hard or git clean -f| Excuse | Reality |
|---|---|
| "It's just temp files" | User might need them. Ask. |
| "I can undo with git" | Not everything is committed. Ask. |
| "This is obviously safe" | You don't know the full context. Ask. |
| "I'll fix it if it breaks" | Prevention > cure. Ask. |