github-repo-management

Create, clone, fork, and configure GitHub repositories using gh CLI or REST API.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill github-repo-management-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-repo-management
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/github/github-repo-management
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill github-repo-management-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing GitHub repositories involves many repetitive operations—cloning, forking, creating repos, setting branch protection, managing secrets, and publishing releases. This Skill provides ready-to-run commands for every common repository operation, with both the gh CLI and a git + curl fallback when the CLI is unavailable. ## Core Features & Use Cases - Repository Lifecycle: Clone, create (including from templates and organizations), fork, and sync forks with upstream remotes. - Configuration & Security: Edit repo settings, manage topics, configure branch protection rules, and set GitHub Actions secrets. - Releases & CI: Create releases with generated notes, upload assets, list and rerun workflow runs, and trigger workflow dispatches. - Use Case: You need to bootstrap a new open-source project: create a private repo from a template, push existing local code, add branch protection on main, set an API key secret, and publish a v1.0.0 release—all with copy-paste commands. ## Quick Start Ask the agent to create a new private GitHub repository named my-project, clone it locally, and set up branch protection on the main branch.

Frequently Asked Questions about github-repo-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub repository from the command line?

Use gh repo create with flags like --public, --private, --description, and --clone to create and clone in one step. Without the gh CLI, send a POST request with curl to https://api.github.com/user/repos using your GITHUB_TOKEN, then clone or push an existing local directory.

How do I fork a repo and keep it in sync with upstream?

Fork with gh repo fork owner/repo --clone, or POST to /repos/owner/repo/forks via the API. To sync, add the original repo as an upstream remote, then fetch upstream, merge upstream/main into your main branch, and push to origin.

Can I manage GitHub repos without the gh CLI installed?

Yes, every operation has a git plus curl fallback that calls the GitHub REST API directly with a GITHUB_TOKEN. The token can come from the environment, a .env file, or the git credential store.

How do I set GitHub Actions secrets via the API?

Secrets must be encrypted with the repository's public key before the PUT request, which requires Python with PyNaCl to build a SealedBox. Because this is involved, gh secret set is strongly recommended when the CLI is available.

How do I set up branch protection on GitHub with curl?

Send a PUT request to /repos/{owner}/{repo}/branches/{branch}/protection with a JSON body specifying required status checks, required approving review counts, and admin enforcement. A GET on the same endpoint shows the current protection rules.