ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

github-repo-mirror

完整迁移 GitHub 仓库,保留所有提交记录、分支和标签。用于将仓库从一个 GitHub 账号完整搬迁到另一个账号。

Why use this skill?

Learn how to use the github-repo-mirror skill to move repositories between GitHub accounts while preserving full commit history, branches, and tags.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/truongvknnlthao-gif/github-repo-mirror
Or

What This Skill Does

The github-repo-mirror skill is a professional-grade utility designed to facilitate the complete migration of GitHub repositories between different accounts. It creates an exact replica of your source repository, ensuring that all vital metadata remains intact. By leveraging the git clone --bare and git push --mirror workflow, the skill ensures that you retain every commit in the git history, all existing branches, and all configured tags. It is the most reliable way to migrate project state without manual cleanup, making it an essential tool for developers shifting their professional infrastructure, archiving legacy projects, or consolidating multiple organizational repositories into a single hub.

Installation

To integrate this skill into your environment, run the following command in your terminal: clawhub install openclaw/skills/skills/truongvknnlthao-gif/github-repo-mirror Ensure your local environment has the GitHub CLI (gh) installed and configured with appropriate scopes, specifically including workflow permissions to handle GitHub Actions migration.

Use Cases

  • Account Consolidation: Moving personal side projects from a university or old personal email account to a primary professional GitHub profile.
  • Open Source Archiving: Preserving the history of a repository before deleting a deprecated account or transferring ownership.
  • Workplace Migration: Migrating a repository from an individual developer's account to a new organization structure while preserving the full commit history and attribution.
  • Environment Syncing: Creating a mirror of a project for staging or testing purposes where commit history parity is strictly required.

Example Prompts

  1. "I need to move my repository 'data-processor' from my old account 'old-user' to my new account 'new-user'. Can you guide me through the mirroring process?"
  2. "Use the github-repo-mirror skill to migrate the 'awesome-app' repository to my new organization account. Make sure the commit history and workflow files are preserved."
  3. "Help me clone 'https://github.com/source/project' as a mirror. I want to ensure that all tags and branches are pushed to my new private repository 'my-project'."

Tips & Limitations

  • Target State: Ensure the target repository on GitHub is initialized as an empty repository before executing the mirror command, as --mirror is a destructive operation.
  • Permissions: You must have read access to the source and write access to the target. Use gh auth switch to toggle between authenticated identities if necessary.
  • Workflow Support: If your repository utilizes GitHub Actions, you must provide a GitHub personal access token with workflow scope; otherwise, CI/CD configuration files will fail to synchronize.
  • Efficiency: While this method is robust, very large repositories with massive binary blobs (LFS) may take extra time; ensure a stable network connection during the push process.

Metadata

Stars946
Views0
Updated2026-02-13
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-truongvknnlthao-gif-github-repo-mirror": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#github#git#migration#automation#repository
Safety Score: 4/5

Flags: network-access, file-write, file-read, external-api