workbuddy-git-memory-sync

将 WorkBuddy 本地内存备份并还原到任意远程 Git 仓库(如 Gitee、GitHub、GitLab、自托管或通过 SSH 的远程仓库)。用于在用户请求同步、备份、推送、还原、恢复、检查、配置、初始化或迁移 WorkBuddy 内存备份时操作,尤其针对 ~/.workbuddy/MEMORY.md、USER.md、IDENTITY.md、SOUL.md、云端内存摘要或 .workbuddy/memory 工作区日志。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "workbuddy-git-memory-sync":https://skillpi.com/zh/skills/deepskill-bb11c76647eb9ee14d04cb77e5a69f11280faca0fccf19dd9184ca9036f08c30。安装前核对上游来源和版本:https://skillhub.cn/skills/user_b5022f34/workbuddy-git-memory-sync。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

将 WorkBuddy 本地内存备份并还原到任意远程 Git 仓库(如 Gitee、GitHub、GitLab、自托管或通过 SSH 的远程仓库)。用于在用户请求同步、备份、推送、还原、恢复、检查、配置、初始化或迁移 WorkBuddy 内存备份时操作,尤其针对 ~/.workbuddy/MEMORY.md、USER.md、IDENTITY.md、SOUL.md、云端内存摘要或 .workbuddy/memory 工作区日志。

0 下载

介绍来源: third_party · user_b5022f34 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
软件、账号及付费要求
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: git-memory-sync
description: Backup and restore WorkBuddy local memory to any remote Git repository, including Gitee, GitHub, GitLab, self-hosted Git, or SSH remotes. Use when the user asks to sync, back up, push, restore, recover, inspect, configure, initialize, or migrate WorkBuddy memory backups, especially for ~/.workbuddy/MEMORY.md, USER.md, IDENTITY.md, SOUL.md, cloud memory summaries, or workspace .workbuddy/memory logs.

Git Memory Sync

Use this skill to safely synchronize WorkBuddy memory files with a user-provided Git remote. The remote can be Gitee, GitHub, GitLab, self-hosted Git, or any standard Git URL.

Script: scripts/git_memory_sync.py

Core rule

Never back up the whole ~/.workbuddy directory. Only use the script's whitelist:

  • ~/.workbuddy/MEMORY.md
  • ~/.workbuddy/USER.md
  • ~/.workbuddy/IDENTITY.md
  • ~/.workbuddy/SOUL.md
  • ~/.workbuddy/memory/**
  • optional workspace memory: <workspace-root>/*/.workbuddy/memory/**

The script excludes databases, logs, sessions, traces, token/key-looking files, connector config, settings, plugin state, and .git directories.

First-time setup

If no config exists, ask for or infer:

  • Remote Git URL, for example git@gitee.com:user/repo.git, https://github.com/user/repo.git, or a GitLab URL
  • Local backup repo path, default ~/workbuddy-memory-backup
  • Branch, optional; leave blank to auto-detect current branch after clone/init
  • Whether to include workspace memory
  • Workspace root path if workspace memory is needed

Save config:

python3 scripts/git_memory_sync.py configure \
  --repo-url <remote-git-url> \
  --repo-dir ~/workbuddy-memory-backup \
  --branch main

With workspace memory:

python3 scripts/git_memory_sync.py configure \
  --repo-url <remote-git-url> \
  --repo-dir ~/workbuddy-memory-backup \
  --branch main \
  --workspace-root ~/WorkBuddy \
  --include-workspace-by-default

Config is saved to:

~/.workbuddy/git-memory-sync.json

Commands

Prefer the available managed Python runtime when the environment provides one; otherwise use python3.

Health check

Run when context is unclear:

python3 scripts/git_memory_sync.py doctor

Status

python3 scripts/git_memory_sync.py status

Initialize or clone local repo

If the local repo already exists, this verifies it and creates backup subfolders:

python3 scripts/git_memory_sync.py init

If the local repo is missing and the user agrees to clone:

python3 scripts/git_memory_sync.py init --allow-clone

Backup

Commit backup locally without pushing:

python3 scripts/git_memory_sync.py backup

Pull, commit, and push:

python3 scripts/git_memory_sync.py backup --pull --push

Include workspace memory only when requested or configured:

python3 scripts/git_memory_sync.py backup --include-workspace --workspace-root ~/WorkBuddy --push

Restore

Restore is dry-run by default. It prints all source and destination paths and refuses to write unless --yes is passed.

Dry-run first:

python3 scripts/git_memory_sync.py restore --pull --include-workspace --workspace-root ~/WorkBuddy

Actual restore after explicit confirmation:

python3 scripts/git_memory_sync.py restore --pull --include-workspace --workspace-root ~/WorkBuddy --yes

Before actual restore, tell the user it will overwrite local memory files. The script creates a pre-restore snapshot under:

~/.workbuddy/backups/pre-memory-restore-YYYYMMDD-HHMMSS

Parameter precedence

Command-line flags override config file values. Config file values override safe defaults.

Safe defaults:

  • repo_dir: ~/workbuddy-memory-backup
  • repo_url: none; required before clone/push workflows
  • branch: auto-detect current branch from local repo
  • include_workspace_by_default: false
  • workspace_roots: empty

Safety rules

  • Treat restore as destructive because it overwrites memory files. Do a dry-run first unless the user already provided explicit confirmation in the same turn.
  • Never use rm -rf or broad shell deletion on ~/.workbuddy, Desktop, Downloads, Documents, Home, or WorkBuddy project directories.
  • Never add the whole ~/.workbuddy folder to Git.
  • Never store Git credentials, tokens, passwords, SSH keys, or connector configs in the skill or backup repo.
  • If git push or git pull fails for authentication, report the failure and ask the user to configure Git credentials locally. Do not retry with guessed credentials.
  • If the backup repo has unexpected uncommitted manual changes, inspect status before proceeding.
  • For restore, only write to ~/.workbuddy and explicitly configured workspace roots.

Typical response

After a successful backup, summarize:

  • Whether it committed and pushed
  • Number of files in manifest.json
  • Repo path, remote, and branch
  • Whether workspace memory was included
  • Any warning, such as no changes or Git authentication failure

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 解决 WorkBuddy 用户本地记忆文件的远程备份与恢复核心痛点
  • 支持主流 Git 平台(Gitee/GitHub/GitLab)及自托管仓库
  • 提供灾难恢复、数据迁移等高频刚需场景的完整闭环
触发精准95/100

亮点

  • 触发词覆盖全面且边界清晰(sync/backup/restore/migrate 等)
  • 明确指定目标文件路径(~/.workbuddy/*.md 及 workspace logs)
结构规范90/100

亮点

  • Phase 划分清晰(setup/commands/safety/response)
  • 提供端到端命令示例及参数说明
  • frontmatter 完整,文档结构规范
执行可靠88/100

亮点

  • 还原操作默认 dry-run,需显式 --yes 确认
  • 自动创建还原前快照防止数据丢失
  • 明确处理 Git 认证失败等异常场景
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 删除文件

    先确认绝对路径及作用范围,保留可恢复备份;不要直接对重要目录运行示例命令。

    主文档提及 · 第 150 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 152, 153 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

翻译待完成,请参阅来源文档。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。