PluginBench
Skill
Fail
Audit score 45

git-fork-clone

zc277584121/mygitplugin

Fork a GitHub repo and clone it locally with automatic upstream remote setup

What is git-fork-clone?

Automates forking a GitHub repository to your account and cloning it locally with proper remote configuration. Use this when you need to contribute to someone else's project and want origin pointing to your fork and a separate remote tracking the original repository.

  • Forks a GitHub repository to your account using gh CLI
  • Clones the forked repository to your local machine
  • Automatically configures an 'official' remote pointing to the original upstream repository
  • Verifies remote configuration with git remote -v
  • Skips fork step if fork already exists

How to install git-fork-clone

npx skills add https://github.com/zc277584121/mygitplugin --skill git-fork-clone
Prerequisites
  • GitHub CLI (gh) installed and authenticated
  • Git installed locally
  • Access to fork the target repository
Claude Code
Cursor
Windsurf
Cline

How to use git-fork-clone

  1. 1.Provide the target repository in owner/repo format (e.g., torvalds/linux)
  2. 2.The skill forks the repo to your account using gh repo fork
  3. 3.The forked repository is cloned to your local machine
  4. 4.An 'official' remote is automatically added pointing to the original repository
  5. 5.Verify the remote setup is correct with git remote -v

Use cases

Good for
  • Contributing to open-source projects where you need your own fork
  • Setting up a local development environment for collaborative work
  • Maintaining a personal fork while staying synchronized with upstream changes
  • Preparing to submit pull requests to someone else's repository
Who it's for
  • Open-source contributors
  • Developers collaborating on GitHub projects
  • Anyone needing to fork and work on external repositories

git-fork-clone FAQ

What if the fork already exists?

The gh repo fork command automatically skips the fork step and proceeds with cloning.

Why use 'official' instead of 'upstream'?

This skill consistently uses 'official' as the remote name for the original repository to maintain naming consistency across projects.

Can I use this without GitHub CLI?

No, this skill requires gh CLI to be installed and authenticated with GitHub.

What remotes will I have after running this?

You'll have 'origin' pointing to your fork and 'official' pointing to the original upstream repository.

Full instructions (SKILL.md)

Source of truth, from zc277584121/mygitplugin.


name: git-fork-clone description: Fork a GitHub repo and clone it locally with proper remote setup allowed-tools:

  • Bash

Git Fork & Clone

Fork 别人的 GitHub 仓库并 clone 到本地,自动配置 official remote。

触发条件

当用户要求 fork 别人的仓库并 clone 到本地时使用此 skill。

输入

用户需要提供目标仓库,格式为 owner/repo。

执行步骤

  1. Fork 仓库:使用 gh repo fork <owner/repo> --clone=false 将仓库 fork 到 zc277584121 账号下。
  2. Clone 仓库:使用 gh repo clone zc277584121/<repo> 将 fork 后的仓库 clone 到本地。
  3. 进入项目目录:cd <repo>。
  4. 添加 official remote:git remote add official https://github.com/<original-owner>/<repo>.git,用于跟踪上游仓库。
  5. 验证 remote 配置:git remote -v,确认 origin 指向自己的 fork,official 指向原始仓库。

注意事项

  • 如果 fork 已存在,gh repo fork 会自动跳过 fork 步骤。
  • 始终使用 official 作为上游 remote 名称(而非 upstream),以保持一致性。
  • Clone 完成后向用户报告 remote 配置结果。