Skip to content

Fork a GitHub repository and clone it locally with origin and official remotes configured.

CCM score
52 of 100
skills.sh installs
3.4K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full fork-and-clone flow: fork via gh repo fork, clone the fork, and add an upstream remote
  • Adds the original repository as a remote named official (not upstream) for tracking upstream changes
  • Verifies remote setup with git remote -v and reports the result, with origin pointing at the fork and official at the source
  • Designed for users who need a local copy of someone else's GitHub repository that stays synced with upstream

Install

$ npx -y skills add zc277584121/mygitplugin --skill git-fork-clone -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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 配置结果。

Details

Repository
github.com/zc277584121/mygitplugin
Category
Git & Releases
First seen
Jun 3, 2026

Questions

What does the git-fork-clone skill do?

git-fork-clone forks another person's GitHub repository into your account and clones the fork locally. It also adds an official remote that points to the original repository so you can track upstream changes.

How do I install the git-fork-clone skill?

Run npx -y skills add zc277584121/mygitplugin --skill git-fork-clone -y inside a project. After installing, the agent can use git-fork-clone to fork and clone repositories with the official remote already set up.

Does git-fork-clone need the gh CLI?

git-fork-clone uses gh repo fork and gh repo clone, so the gh CLI must be installed and authenticated. The skill runs Bash commands and reports the remote configuration once the clone finishes.

Where does git-fork-clone rank in its category?

git-fork-clone sits in the Git & Releases category and ranks in the top 100 on that category page. It stands out by naming its upstream remote official, which keeps remote naming consistent across projects.

More from zc277584121/mygitplugin

All 7

Similar to Git Fork Clone

More Git & Releases