GitHub Repository Mirror for Openclaw

A professional migration tool to fully mirror GitHub repositories between accounts while preserving all version history, branches, and tags.

truongvknnlthao-gif
v0.1.0
Feb 9, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install github-repo-mirror

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 github-repo-mirror 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 GitHub Repository Mirror?

The GitHub Repository Mirror skill provides a robust framework for performing deep migrations of codebases from one GitHub account to another. By leveraging specialized Git operations like bare cloning and mirror pushing, this Openclaw Skills solution ensures that no data is lost during the transition. Unlike simple exports, this method maintains the integrity of the commit history, original author information, and all existing tags.

This skill is particularly valuable for developers and DevOps teams who need to consolidate repositories or move projects between personal and organizational accounts. It bypasses the limitations of standard forks by creating a true mirror, ensuring that even GitHub Actions workflows are preserved when the correct permissions are provided.

GitHub Repository Mirror Use Cases

  • Consolidating multiple personal projects into a single professional organization account.
  • Creating a high-fidelity backup or mirror of a critical repository on a secondary account.
  • Moving repositories between accounts while keeping all historical commit hashes and release tags intact.
  • Migrating projects that include complex GitHub Actions and CI/CD pipelines.

How GitHub Repository Mirror Works

  1. Verify access permissions by checking the current GitHub CLI authentication status.
  2. Perform a bare clone of the source repository to download the full Git metadata without a working directory.
  3. Switch the active GitHub account to the target destination where the repository will be hosted.
  4. Create a new, empty repository on the target account to serve as the mirror destination.
  5. Execute a mirror push command to sync all branches, tags, and commits to the new repository.
  6. Conduct a cleanup of the local environment by removing the temporary bare clone directory.

GitHub Repository Mirror Setup

To use this skill within Openclaw Skills, ensure you have the GitHub CLI (gh) installed and a Personal Access Token with repo and workflow scopes.

# Check your current authentication
gh auth status

# Switch to the source account if necessary
gh auth switch -u source_user

# Prepare the bare clone
git clone --bare https://github.com/source_account/repo.git

GitHub Repository Mirror Data Schema & Taxonomy

The skill manages repository metadata and Git objects to ensure full parity between the source and target.

Data Component Description
Commit History Every commit hash and message is preserved exactly as it was in the source repository.
Branch Structure All branches (main, develop, feature/*) are mirrored to the destination.
Tag Metadata Versioning tags and release markers are included in the push.
Author Info Original contributor names and email addresses are maintained in the history.
Workflows GitHub Actions YAML files are migrated, provided the token has workflow permissions.

GitHub Repository Mirror Advanced Features

  • Continuous Upstream Sync: Configure the original repository as an upstream remote to pull and merge future updates into the mirror.
  • Automated Repository Creation: Uses the GitHub CLI to automatically generate private or public repositories with predefined descriptions.
  • Permission Validation: Includes checks to ensure the migration account has the necessary workflow permissions to handle CI/CD secrets and actions.
  • Metadata Integrity: Ensures that the Commit ID remains identical between the upstream and the mirror for consistency across developer environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*