Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计异常

safe-destroy安全销毁

Agent Skill

safe-destroy 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

267

周安装

11

GitHub Stars

3

下载量

87
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:safe-destroy(安全销毁)
来源仓库:https://github.com/meriley/claude-code-skills
仓库路径:skills/safe-destroy
安装命令:
npx skills add https://github.com/meriley/claude-code-skills --skill safe-destroy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/meriley/claude-code-skills --skill safe-destroy

简介

查找、检索和筛选相关信息。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 根据关键词或任务场景快速定位候选结果。
  • 适合需要信息聚合时使用。safe-destroy 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 可结合来源仓库进一步核验具体用法。
  • 安装前建议确认权限范围和维护状态。

SKILL.md

Safe Destructive Operations Skill

⚠️ MANDATORY SKILL - YOU MUST INVOKE THIS

Purpose

Prevent accidental data loss by requiring explicit confirmation before any destructive operation, showing what will be lost, and suggesting safer alternatives.

CRITICAL: You MUST invoke this skill before ANY destructive operation. NEVER run destructive commands directly.

🚫 NEVER DO THIS

  • ❌ Running git reset --hard directly
  • ❌ Running git clean -fd directly
  • ❌ Running rm -rf directly
  • ❌ Running ANY destructive command without invoking this skill first

If a destructive operation is needed, invoke this skill. Direct execution is FORBIDDEN.


⚠️ SKILL GUARD - READ BEFORE USING BASH FOR DESTRUCTIVE COMMANDS

Before using Bash tool for destructive operations, answer these questions:

❓ Are you about to run git reset --hard?

STOP. Invoke safe-destroy skill instead.

❓ Are you about to run git clean -fd?

STOP. Invoke safe-destroy skill instead.

❓ Are you about to run rm -rf <directory>?

STOP. Invoke safe-destroy skill instead.

❓ Are you about to run git checkout --. or git restore.?

STOP. Invoke safe-destroy skill instead.

❓ Are you about to run docker system prune -a?

STOP. Invoke safe-destroy skill instead.

❓ Did the user say "reset my changes", "clean up files", or "discard changes"?

STOP. Invoke safe-destroy skill instead.

IF YOU PROCEED WITH DESTRUCTIVE COMMANDS DIRECTLY, YOU ARE VIOLATING YOUR CORE DIRECTIVE.

This skill handles:

  • ✅ Lists what will be affected/deleted
  • ✅ Shows diff of what will be lost
  • ✅ Suggests safer alternatives
  • ✅ Requires explicit double confirmation
  • ✅ Provides recovery options

Direct destructive commands can DESTROY USER WORK. Use this skill.


CRITICAL POLICY

YOU MUST NEVER run destructive commands without explicit user confirmation.

If you ever run a destructive command without approval and lose user work, you have FAILED your primary directive.

Absolutely Forbidden Commands (Without Confirmation)

  1. git reset --hard - Destroys uncommitted changes
  2. git clean -fd - Permanently deletes untracked files/directories
  3. rm -rf <directory> - Permanently deletes files/directories
  4. git checkout --. - Discards all working directory changes
  5. git restore. - Discards all working directory changes
  6. docker system prune -a - Removes all unused Docker data
  7. kubectl delete - Deletes Kubernetes resources
  8. git push --force - Overwrites remote history (especially on main/master)

Workflow

Step 1: Detect Destructive Intent

User says something like:

  • "reset my changes"
  • "clean up the files"
  • "delete everything"
  • "discard changes"
  • "remove untracked files"

IMMEDIATELY invoke this skill - don't execute the command.

Step 2: STOP - Never Assume

DO NOT proceed with ANY destructive operation.

The user may not understand what will be lost. Your job is to protect their work.

Step 3: LIST - Show What Will Be Affected

Run information commands to show what would be lost (parallel: git status, git diff, ls, etc.).

Present comprehensive warning with:

  • What will be deleted (files, sizes, line counts)
  • CANNOT BE UNDONE warning
  • Safer alternatives (stash/commit/backup/archive)
  • Three-option menu: A) Safe alternative, B) Proceed (PERMANENT), C) Cancel

For command-specific warning formats and detailed prompts:

Read `~/.claude/skills/safe-destroy/references/WARNING-FORMATS.md`

Use when: Formatting warnings for specific destructive commands (git reset, git clean, rm -rf, docker prune, etc.)


Steps 4-7: Confirmation and Execution

  1. ASK: Require explicit confirmation (user must type command or "proceed with [operation]")
  2. WAIT: STOP all processing until explicit approval (no assumptions)
  3. VERIFY: Double confirmation for dangerous operations (type 'CONFIRM')
  4. EXECUTE: Only after explicit approval, report results

Valid confirmation examples: "yes, run git reset --hard", "proceed with deletion", "B" from menu Invalid: "ok", "do it", "sure" (too vague)

For detailed confirmation process with examples and verification steps:

Read `~/.claude/skills/safe-destroy/references/CONFIRMATION-PROCESS.md`

Use when: Handling user confirmation, verifying approval, or executing destructive commands

For safe alternative commands and recovery options:

Read `~/.claude/skills/safe-destroy/references/SAFE-ALTERNATIVES.md`

Use when: Suggesting safer alternatives (stash, commit, backup, archive) before destruction


Emergency Recovery

If destructive operation was accidentally executed:

For git reset --hard:

# Check reflog for recent HEAD positions
git reflog

# Find the commit before reset (e.g., HEAD@{1})
git reset --hard HEAD@{1}

# Or cherry-pick specific commits
git cherry-pick <commit-hash>

For git clean:

No automatic recovery available.

Possibly recover from:

  • File system backups (Time Machine, etc.)
  • IDE local history
  • OS-level file recovery tools

For rm -rf:

Check if system has undelete:

# macOS Time Machine
# Linux: check if trash-cli used
trash-list

# Otherwise: file recovery tools
# extundelete, testdisk, photorec, etc.

Best Practices

  1. Always list first - Show what will be affected
  2. Suggest alternatives - Safer options exist for most operations
  3. Double confirm - Especially dangerous operations get extra confirmation
  4. Be explicit - Require exact command or clear approval
  5. Educate - Explain what the operation does
  6. Provide recovery - If possible, explain how to undo

Quick Reference

Destructive command requested

  1. STOP - Don't execute
  2. LIST - Show what will be lost
  3. ASK - Suggest safer alternatives
  4. WAIT - For explicit approval
  5. VERIFY - Confirm understanding
  6. EXECUTE - Only after approval

Related Commands

  • /cleanup - Safe cleanup of merged branches and artifacts with confirmation

Remember: It's better to annoy the user with confirmations than to lose their work.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.56%
按下载量换算32

Claude

31.54%
按下载量换算27

Cursor

16.92%
按下载量换算15

Gemini CLI

9.04%
按下载量换算8

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills