Batch Git URL Replace for Openclaw

A recursive automation tool that performs batch replacement of Git remote URLs across multiple local repositories in a single operation.

zxfcn
v1.0.0
Mar 18, 2026
0
909
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install batch-git-url-replace

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install batch-git-url-replace using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Batch Git URL Replace?

Batch Git URL Replace is a specialized technical utility designed for developers and DevOps engineers who manage extensive local project collections. When migrating from one Git hosting provider to another—such as moving from GitHub to GitLab or changing internal server domains—manually updating each repository is error-prone and time-consuming.

This skill for Openclaw Skills automates the entire migration process by recursively scanning a target directory for .git/config files and updating the remote origin URLs using precise string replacement. It provides a reliable way to ensure all local workspace pointers are synchronized with the new server infrastructure without manual intervention.

Batch Git URL Replace Use Cases

  • Migrating dozens of local projects from a legacy Git server to a new corporate domain.
  • Switching entire project directories from HTTPS to SSH remote protocols in bulk.
  • Re-pointing local development environments after a server migration or restructuring.
  • Consolidating scattered repositories under a unified hosting provider URL pattern.

How Batch Git URL Replace Works

  1. The user provides a root scanning directory, the current (old) URL string, and the target (new) URL string.
  2. The skill detects the host operating system to execute either a PowerShell or Bash automation script.
  3. It recursively traverses the directory structure to identify every .git/config file available.
  4. For each config file, it performs a search-and-replace operation specifically on the remote URL entries.
  5. The tool outputs a detailed summary report indicating how many repositories were successfully updated and how many were skipped.

Batch Git URL Replace Setup

To use this Openclaw Skills automation, ensure you have the appropriate terminal permissions for the directories you intend to scan. No additional software installation is required beyond a standard Git environment.

For Windows users, ensure PowerShell script execution is enabled. For Linux/macOS users, the skill utilizes standard find and sed utilities. Simply provide the following parameters when prompted:

  • scanDir (e.g., /home/user/projects or C:\Code)
  • oldUrl (The existing server address)
  • newUrl (The destination server address)

Batch Git URL Replace Data Schema & Taxonomy

The skill interacts with the local file system using the following data structure for processing:

Attribute Description
scanDir The starting path for the recursive repository search.
oldUrl The specific substring or host address to be replaced.
newUrl The new string to be inserted into the Git configuration.
.git/config The target file modified by the skill to update remote metadata.

Batch Git URL Replace Advanced Features

  • Recursive deep-scanning to find nested Git repositories within subdirectories.
  • Regex-safe escaping to handle complex URL strings and special characters.
  • Cross-platform compatibility supporting both Windows PowerShell and Linux/macOS Bash environments.
  • Error handling that skips protected or inaccessible files without halting the entire batch process.
  • Real-time logging of modification status for every repository encountered during the scan.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*