← Back to Skills Marketplace
jiaqi-guo-0114

File Backup

by Jiaqi-Guo-0114 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
293
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install file-backup
Description
修改文件前的自动备份工具。 当需要修改重要文件时,先备份再修改,改完后让用户检查,确认无误后删除备份。
README (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
备份已删除

重要规则

  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,确认无误后告诉我'可以删除备份'"
[用户确认]
→ 删除备份
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install file-backup
  3. After installation, invoke the skill by name or use /file-backup
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug file-backup
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is File Backup?

修改文件前的自动备份工具。 当需要修改重要文件时,先备份再修改,改完后让用户检查,确认无误后删除备份。 It is an AI Agent Skill for Claude Code / OpenClaw, with 293 downloads so far.

How do I install File Backup?

Run "/install file-backup" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is File Backup free?

Yes, File Backup is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does File Backup support?

File Backup is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created File Backup?

It is built and maintained by Jiaqi-Guo-0114 (@jiaqi-guo-0114); the current version is v1.0.0.

💬 Comments