원클릭으로
gh-smart-clone
Set up GitHub clones, forks, remotes, local identity, and grouping related repos under a shared folder.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Set up GitHub clones, forks, remotes, local identity, and grouping related repos under a shared folder.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | gh-smart-clone |
| description | Set up GitHub clones, forks, remotes, local identity, and grouping related repos under a shared folder. |
Use gh smart-clone as the default GitHub checkout tool when it is installed. It encodes a path taxonomy that helps agents avoid confusing project identity, fork ownership, and write authority.
The local path should communicate what kind of work the checkout represents. Remotes should communicate where pulls and pushes go. Do not use raw git clone or gh repo clone for GitHub repositories unless the user explicitly wants that lower-level behavior, the repo is not on GitHub, or gh-smart-clone is unavailable.
Use normal mode when the repository belongs to the user, their organization, or a project they maintain as first-party work.
gh smart-clone OWNER/REPO
This places the checkout under the main code workspace, usually:
~/Code/OWNER/REPO
Use this mode for ordinary owned repositories, company repositories, and repos the user treats as part of their primary workspace. It must not create forks.
Use --oss when the user wants to read, inspect, debug, run, or reference an external project without setting up a contribution fork.
gh smart-clone --oss OWNER/REPO
This keeps external work under the OSS boundary:
~/Code/oss/OWNER/REPO
The oss/ segment is a workflow boundary, not merely a tidy folder name. It tells future agents: "this is external code; be careful about authority and assumptions."
Use --contribute only when the user intends to make changes that may be submitted through a fork.
gh smart-clone --contribute OWNER/REPO
This mode may create GitHub state by creating or reusing a fork. It should clone the fork as origin, place the checkout under the upstream OSS project path, and configure upstream to the original project.
Expected shape:
path: ~/Code/oss/UPSTREAM_OWNER/REPO
origin: fork owner push remote
upstream: upstream project pull remote
If the user passes an existing fork, treat the parent as the canonical upstream project when possible. The fork owner is a push mechanism, not the project identity.
If the destination already exists, do not silently reclone over it or mutate remotes. Inspect it first:
git -C /path/to/checkout remote -v
git -C /path/to/checkout config user.name
git -C /path/to/checkout config user.email
Use --contribute --reconfigure only when the user wants the existing checkout intentionally updated for contribution workflow remotes and optional local identity.
gh smart-clone --contribute --reconfigure OWNER/REPO
Use --group <name> when the user wants several related repositories collected under one organizational folder instead of scattered directly under the owner. The group is a cosmetic directory segment placed between owner and repo; it does not change remotes, fork ownership, or local git identity.
gh smart-clone --group illo tmchow/illo-website
gh smart-clone --group illo tmchow/illo-skill
gh smart-clone --group illo tmchow/illo-characters
Result:
~/Code/tmchow/illo/illo-website
~/Code/tmchow/illo/illo-skill
~/Code/tmchow/illo/illo-characters
The group folder is plain organization, not a checkout: it is never itself a git repository and never gets remotes. Grouping is explicit because it cannot be safely inferred. Do not assume a shared name prefix (illo-*) implies a group; only group when the user asks to. --group composes with every mode, so --oss --group vendor and --contribute --group vendor place the grouped folder under the correct root and upstream path.
gh smart-clone for GitHub clone and fork setup whenever it is installed.oss/ means external work.--contribute may create or reuse a fork for contribution setup.--oss for inspection. Do not create forks just because a repo is external.--group as cosmetic. It only organizes checkouts on disk; it never changes identity, remotes, or authority, and it is used only when the user asks to group repos.--reconfigure is explicit.The extension is config-driven. Do not hardcode a person's account, name, email, or SSH alias in public automation.
Relevant user-level configuration:
git config --global smart-clone.prefix ~/Code
git config --global smart-clone.ossPrefix ~/Code/oss
git config --global smart-clone.forkOwner OWNER_OR_ORG
git config --global smart-clone.gitName "Example Name"
git config --global smart-clone.gitEmail person@example.com
git config --global smart-clone.sshAlias github.com-work
Use --fork-owner OWNER_OR_ORG for one-off contribution workflows. If the fork owner differs from the authenticated gh user, the extension treats it as an organization fork target.
After contribution setup and before editing or pushing, verify:
pwd
git remote -v
git config user.name
git config user.email
gh auth status
Confirm these facts:
oss/ root.origin points to the intended fork or owned repository.upstream points to the original project for contribution checkouts.--reconfigure.--oss when the user actually intends to contribute through a fork; use --contribute instead.