一键导入
shell-safety-review
Sanity-check a shell command for destructive or irreversible side effects before running it, especially in an autonomous/unattended run.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Sanity-check a shell command for destructive or irreversible side effects before running it, especially in an autonomous/unattended run.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Write a well-formed SKILL.md (agentskills.io format) so it imports cleanly and actually gets used.
Systematically narrow down an Android app bug using adb logcat instead of guessing from the crash screenshot alone.
Write small, scoped, well-explained git commits instead of one giant dump of unrelated changes.
基于 SOC 职业分类
| name | shell-safety-review |
| description | Sanity-check a shell command for destructive or irreversible side effects before running it, especially in an autonomous/unattended run. |
Before executing a shell command that was generated (by yourself or another model) rather than typed by a human in the moment, scan it for these red flags and stop to confirm with the user if any are present:
rm -rf, rm -f *, find ... -delete,
emptying a trash/cache directory that wasn't explicitly named by the user.> file (truncates silently),
mv over an existing path, git checkout -- . / git reset --hard /
git clean -fd (discards uncommitted work) — verify there's nothing
uncommitted worth keeping first (git status, git stash if unsure).chmod -R, chown -R, rm dir/* from the wrong
cwd) — print pwd and ls the target first if there's any ambiguity.curl/wget piped straight into
sh/bash (curl ... | sh), or a request to a host the user never
mentioned — read the script first instead of blind-piping.git push --force (especially to
main/master), git rebase on a shared branch, --no-verify to skip
hooks — these need explicit human sign-off, not a "looked right" pass.nohup ... &,
disown — confirm the user wants a long-running process left behind.If none of these apply, proceed normally. If one does, don't silently "fix" the command yourself — explain the specific risk in plain language and ask whether to proceed, adjust the scope, or skip it.