← 返回 Skills 市场
File Backup
作者
Jiaqi-Guo-0114
· GitHub ↗
· v1.0.0
· MIT-0
293
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install file-backup
功能描述
修改文件前的自动备份工具。 当需要修改重要文件时,先备份再修改,改完后让用户检查,确认无误后删除备份。
使用说明 (SKILL.md)
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
备份已删除
重要规则
- 不备份不修改:没有备份就不能改重要文件
- 主动提醒:改完后必须让用户检查,不能等用户忘
- 确认才删:必须等用户明确说"可以删除"才能删
- 备份保留:如果用户没确认,备份一直保留
- 通用路径:备份目录可自定义,默认为
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,确认无误后告诉我'可以删除备份'"
[用户确认]
→ 删除备份
安全使用建议
This skill appears to do what it says, but before installing you should: 1) confirm which exact file paths the agent may act on (avoid unintended system or secret files); 2) ensure the backup directory (default 'backups/') is secure (correct ownership and permissions) so sensitive data isn't exposed; 3) consider storing backups outside world-readable locations and/or encrypting them if they contain secrets; 4) verify how the agent 'detects' modifications in your environment to avoid unexpected automatic actions; 5) prefer explicit, unambiguous user confirmations (the skill expects the exact phrase '可以删除备份' — consider using a clearly auditable confirmation workflow); and 6) be aware of filesystem race/symlink risks (use atomic/careful copy semantics in automation). If you need stronger guarantees, require manual review of the agent's planned cp/rm commands or restrict the skill to operate only on a narrow, user-approved path list.
功能分析
Type: OpenClaw Skill
Name: file-backup
Version: 1.0.0
The skill is a safety utility designed to create file backups before modifications are made, using standard shell commands like 'cp' and 'rm'. It includes explicit instructions in SKILL.md for the agent to wait for user confirmation before deleting any backups, and it lacks any indicators of data exfiltration, unauthorized execution, or malicious intent.
能力评估
Purpose & Capability
The name and description (backup-before-modify) match the instructions: create a copy (cp), perform modification, ask the user, then rm on confirmation. No unrelated binaries, credentials, or installs are requested.
Instruction Scope
Instructions are high-level and limited to copying and deleting backups and prompting the user. They rely on the agent to 'detect' when a file is about to be modified (the SKILL.md does not specify how detection occurs), which is vague and grants the agent discretion about when to act. The examples include filenames that may refer to agent-internal files (SOUL.md, MEMORY.md) — backing up these is coherent with the stated goal but worth confirming you want those files handled.
Install Mechanism
No install spec and no code files — instruction-only skills are lowest-risk because nothing is written to disk by the skill itself.
Credentials
No environment variables, credentials, or config path requirements are declared. The actions described (cp, rm) require only filesystem access consistent with the backup purpose.
Persistence & Privilege
Skill does not request always:true or other elevated persistent privileges. Model invocation is allowed (platform default) but the skill itself does not request extra persistence or modification of other skills.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install file-backup - 安装完成后,直接呼叫该 Skill 的名称或使用
/file-backup触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
常见问题
File Backup 是什么?
修改文件前的自动备份工具。 当需要修改重要文件时,先备份再修改,改完后让用户检查,确认无误后删除备份。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 293 次。
如何安装 File Backup?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install file-backup」即可一键安装,无需额外配置。
File Backup 是免费的吗?
是的,File Backup 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
File Backup 支持哪些平台?
File Backup 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 File Backup?
由 Jiaqi-Guo-0114(@jiaqi-guo-0114)开发并维护,当前版本 v1.0.0。
推荐 Skills