← Back to Skills Marketplace
olveww-dot

Crash Snapshots

by ECsss · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ Security Clean
119
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install crash-snapshots
Description
每次 write/edit 前自动备份原文件到 .openclaw/backups/,防止误操作导致文件丢失。
README (SKILL.md)

Crash-Resistant Snapshots

🛡️ OpenClaw 混合进化方案 — 将 Hermes-agent(100K ⭐)+ Claude Code 核心能力移植到 OpenClaw

🛡️ 写文件前自动备份,崩溃也不怕。

这个 Skill 做什么?

在你使用 write / edit 工具修改文件前,自动把原文件复制一份到 .openclaw/backups/ 目录。

  • ✅ 只备份已存在的文件(新文件不备份)
  • ✅ 备份路径:{原文件目录}/.openclaw/backups/{timestamp}_{原文件名}
  • ✅ 时间戳精确到秒,不会覆盖旧备份
  • ✅ 备份目录不存在时自动创建

工作原理

在执行 write / edit 之前,Agent 会先调用 backup.ts 备份原文件。

🚀 一键安装

mkdir -p ~/.openclaw/skills && cd ~/.openclaw/skills && curl -fsSL https://github.com/olveww-dot/openclaw-hermes-claude/archive/main.tar.gz | tar xz && cp -r openclaw-hermes-claude-main/skills/crash-snapshots . && rm -rf openclaw-hermes-claude-main && echo "✅ crash-snapshots 安装成功"

使用方式

方式一:作为 OpenClaw Skill 直接调用

在对话中直接说:

"备份一下 src/utils.ts"
"帮我把 memory/notes.md 备份"

Agent 会调用 backup.ts 执行备份。

方式二:手动运行脚本

# 备份单个文件
node ~/.openclaw/workspace/skills/crash-snapshots/src/backup.ts /path/to/file.txt

# 备份多个文件
node ~/.openclaw/workspace/skills/crash-snapshots/src/backup.ts file1.ts file2.md

# 列出最近备份
ls -lt ~/.openclaw/workspace/skills/crash-snapshots/backups/

备份恢复

# 找到备份文件
ls -lt /path/to/dir/.openclaw/backups/

# 恢复(copy back,不要 mv)
cp /path/to/dir/.openclaw/backups/2026-04-19_22-30-00_file.txt /path/to/file.txt

备份目录结构

{文件所在目录}/
└── .openclaw/
    └── backups/
        ├── 2026-04-19_14-30-00_config.json
        ├── 2026-04-19_15-45-00_config.json
        └── ...

API

backup.ts

Usage: backup.ts \x3Cfile1> [file2] ...

备份一个或多个文件到 .openclaw/backups/
- 只备份已存在的文件
- 新建文件跳过(无内容可备份)
- 备份路径:{dir}/.openclaw/backups/{timestamp}_{basename}

注意事项

  • 备份是额外保险,不等于版本控制
  • 建议同时使用 Git 进行真正的版本控制
  • 备份文件多了记得定期清理

🧩 配套技能

本 skill 是 OpenClaw 混合进化方案 的一部分:

Hermes-agent(100K ⭐)+ Claude Code 核心能力移植到 OpenClaw

🔗 GitHub 项目:olveww-dot/openclaw-hermes-claude

完整技能套件(6个):

  • 🛡️ crash-snapshots — 崩溃防护(本文)
  • 🧠 auto-distill — T1 自动记忆蒸馏
  • 🎯 coordinator — 指挥官模式
  • 💡 context-compress — 思维链连续性
  • 🔍 lsp-client — LSP 代码智能
  • 🔄 auto-reflection — 自动反思

版本历史

  • v1.0.0 (2026-04-19): 初始版本
    • 支持 write/edit 前自动备份
    • 时间戳精确到秒,防止覆盖
    • 自动创建备份目录
Usage Guidance
This skill appears to do exactly what it says: copy existing files to {dir}/.openclaw/backups/ with timestamped names. Before installing: - Inspect the repository/source you're downloading (the SKILL.md's install curl pulls from github.com/olveww-dot/openclaw-hermes-claude). Only run the install command if you trust that repo. - Be aware install.sh may install tsx via npm globally (npm -g tsx) — that modifies your Node environment; if you prefer, install tsx into a virtual environment or run via npx. - Backups are full copies of files. If you edit sensitive files (credentials, keys), those will also be copied into .openclaw/backups/ in the same directories. Plan cleanup (the README suggests a find -mtime cleanup) and restrict backup directories with appropriate file permissions if needed. - The agent can invoke the skill autonomously by default; if you want explicit control, use the manual script (scripts/backup-file.sh or node src/backup.ts) rather than hooking it into automatic write/edit flows. If you want extra assurance, run the scripts locally in a controlled directory first and verify behavior before integrating into your regular workspace.
Capability Assessment
Purpose & Capability
Name/description (backup before write/edit) align with code and scripts: backup.ts copies existing files into a .openclaw/backups/ folder. Required tools (Node/tsx) are reasonable for a TypeScript script. No unrelated env vars, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs calling backup.ts before write/edit or running the provided scripts. The runtime code only reads specified file paths and writes local backups; it does not access network endpoints, other agents' configs, or unrelated system secrets. The SKILL.md does reference installing from a GitHub repo and mentions hooks but does not instruct reading other system state.
Install Mechanism
There is no registry 'install' entry, but SKILL.md suggests downloading a GitHub archive (github.com/olveww-dot/...) which is a common pattern. install.sh will attempt to install or rely on tsx (npm) and may run npm -g tsx (global package install), which modifies the system Node environment — moderate-risk but expected for TypeScript tools. No downloads from obscure hosts or extract-from-arbitrary-URL beyond GitHub are present in the shipped files.
Credentials
The skill requires no environment variables or credentials. The code only accesses files passed as arguments and writes backups alongside them; that access level matches the stated purpose.
Persistence & Privilege
The skill is not set always:true and does not modify other skills. The agent may invoke it autonomously (platform default), so backups could be created automatically before edits — this is consistent with intent but means backups could be produced without a separate explicit user action. The skill writes files to .openclaw/backups in target directories, which is expected but could accumulate sensitive copies or disk usage.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install crash-snapshots
  3. After installation, invoke the skill by name or use /crash-snapshots
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
v1.0.2: 添加一键安装命令,ClaWHub安装后可直接使用
v1.0.1
v1.0.1: 详情页加入Hermes-agent+Claude Code融合卖点
v1.0.0
Initial release: 自动备份文件防止误操作丢失
Metadata
Slug crash-snapshots
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Crash Snapshots?

每次 write/edit 前自动备份原文件到 .openclaw/backups/,防止误操作导致文件丢失。 It is an AI Agent Skill for Claude Code / OpenClaw, with 119 downloads so far.

How do I install Crash Snapshots?

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

Is Crash Snapshots free?

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

Which platforms does Crash Snapshots support?

Crash Snapshots is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Crash Snapshots?

It is built and maintained by ECsss (@olveww-dot); the current version is v1.0.2.

💬 Comments