跳到正文
cccskills
免费在 GitHub 公开中文介绍

backup-setup

为 claude-mem 数据库设置定期本地快照,查看最近的保存时间、快照数量和错误,也可从已保存的文件恢复数据库。

原文查看原文说明

Set up, check, or restore local claude-mem database snapshots. Use when the user says "set up backups", "back up my memories", "backup status", or "restore my database".

thedotmack/claude-mem星标 104,504(GitHub 104,504 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 设置定期数据库快照
  • 查看最近保存时间和错误
  • 从列表中的快照恢复数据库

中文介绍

功能

为 claude-mem 数据库设置定期本地快照,并选择保存间隔和保留的文件数量。可以查看最近一次保存时间、快照数量及近期错误。恢复时,从已保存文件列表中选择一个快照;工作进程会切换数据库并重启,同时把恢复前的数据库保存在同一文件夹中。

适用场景

需要在本机保存 claude-mem 记忆数据副本,或确认备份是否正常运行时,可以使用此技能。发生误操作或故障后,也可以将数据库恢复到较早的快照。

使用示例

  • “启用备份,每24小时保存一次,保留7份快照。”
  • “查看备份状态和最近一次保存时间。”
  • “从列表中恢复我指定的快照。”

注意事项

设置时会使用 npx claude-mem。设置文件包含认证信息,因此不会显示文件内容,并会将文件访问权限保持为 0600。如果启用了云同步,恢复后会从快照记录的位置继续同步,也可能取回云端的后续更改。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
A良好不显示认证信息,权限保持为0600,并保存被替换的数据库。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足设置使用 `npx claude-mem`,但未说明安装步骤和前提条件。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月27日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md4.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Backups (local snapshots)

The installed worker snapshots ~/.claude-mem/claude-mem.db on a schedule (VACUUM INTO, consistent while sessions run) and keeps the newest N under ~/.claude-mem/backups/auto/. Each snapshot is one standalone SQLite file. Snapshots stay on this machine.

Preserve every unrelated setting and keep ~/.claude-mem/settings.json mode 0600. Never print the file's contents: it holds credentials.

Routing

Based on $ARGUMENTS:

  • setup or empty: 1. Check status, then 2. Enable snapshots
  • restore: 3. Restore
  • status: 1. Check status only

1. Check status

npx claude-mem backup status
  • Snapshot details printed: backups run. Report the last snapshot time, the snapshot count and any last error; stop unless the user asked for a change or a restore.
  • "Automatic backups are not enabled": continue to step 2 if setting up.
  • A "Last restore" line reports the outcome of the most recent restore.
  • "Worker is not running": start it with npx claude-mem start and retry.
  • "Unknown command: backup" or "Backup status failed: HTTP 404": this claude-mem (CLI or running worker) has no backup support yet, so the worker would ignore the backup settings. Stop. Tell the user that backups are not available in their installed version and that npx claude-mem update brings them once a release includes them. Do not write the settings in step 2, and never say backups are on.
  • Any other failure ("Backup status failed: HTTP" with another status, "Backup request failed: ...", "Backup status failed: invalid JSON response", "Backup status failed: unexpected response") or any output not listed here: stop. Show the user the exact error line, do not write the settings in step 2, and never say backups are on. Do not suggest an update: this is an error in a version that has backups, not a missing feature.

2. Enable snapshots

Ask (or default): interval in hours (default 24, range 1 to 168) and how many snapshots to keep (default 7, range 1 to 100). Then write the settings without echoing anything else in the file:

node - <<'EOF'
const fs = require('fs'), os = require('os'), path = require('path');
const intervalHours = 'PASTE_INTERVAL_HOURS_HERE'; // e.g. '24'
const retainCount = 'PASTE_RETAIN_COUNT_HERE';     // e.g. '7'
const dir = path.join(os.homedir(), '.claude-mem');
const file = path.join(dir, 'settings.json');
fs.mkdirSync(dir, { recursive: true });
const settings = fs.existsSync(file) ? JSON.parse(fs.readFileSync(file, 'utf8')) : {};
const target = settings.env && typeof settings.env === 'object' ? settings.env : settings;
target.CLAUDE_MEM_BACKUP_ENABLED = 'true';
target.CLAUDE_MEM_BACKUP_INTERVAL_HOURS = intervalHours;
target.CLAUDE_MEM_BACKUP_RETAIN_COUNT = retainCount;
fs.writeFileSync(file, JSON.stringify(settings, null, 2) + '\n', { mode: 0o600 });
fs.chmodSync(file, 0o600);
console.log('backups enabled: every ' + intervalHours + 'h, keeping ' + retainCount);
EOF

Restart the worker so the schedule starts, then confirm with step 1. Tell the user backups are on only when that status reports them enabled:

npx claude-mem restart
npx claude-mem backup status

The first automatic snapshot lands about five minutes after the worker starts. To take one now:

npx claude-mem backup run

3. Restore

npx claude-mem backup list
npx claude-mem restore <file>
npx claude-mem backup status

restore stages the snapshot and restarts the worker (it also starts a worker that is not running). The new worker swaps the database in before it opens it, saves the database it replaced in the same folder as claude-mem-<timestamp>-pre-restore.db (restore that file to undo; it counts toward the retain count), and records the outcome. With cloud sync on, the restored database resumes syncing from the snapshot's position and can pull back changes that reached the cloud after it. backup status then prints a "Last restore" line: on success it names the saved copy; on failure it gives the reason, and the worker kept the database it had.

4. Report

Report the snapshot count, the last snapshot time, any error, and the last restore outcome if there was one.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Agent Cost Report

免费有简介

根据代理工作记录和词元数量,整理每项已完成成果及返工的费用,区分估算金额与实测支出,并生成附有依据的 HTML、JSON 和 CSV 报告。

  • 核对每周支出与完成成果
  • 比较每项已完成成果的费用
  • 调查重复工作与返工费用
thedotmack/claude-mem10.5万2026年10月29日 更新

babysit

免费有简介

持续跟踪拉取请求的评审和自动检查,核实反馈是否适用于实际代码,反复修复、测试并推送,直到待处理问题与未解决讨论清零,达到可合并状态。

  • 监控拉取请求的自动检查
  • 核实评审反馈并修复问题
  • 检查合并前的未解决事项
thedotmack/claude-mem10.5万2026年10月29日 更新

build-and-release

免费有简介

将编码任务交给子代理,依次执行build、合并已准备好的拉取请求,再从更新后的main进入release,把实现与发布工作连接起来。

  • 委托从实现到发布的完整任务
  • 衔接拉取请求合并与发布工作
  • 连续执行build和release
thedotmack/claude-mem10.5万2026年10月29日 更新

ccs-align

免费有简介

检查本地claude-mem运行状态,更新各用户的重要记录缓存,支持排除和恢复记录,并报告不同层级的规则冲突,适合定期运维。

  • 检查运行状态并更新重要记录
  • 保留原始历史并排除缓存记录
  • 恢复已排除的记录
thedotmack/claude-mem10.5万2026年10月29日 更新

childhood

免费有简介

发布后核查公开软件包、线上服务和已安装插件,持续跟踪延迟到达的持续集成结果及故障报告,确认问题是否由此次发布引起,并在授权范围内修复。

  • 检查已发布软件包的内容
  • 验证线上环境的变更路径
  • 确认已安装插件的版本
thedotmack/claude-mem10.5万2026年10月29日 更新

claude-mem-install

免费有简介

指导在Cursor中安装claude-mem,选择本地或远程worker,并配置使用本机登录的host观察处理方式或cmem.ai远程推理。

  • 在Cursor中进行本地安装
  • 连接远程worker
  • 配置host或cmem.ai推理
thedotmack/claude-mem10.5万2026年10月29日 更新

查看 thedotmack 的全部技能

报告此技能的问题