← 返回 Skills 市场
workspace-git-sync
作者
David668HAHA
· GitHub ↗
· v1.0.0
· MIT-0
115
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install workspace-git-sync
功能描述
将 OpenClaw workspace 目录(~/.openclaw/workspace/)同步到指定的本地 Git 仓库, 自动执行 git add、commit 和 push 操作。 使用场景: - 备份 workspace 文件到 Git 仓库 - 将工作目录同步到远程备份 - 定期归档 OpenClaw...
安全使用建议
This skill appears to do what it says, but take these precautions before installing or running it: 1) Ensure Git and Python are available on the host (the metadata omits these requirements). 2) Inspect the bundle source/author (README clone URL is a placeholder), and review the included script locally before execution. 3) Before running, run a dry test: point the script at an empty test repo or a copy of the target to observe behavior. 4) Check the target repo's 'origin' remote URL — the script will push the workspace contents to that remote using your existing git credentials, so confirm you trust that remote. 5) Be aware the script deletes all non-excluded items in the target directory (preserves only .git) and can force-style push; back up the target repo first. 6) If you need a less-destructive workflow, request or modify the code to support a dry-run mode and safer defaults (no delete, no force).
功能分析
Type: OpenClaw Skill
Name: workspace-git-sync
Version: 1.0.0
The workspace-git-sync skill is a utility designed to synchronize the OpenClaw workspace directory to a user-specified local Git repository. The script (sync_workspace.py) implements a standard sync flow: pulling remote changes, mirroring the source directory to the target (including a cleanup step for non-excluded files), and pushing the updates. It includes safety checks such as verifying the target is a valid Git repository and using '--force-with-lease' for forced pushes. While the script modifies local Git configurations and deletes files in the target directory, these actions are documented and necessary for the stated purpose of repository synchronization.
能力评估
Purpose & Capability
The skill's name/description and its code align: it copies ~/.openclaw/workspace into a local Git repo, runs git add/commit/push, and can force-push. However the metadata declares no required binaries or primary credential even though the implementation calls out to the 'git' CLI (and the SKILL.md examples call 'python3'). The omission of 'git' and 'python3' as required binaries is an incoherence the user should note.
Instruction Scope
SKILL.md and the script stay within the stated scope: they validate the source directory, validate the target is a git repo, pull, wipe non-excluded files in the target, copy workspace contents, commit, and push. This is expected for a sync/backup tool. Important caveats: the script deletes non-excluded files in the target repo (preserving only .git) and will push whatever it copies (including any sensitive files present in the workspace). The tool also offers a 'force' strategy that skips pull and uses --force-with-lease; this is destructive by design and must be used with care.
Install Mechanism
There is no install spec (instruction-only skill with included script files). That is low risk from an installer perspective, but the README contains a placeholder clone URL (github.com/yourname) which suggests the source/maintainer is unclear. The code is present in the skill bundle and will be written to disk when the skill is installed/used.
Credentials
The skill declares no required environment variables or credentials (appropriate), but it relies on locally configured Git credentials/remote configuration to push data. That means data copied from your workspace can be transmitted to whatever remote is configured for the target repo (origin). You should verify the target repo's remote URL and that you trust it before running; the skill itself does not request keys but will use any existing git auth helpers or credentials on the host.
Persistence & Privilege
always:false (normal). The skill does not request permanent platform-wide privileges and does not modify other skills. It will write to the target git repo and set local git user.name/email inside that repo (expected and scoped). The default allow-autonomous-invocation is platform normal — not sufficient alone to raise a flag.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install workspace-git-sync - 安装完成后,直接呼叫该 Skill 的名称或使用
/workspace-git-sync触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Sync your OpenClaw workspace to a local Git repository with automated backup and version control.
- Adds commands to sync `~/.openclaw/workspace/` to any specified Git repo, including pull → copy → commit → push.
- Supports exclusion of large/system/generated folders (e.g., `skills/`, `.git/`, `__pycache__/`).
- Handles merge conflicts and uses safe push strategies.
- Provides Python API and CLI usage examples.
- Includes error handling for common issues like missing directories or permissions.
元数据
常见问题
workspace-git-sync 是什么?
将 OpenClaw workspace 目录(~/.openclaw/workspace/)同步到指定的本地 Git 仓库, 自动执行 git add、commit 和 push 操作。 使用场景: - 备份 workspace 文件到 Git 仓库 - 将工作目录同步到远程备份 - 定期归档 OpenClaw... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。
如何安装 workspace-git-sync?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install workspace-git-sync」即可一键安装,无需额外配置。
workspace-git-sync 是免费的吗?
是的,workspace-git-sync 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
workspace-git-sync 支持哪些平台?
workspace-git-sync 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 workspace-git-sync?
由 David668HAHA(@david668haha)开发并维护,当前版本 v1.0.0。
推荐 Skills