github-repo-management

Manage GitHub repositories, releases, secrets, and Actions workflows via gh CLI or REST API.

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/maopujie10-sys/Bailongma --skill github-repo-management-maopujie10-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-repo-management
Source: https://github.com/maopujie10-sys/Bailongma/tree/main/skills/hermes-skills/github/github-repo-management
Command: npx skills add https://github.com/maopujie10-sys/Bailongma --skill github-repo-management-maopujie10-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing GitHub repositories involves many repetitive operations—cloning, forking, configuring settings, protecting branches, publishing releases, and debugging CI runs. This Skill provides ready-to-run commands for every common repository task, with both the gh CLI and a git + curl fallback so it works even when the GitHub CLI is not installed. ## Core Features & Use Cases - Repository Lifecycle: Clone, create, fork, and sync repositories, including organization repos and template-based creation. - Configuration & Security: Edit repo settings, manage topics, set branch protection rules, and manage GitHub Actions secrets. - Releases & CI/CD: Create and download releases, upload assets, list and rerun workflow runs, fetch failed-run logs, and trigger workflow dispatches. - Use Case: You need to fork an open-source project, keep it synced with upstream, protect the main branch, and publish a v1.0.0 release with auto-generated notes—all from the terminal without opening the GitHub website. ## Quick Start Ask the agent to create a new private GitHub repository named my-project with an MIT license and clone it locally.

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 my-project --public --clone to create and clone in one step. Without the gh CLI, send a POST request to https://api.github.com/user/repos with your token, then git clone the resulting repository URL.

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

Run gh repo fork owner/repo --clone, or POST to /repos/owner/repo/forks via the API and clone your copy. Add the original as an upstream remote, then fetch upstream, merge upstream/main, and push to origin to sync.

Can I manage GitHub repos without installing the gh CLI?

Yes. Every operation has a git plus curl fallback using the GitHub REST API and a GITHUB_TOKEN. The token can come from the environment, a .env file, or ~/.git-credentials. Only secret encryption is notably harder without gh.

How do I set GitHub Actions secrets from the command line?

The simplest way is gh secret set API_KEY --body value. Via the API you must fetch the repo's public key, encrypt the secret with PyNaCl SealedBox, and PUT the encrypted value to /actions/secrets/NAME.

How do I rerun a failed GitHub Actions workflow?

Use gh run rerun RUN_ID, or add --failed to rerun only failed jobs. With curl, POST to /repos/OWNER/REPO/actions/runs/RUN_ID/rerun or /rerun-failed-jobs. You can also download run logs as a zip for debugging.

Why does branch protection setup fail via the API?

Branch protection requires admin permissions on the repository and a token with adequate scopes. The PUT request to /branches/main/protection also needs a valid JSON body; setting restrictions to null is required for non-organization repos.