← 返回 Skills 市场
maverick-software

Safe Update/Merge

作者 maverick-software · GitHub ↗ · v1.3.0
cross-platform ⚠ suspicious
632
总下载
0
收藏
3
当前安装
16
版本数
在 OpenClaw 中安装
/install safe-update-merge
功能描述
Safely merge upstream OpenClaw updates without destroying plugin/skill injections, custom UI tabs, or workspace features. Two-phase: Phase 1 (automated) merg...
安全使用建议
This skill appears to do what it says, but it performs high-impact operations. Before running: - Run the provided dry-run/preflight (scripts/preflight.sh / --dry-run) first and inspect /tmp/safe-merge/preflight-report.json. - Backup your repo (or create a clone) and ensure you can recover if the force-push or branch deletion is misapplied. - Inspect scripts/safe-merge-update.sh and scripts/redact-secrets.sh locally to confirm behavior (the repo contains these scripts). Don't run them as root; run them as your normal user. - If you do not want any external model involvement, do not set ANTHROPIC_API_KEY and run with --no-auto-resolve; resolve conflicts manually with --resume. - Be aware that building (npm/pnpm install) can run package install scripts and pull from the network — run in a safe environment first. - The redaction step is pattern-based and stores a temporary redaction map on disk (mode-700) briefly; treat that as sensitive data and verify it is removed after runs. - Confirm TARGET_REMOTE/TARGET_BRANCH point to the intended fork/branch before using --promote to avoid accidental force-push. If you want greater assurance, run the merge process in a disposable environment or CI runner first and audit the scripts' full contents (particularly safe-merge-update.sh) before using the automatic conflict resolution option.
功能分析
Type: OpenClaw Skill Name: safe-update-merge Version: 1.3.0 The skill performs high-impact operations like `git merge`, `git push --force`, `npm install`, and `systemctl restart`, which are necessary for its stated purpose of safely merging upstream updates. It integrates with the external `claude` CLI for AI-driven conflict resolution, sending redacted file content to an external API. While the skill implements strong security controls (e.g., explicit `Bash` tool exclusion for `claude`, robust secret redaction via `scripts/redact-secrets.sh` to a mode-700 temp directory, `--ignore-scripts` for package installs, and a two-phase user-confirmed promotion for `git push --force`), there are inherent risks. Potential vulnerabilities include shell injection in `python3 -c` calls within `scripts/preflight.sh` and `scripts/validate.sh` if git output or script-generated messages were maliciously crafted, and reliance on the `claude` CLI's security model to strictly enforce tool restrictions and prevent data leakage from redacted content. These risks, while mitigated, elevate the classification to suspicious rather than benign, as they represent capabilities that could be exploited, even if not intentionally malicious within the skill's design.
能力评估
Purpose & Capability
Name/description match the actual files and requirements. The skill needs git and REPO_DIR (expected). Optional tools (claude CLI, python3, systemctl) are directly justified in SKILL.md: claude for auto-resolve, python3 for preflight report, systemctl to restart the gateway. The manifest and protected-file list align with preserving custom UI/plugins during merges.
Instruction Scope
Instructions perform repository operations (fetch, worktree dry-run, merges), builds (npm/pnpm), an in-place restart of the gateway (systemctl --user restart openclaw-gateway), and optional conflict resolution via the claude CLI. All of these are within the merger/updater scope, but they are high-impact: building may run install scripts and network downloads, restarting the gateway affects live service, and using the claude CLI sends redacted file content to an external service. The skill documents a redaction step and asserts the model is invoked with limited tools, but redaction is pattern-based and may miss secrets; the redaction map is written to a temp file (mode-700) and deleted after restoration — this reduces risk but does not eliminate it. Overall scope is coherent but warrants caution.
Install Mechanism
No install spec — the skill is instruction-and-script based and does not download arbitrary binaries at install time. All provided scripts and source files are bundled with the skill (no external URL downloads or extract steps described). This is the lower-risk model for install mechanisms.
Credentials
Only REPO_DIR is required; other env vars (UPSTREAM_REMOTE, TARGET_REMOTE, TARGET_BRANCH, PACKAGE_MGR) are optional and expected. ANTHROPIC_API_KEY is optional and only needed for automated conflict resolution via the claude CLI; if set it is used locally by the claude CLI to contact the vendor. No unrelated credentials are requested. However: using the Anthropic CLI means redacted repository content (and thereby potentially sensitive snippets) will be transmitted to an external model — redaction mitigates but may not guarantee removal of every secret. Also the script may exercise git push (which uses your existing SSH/HTTP credentials) and systemctl (which affects user services).
Persistence & Privilege
The skill is not always-enabled and does not request elevated platform-wide privileges. It does, however, perform actions with meaningful side effects when run: restarts openclaw-gateway, may force-push to a remote branch during --promote, and deletes temporary branches. Those are intentional for the skill's purpose but are high impact — users must explicitly run the promotion step. The skill does not modify other skills or system configurations beyond restarting the service and manipulating git branches.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install safe-update-merge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /safe-update-merge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.3.0
Add hourly auto-run enable/disable dropdown to the OpenClaw Update modal. Toggle reads cron job state on open and calls cron.update to enable/disable the Safe Merge Update Check job. Manual trigger (Run Safe Merge button) still works regardless of toggle state.
v1.2.8
v1.2.8: Two-phase promote model — gateway no longer pushes to local-desktop-main until user confirms healthy reload. Phase 1 (automated): merge → build → restart gateway from safe-merge branch. local-desktop-main untouched, no remote push. Phase 2 (--promote, user-confirmed): push to TARGET_REMOTE/TARGET_BRANCH, switch local branch, delete safe-merge branch. Rollback before confirm: just restart from previous build — local-desktop-main was never overwritten. Also fixed: - Metadata: git now declared required (was anyBins with claude — incoherent); claude/python3/systemctl declared as optionalBins with descriptions - redact-secrets.sh: corrected contradictory header comment. Script itself writes only to fd 3; caller (safe-merge-update.sh) wires fd 3 to a mode-700 temp file. Maps DO land on disk — truthfully documented. - restart_gateway() now checks systemctl availability before calling — graceful on non-systemd hosts.
v1.2.7
v1.2.7: Zombie-function safety net — validate.sh Check 2b (tsgo TS2304/TS2305 undefined-name scan on src/secrets + src/gateway catches bundler-invisible runtime crashes), Check 9 (post-restart smoke test: HTTP health + journal crash keywords), MERGE_MANIFEST.json refactorChecklist with zombie-functions/import-completeness/schema-field-types checks. Lesson: tsdown/rolldown does NOT type-check; tsgo catches what the bundler misses.
v1.2.6
Reinstate auto-resolve as default; add --no-auto-resolve flag for manual review mode
v1.2.5
Add --dry-run (shows divergence, zero changes), make --auto-resolve explicit opt-in (default now stops on conflicts for manual review), document LOCAL_BRANCH env var in all tables
v1.2.4
Fix all contradictory claims: (1) every reference to allowed tools now consistently says Edit,Read — no Bash anywhere; (2) every reference to map storage accurately says mode-700 temp dir on disk, deleted after restore — no 'in-memory only' or 'never touches disk' language
v1.2.3
Fix high-confidence flags: (1) remove Bash from claude allowedTools — model gets Edit+Read only, script handles git commit; (2) correct 'never touches disk' claim — map IS written to chmod-700 temp dir, deleted immediately after restore; (3) declare ANTHROPIC_API_KEY in optionalEnv metadata
v1.2.2
Fix VirusTotal flags: wire redact-secrets.sh into claude invocation, configurable remote/branch names via env vars, auto-detect npm vs pnpm, remove 1password tab check, fix 'configured agent model' claim (it is the claude CLI), add prominent operator warnings section
v1.2.1
Fully automated pipeline: safe-merge-update.sh handles merge, Claude auto-deconflicts, builds, promotes to local-desktop-main, restarts gateway. Pulls from upstream/main. Auto-prunes stale branches.
v1.2.0
v1.2.0: Added Background Sessions Panel (view/talk to cron subagents from UI by clicking the updates badge). MERGE_MANIFEST.json now has 19 protected files. Changelog section + 2026-03-01 merge resolution notes for 148 upstream commits. references/ folder with bg-sessions backend, controller, and view source.
v1.1.1
Reupload due to scan error by OpenClaw
v1.1.0
safe-merge-update v1.1.0 New Features Update Modal UI — Clicking the topbar update button (any state: Up to Date, N Updates, or Updates Available) now opens a guided modal instead of immediately triggering a merge Step 1: Confirm upstream check + select merge model Step 2: Live fetch with spinner Step 3: Divergence results (commits ahead/behind) with option to run merge Merge Model Selector — Dropdown in the modal lists all available models (same catalog as Agents panel), grouped by provider. Selection persists in localStorage and is passed to the agent as SAFE_MERGE_MODEL in the merge prompt. Defaults to "Agent default model" if unset. Updated Files update-modal.ts — New UI component (modal with model dropdown, upstream check flow, merge trigger) MERGE_MANIFEST.json — v1.0.0 → v1.1.0: Added 6 protected files (update.ts, pipedream.ts, method-scopes.ts, run-loop.ts, run.ts, control-ui-csp.ts), 6 new file patterns, 3 global protected patterns SKILL.md — Rewrote Phase 2 to reflect actual merge workflow (branch → examine → merge --no-commit → resolve → verify). Added UI Update Modal section, Merge Model Selection config docs, 4 new Lessons Learned entries (CSP connect-src, branch naming, auto-merge verification, pnpm packages). Updated Files table. No Breaking Changes — Preflight, validate, redact-secrets scripts unchanged. Merge-agent-prompt unchanged
v1.0.3
**Safer credential handling and clearer network activity documentation.** - Secret redaction map is now written only to file descriptor 3; if fd 3 is not open, redaction aborts with an error (never writes to disk, stdout, or stderr). - Build/install phase always passes --ignore-scripts to pnpm install, preventing execution of untrusted lifecycle hooks. - Documentation clarified: the "no network installs" guarantee refers to the skill package, not the merge workflow itself (which uses git fetch and pnpm install). - Added a usage protocol example for redaction/restore with explicit map handling for agents. - Reiterated that only redacted files are ever backed up; secrets are never written to disk.
v1.0.2
safe-merge-update v1.0.2 - Redaction map for secrets now stays only in memory; backups in `/tmp/safe-merge/backups/` contain only redacted content, never plaintext secrets. - Updated SKILL metadata to require `REPO_DIR` as an environment variable. - Improved build security recommendations: highlights reviewing new install scripts and suggests running merges in isolated environments for extra safety. - Enhanced documentation for secret redaction, backup procedures, and best practices after merging.
v1.0.1
**Added secret redaction for AI-assisted merge.** - Added `scripts/redact-secrets.sh` to automatically detect and redact secrets (API keys, tokens, private keys, passwords) before sending file diffs to the agent model during conflict resolution. - Updated documentation to detail redaction workflow and privacy guarantees: secrets are replaced with placeholders, never leave your machine, and are restored after merging. - Clarified that only conflicting file diffs (never full repo or .env files) are sent to the model, and that your configured OpenClaw agent model is always used. - Improved descriptions of pre-flight safety, validation steps, and backup requirements for increased transparency. - No behavioral changes for existing merge and validation phases except for secret redaction integration.
v1.0.0
Initial release of safe-merge-update skill: a background agent for safely merging upstream OpenClaw changes into forks while preserving custom code and UI. - Automates 4 phases: pre-flight conflict detection, AI-assisted merge, validation, and reporting - Preserves plugin/skill registrations, custom UI tabs, workspace code, and protected files using a manifest - Includes full file backup before any merge, per-file strategy overrides, and manifest-driven AI conflict resolution - Provides UI and chat integration for users to control and monitor the update flow - Validates builds, tab presence, plugin registry, and preservation of critical patterns post-merge - Ensures validation passes before commit; if errors, halts and reports while preserving all backups and leaving branch for manual review
元数据
Slug safe-update-merge
版本 1.3.0
许可证
累计安装 3
当前安装数 3
历史版本数 16
常见问题

Safe Update/Merge 是什么?

Safely merge upstream OpenClaw updates without destroying plugin/skill injections, custom UI tabs, or workspace features. Two-phase: Phase 1 (automated) merg... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 632 次。

如何安装 Safe Update/Merge?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install safe-update-merge」即可一键安装,无需额外配置。

Safe Update/Merge 是免费的吗?

是的,Safe Update/Merge 完全免费(开源免费),可自由下载、安装和使用。

Safe Update/Merge 支持哪些平台?

Safe Update/Merge 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Safe Update/Merge?

由 maverick-software(@maverick-software)开发并维护,当前版本 v1.3.0。

💬 留言讨论