<< All versions
Skill v1.0.0
currentAutomated scan100/100hezaohezao/poirot/github-repo-management
──Details
PublishedOctober 24, 2026 at 07:42 PM
Content Hashsha256:c014ca6669c48da5...
Git SHA19152ef7e17c
──Files
Files (1 file, 4.0 KB)
SKILL.md4.0 KBactive
SKILL.md · 172 lines · 4.0 KB
version: "1.0.0" 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-authskill)
1. Clone
bash
# HTTPSgit clone https://github.com/owner/repo.git# SSHgit clone git@github.com:owner/repo.git# With gh (auto-forks if you don't have push access)gh repo clone owner/repo# Clone + set up remote for forkgh repo clone owner/repo -- --origin upstreamgit remote add origin https://github.com/$GH_USER/repo.git
2. Create New Repository
bash
# With gh (creates on GitHub + clones locally)gh repo create my-project --public --clone --description "My project"# Privategh repo create my-project --private --clone# With git + curlmkdir my-project && cd my-project && git initcurl -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.gitgit push -u origin main
3. Fork
bash
# With gh (forks + clones + sets up remotes)gh repo fork owner/repo --clone# With curlcurl -s -X POST \-H "Authorization: token $GITHUB_TOKEN" \https://api.github.com/repos/owner/repo/forks# Manual fork setupgit remote add upstream https://github.com/owner/repo.gitgit remote set-url origin https://github.com/$GH_USER/repo.git
4. Manage Remotes
bash
# List remotesgit remote -v# Add remotegit remote add upstream https://github.com/owner/repo.git# Change remote URLgit remote set-url origin git@github.com:owner/repo.git# Remove remotegit remote remove upstream# Sync fork with upstreamgit fetch upstreamgit checkout maingit merge upstream/maingit push origin main
5. Releases
bash
# Create release with ghgh release create v1.0.0 --title "v1.0.0" --notes "First stable release"# Create release with assetsgh release create v1.0.0 ./dist/app.tar.gz ./dist/app.zip --title "v1.0.0"# List releasesgh release list# View releasegh release view v1.0.0# Download release assetsgh release download v1.0.0 --pattern "*.tar.gz"# With curlcurl -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
bash
# With ghgh repo edit --description "New description"gh repo edit --enable-issues=falsegh repo edit --default-branch main# With curlcurl -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)
bash
# With ghgh secret set MY_SECRET --body "secret_value"gh secret set MY_SECRET < secret_file.txtgh secret listgh secret delete MY_SECRET# With curl (requires public key encryption)# See https://docs.github.com/en/rest/actions/secrets
8. Delete Repository
bash
# With gh (requires --yes for confirmation)gh repo delete owner/repo --yes# With curlcurl -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.