| name | github-repo-management |
| description | Clone, create, fork repos; manage remotes, releases. |
| allowed-tools | ["bash"] |
| enabled | true |
| related-skills | ["github-auth","github-pr-workflow","github-issues"] |
| license | MIT |
| author | Adapted from hermes-agent (Nous Research, MIT) |
GitHub Repository Management
Create, clone, fork, configure, and manage GitHub repositories.
Prerequisites
- Authenticated with GitHub (see
github-auth skill)
1. Clone
git clone https://github.com/owner/repo.git
git clone git@github.com:owner/repo.git
gh repo clone owner/repo
gh repo clone owner/repo -- --origin upstream
git remote add origin https://github.com/$GH_USER/repo.git
2. Create New Repository
gh repo create my-project --public --clone --description "My project"
gh repo create my-project --private --clone
mkdir my-project && cd my-project && git init
curl -s -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/user/repos \
-d '{"name":"my-project","private":true,"description":"My project"}'
git remote add origin https://github.com/$GH_USER/my-project.git
git push -u origin main
3. Fork
gh repo fork owner/repo --clone
curl -s -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/owner/repo/forks
git remote add upstream https://github.com/owner/repo.git
git remote set-url origin https://github.com/$GH_USER/repo.git
4. Manage Remotes
git remote -v
git remote add upstream https://github.com/owner/repo.git
git remote set-url origin git@github.com:owner/repo.git
git remote remove upstream
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
5. Releases
gh release create v1.0.0 --title "v1.0.0" --notes "First stable release"
gh release create v1.0.0 ./dist/app.tar.gz ./dist/app.zip --title "v1.0.0"
gh release list
gh release view v1.0.0
gh release download v1.0.0 --pattern "*.tar.gz"
curl -s -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$OWNER/$REPO/releases \
-d '{"tag_name":"v1.0.0","name":"v1.0.0","body":"First stable release"}'
6. Repository Settings
gh repo edit --description "New description"
gh repo edit --enable-issues=false
gh repo edit --default-branch main
curl -s -X PATCH \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$OWNER/$REPO \
-d '{"description":"New description","default_branch":"main"}'
7. Secrets (for GitHub Actions)
gh secret set MY_SECRET --body "secret_value"
gh secret set MY_SECRET < secret_file.txt
gh secret list
gh secret delete MY_SECRET
8. Delete Repository
gh repo delete owner/repo --yes
curl -s -X DELETE \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$OWNER/$REPO
Pitfalls
- Fork visibility: forks inherit the parent's visibility. Can't make a
private fork of a public repo (without enterprise).
- Release tags: tags must exist before creating a release.
gh release create auto-creates the tag if it doesn't exist.
- Secret encryption: API secrets require RSA encryption with the repo's
public key. Use
gh secret set instead of raw curl.
- Delete permissions: deleting a repo requires admin access + cannot be
undone.
- Rate limits: creating many repos rapidly may hit secondary rate limits.
Add delays.