OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add zc277584121/mygitplugin --skill git-fork-clone
Fork a GitHub repo and clone it locally with proper remote setup
npx skills add zc277584121/mygitplugin --skill git-fork-clone
Fork 别人的 GitHub 仓库并 clone 到本地,自动配置 official remote。
当用户要求 fork 别人的仓库并 clone 到本地时使用此 skill。
用户需要提供目标仓库,格式为 owner/repo。
gh repo fork <owner/repo> --clone=false 将仓库 fork 到 zc277584121 账号下。gh repo clone zc277584121/<repo> 将 fork 后的仓库 clone 到本地。cd <repo>。git remote add official https://github.com/<original-owner>/<repo>.git,用于跟踪上游仓库。git remote -v,确认 origin 指向自己的 fork,official 指向原始仓库。gh repo fork 会自动跳过 fork 步骤。official 作为上游 remote 名称(而非 upstream),以保持一致性。