github-repo-management

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Performing GitHub repository operations—cloning, creating, forking, configuring settings, managing releases, secrets, and CI runs—requires knowing many different commands and API endpoints, and the right approach differs depending on whether the gh CLI is available. ## Core Features & Use Cases - Repository Lifecycle: Clone, create, fork, and sync repositories using gh CLI commands with git + curl fallbacks for every operation. - Configuration & Protection: Edit repo settings, topics, visibility, and branch protection rules through the GitHub REST API. - Releases, Secrets & CI: Create releases with assets, manage encrypted Actions secrets, list and rerun workflow runs, and trigger workflow dispatches. - Use Case: You need to fork an open-source project, keep it synced with upstream, set branch protection on main, and publish a v1.0.0 release with auto-generated notes—all from the terminal without opening a browser. ## Quick Start Ask the agent to clone a GitHub repository, create a new release, or list recent CI workflow runs for a given repo.

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 optionally clone a repo. Without gh, send a POST request to https://api.github.com/user/repos with an Authorization token header and a JSON body containing the repo name and settings.

How do I fork a GitHub repo and keep it in sync?▼

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

Can I manage GitHub repos without the gh CLI installed?▼

Yes, every operation has a git plus curl fallback using the GitHub REST API with a GITHUB_TOKEN. The token can be loaded from ~/.dag/.env or ~/.git-credentials. Secrets management is the one case where gh is strongly recommended due to encryption complexity.

How do I set GitHub Actions secrets via the API?▼

First GET the repo's actions/secrets/public-key endpoint, encrypt the secret value with PyNaCl using that public key, then PUT the encrypted value to /repos/{owner}/{repo}/actions/secrets/{name}. Using gh secret set is dramatically simpler if the CLI is available.

How do I rerun a failed GitHub Actions workflow from the terminal?▼

Use gh run rerun <RUN_ID> or gh run rerun <RUN_ID> --failed to retry only failed jobs. Via the API, POST to /repos/{owner}/{repo}/actions/runs/{run_id}/rerun or /rerun-failed-jobs with your token.

When should I use the browser instead of gh for GitHub tasks?▼

Only when you need to interact with web UI elements like clicking buttons or filling forms. For reading repos, viewing code, checking repo info, or any CLI-supported operation, gh or git is faster and should always be preferred over browser navigation.