github-ops

Automates GitHub pull request, issue, and branch operations using the gh CLI inside containers.

3|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/MLShukai/ResoniteIO --skill github-ops-mlshukai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-ops
Source: https://github.com/MLShukai/ResoniteIO/tree/main/.agents/skills/github-ops
Command: npx skills add https://github.com/MLShukai/ResoniteIO --skill github-ops-mlshukai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It standardizes how an AI agent performs GitHub operations from inside a dev container, covering gh CLI authentication, branch pushing, PR creation and review, and issue management while enforcing the repository's git conventions and safety rules. ## Core Features & Use Cases - Authentication Setup: Authenticate the gh CLI via the GH_TOKEN environment variable or interactive gh auth login, with verification commands. - Branch and PR Workflow: Create convention-compliant branches (type/date/slug), push with upstream tracking, and open PRs with properly formatted titles and HEREDOC-safe bodies. - Review and Issue Management: List, view, diff, and check PRs, submit review comments, and create or close GitHub issues. - Safety Guardrails: Prohibit direct pushes to main, restrict force-push usage, and defer merges and releases to the user. - Use Case: After finishing a feature branch in the container, ask the agent to push it and open a draft PR with a conventional title and a summary plus test plan body, then watch CI status with gh pr checks. ## Quick Start Push my current branch and create a draft pull request against main with a summary and test plan using the gh CLI.

Frequently Asked Questions about github-ops

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

FAQPage Schema
How do I create a pull request with the gh CLI?

Run gh pr create with --base main, a conventional title like feat(scope): description, and a body passed via a single-quoted HEREDOC to prevent shell expansion. Use --draft for work-in-progress PRs and gh pr checks to monitor CI afterward.

How do I authenticate the gh CLI inside a Docker container?

Set a GH_TOKEN environment variable with a personal access token on the host and pass it into the container via an env_file, since gh reads GH_TOKEN automatically. Alternatively run gh auth login with the web device flow, noting credentials disappear when the container is rebuilt unless persisted in a volume.

What scopes does a GitHub token need for gh CLI operations?

The token needs the repo scope for private repositories, workflow scope for modifying CI configuration, and read:org for organization data. Verify the current authentication state and scopes with gh auth status before running operations.

Why does git push fail with updates were rejected?

This happens when the remote main branch has advanced beyond your local history. Run git pull --rebase origin main on your working branch, resolve any conflicts, then push with git push --force-with-lease, which only succeeds if the upstream matches your last push.

Can the agent merge or close pull requests automatically?

No, merging and closing PRs are reserved for user judgment under the repository's safety rules. The agent creates and reviews PRs but does not run gh pr merge, gh pr close, gh release create, or repository setting changes without explicit user confirmation.