git-fork-clone
Fork a GitHub repo and clone it locally with proper remote setup
Install
npx skills add https://github.com/zc277584121/mygitplugin --skill git-fork-cloneSKILL.md
Git Fork & Clone
Fork 别人的 GitHub 仓库并 clone 到本地,自动配置 official remote。
触发条件
当用户要求 fork 别人的仓库并 clone 到本地时使用此 skill。
输入
用户需要提供目标仓库,格式为 owner/repo。
执行步骤
- Fork 仓库:使用
gh repo fork <owner/repo> --clone=false将仓库 fork 到zc277584121账号下。 - Clone 仓库:使用
gh repo clone zc277584121/<repo>将 fork 后的仓库 clone 到本地。 - 进入项目目录:
cd <repo>。 - 添加 official remote:
git remote add official https://github.com/<original-owner>/<repo>.git,用于跟踪上游仓库。 - 验证 remote 配置:
git remote -v,确认 origin 指向自己的 fork,official 指向原始仓库。
注意事项
- 如果 fork 已存在,
gh repo fork会自动跳过 fork 步骤。 - 始终使用
official作为上游 remote 名称(而非upstream),以保持一致性。 - Clone 完成后向用户报告 remote 配置结果。
Related skills
setup-matt-pocock-skillsmattpocock905KConfigure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.hyperframes-cliheygen-com714KUse the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers loimplementmattpocock627KImplement a piece of work based on a spec or set of tickets.ask-mattmattpocock626KAsk which skill or flow fits your situation. A router over the skills in this repo.