Search

PythonReactSEOPDF
OpenClaw

safe-update

Update OpenClaw from source code. Supports custom project path and branch. Includes pulling latest branch, rebasing, building and installing, restarting service. Triggered when user asks to update OpenClaw, sync source, rebase branch, or rebuild.

hacksing0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install hacksing/safe-update

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Safe Update

Update OpenClaw from source to the latest version while preserving local changes.

⚠️ Important Warnings

  • This script performs git rebase and git push --force - may lose local changes if not properly committed
  • Uses npm i -g . for global installation - may require sudo
  • Uses systemctl --user restart - will restart the OpenClaw service
  • Backup your config before running! (see below)

Requirements

Required binaries (must be installed):

  • git
  • npm / node
  • systemctl (for restarting gateway)

Configuration

Environment Variables (optional)
# Set custom project path
export OPENCLAW_PROJECT_DIR="/path/to/openclaw"

# Set custom branch (default: main)
export OPENCLAW_BRANCH="your-feature-branch"

# Enable dry-run mode (no actual changes)
export DRY_RUN="true"
Or Pass as Arguments
./update.sh --dir /path/to/openclaw --branch your-branch

Workflow

Step 1: Analyze Current State (Must Run First)

Before executing any update, check:

  1. Whether the current branch has uncommitted changes
  2. Whether the current branch has local modifications
  3. Whether upstream has new commits
  4. Recommend the most appropriate update strategy based on the situation

Recommended Strategy:

Scenario Recommended Method Rationale
Uncommitted local changes Commit/stash first, then merge Safe, no lost changes
Only clean local commits merge or rebase merge is safer, rebase keeps history clean
Preparing a PR rebase recommended Keeps history tidy
Routine dev update merge recommended Simple, less error-prone
Step 2: Ask User for Confirmation

After presenting the recommended options, you must wait for user confirmation before executing.

Step 3: Execute Update
# 1. Enter project directory
cd "${OPENCLAW_PROJECT_DIR...

Source information

Source
github
Repository
openclaw/skills
Path
skills/hacksing/safe-update
Version
—
Commit
5e62ddfc562e73d6a99db08d64846f31b3750584
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Safe Update

Update OpenClaw from source to the latest version while preserving local changes.

## ⚠️ Important Warnings

- This script performs **git rebase** and **git push --force** - may lose local changes if not properly committed
- Uses **npm i -g .** for global installation - may require sudo
- Uses **systemctl --user restart** - will restart the OpenClaw service
- **Backup your config before running!** (see below)

## Requirements

Required binaries (must be installed):
- `git`
- `npm` / `node`
- `systemctl` (for restarting gateway)

## Configuration

### Environment Variables (optional)

```bash
# Set custom project path
export OPENCLAW_PROJECT_DIR="/path/to/openclaw"

# Set custom branch (default: main)
export OPENCLAW_BRANCH="your-feature-branch"

# Enable dry-run mode (no actual changes)
export DRY_RUN="true"
```

### Or Pass as Arguments

```bash
./update.sh --dir /path/to/openclaw --branch your-branch
```

## Workflow

### Step 1: Analyze Current State (Must Run First)

Before executing any update, check:
1. Whether the current branch has uncommitted changes
2. Whether the current branch has local modifications
3. Whether upstream has new commits
4. Recommend the most appropriate update strategy based on the situation

**Recommended Strategy:**

| Scenario | Recommended Method | Rationale |
|----------|-------------------|----------|
| Uncommitted local changes | Commit/stash first, then **merge** | Safe, no lost changes |
| Only clean local commits | **merge** or **rebase** | merge is safer, rebase keeps history clean |
| Preparing a PR | **rebase** recommended | Keeps history tidy |
| Routine dev update | **merge** recommended | Simple, less error-prone |

### Step 2: Ask User for Confirmation

After presenting the recommended options, **you must wait for user confirmation** before executing.

### Step 3: Execute Update

```bash
# 1. Enter project directory
cd "${OPENCLAW_PROJECT_DIR...

Related skills

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.

OpenClaw

0x0-messenger

eijiac24

Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.