file-backup

修改文件前的自动备份工具。 当需要修改重要文件时,先备份再修改,改完后让用户检查,确认无误后删除备份。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "file-backup" with this command: npx skills add jiaqi-guo-0114/file-backup

File Backup Skill

触发条件

修改重要文件前,特别是:

  • 配置文件
  • 核心机制文件
  • 用户指定的敏感文件

工作流程

1. 备份

检测到要修改重要文件时,先创建备份:

cp 原文件 备份目录/原文件.日期.bak

例如:cp config.json backups/config.json.2026-03-14.bak

2. 执行修改

正常执行修改操作

3. 主动提醒检查 ⚠️

修改完成后,必须主动让用户检查

备份已创建:backups/xxx.bak
请检查文件,确认无误后告诉我"可以删除备份"

4. 删除备份

收到用户确认后:

rm backups/xxx.bak
备份已删除

重要规则

  1. 不备份不修改:没有备份就不能改重要文件
  2. 主动提醒:改完后必须让用户检查,不能等用户忘
  3. 确认才删:必须等用户明确说"可以删除"才能删
  4. 备份保留:如果用户没确认,备份一直保留
  5. 通用路径:备份目录可自定义,默认为 backups/

配置(可选)

可以指定需要触发备份的文件类型:

  • 配置文件:config.json, settings.yaml
  • 核心文件:SOUL.md, MEMORY.md, AGENTS.md
  • 自定义:用户指定的其他文件

示例

[检测到要修改 config.json]
→ 备份:cp config.json backups/config.json.2026-03-14.bak
→ 执行修改
→ 提醒:"备份已创建 backups/config.json.2026-03-14.bak,请检查config.json,确认无误后告诉我'可以删除备份'"
[用户确认]
→ 删除备份

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated