/github-ops:github-opsfrom github-ops
Shared how-to for GitHub operations in both environments this system runs in — locally with the `gh` CLI + `git`, and on Claude web / in scheduled routines with the GitHub MCP server (`mcp__github__*`, no `gh` there). Other skills — issue-build-loop, triage-learnings, merge-flow, auto-release-loop — point here instead of each re-explaining the dual path. Load this whenever a loop needs to touch GitHub (list/create issues, open/merge PRs, check CI, push files) and you need the concrete command/tool for the current environment.
Ships in github-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The loops in this marketplace run in two environments, and GitHub is reached differently in each. This skill is the single source of truth for that mapping so no loop skill has to repeat it.
flowchart LR
START{"is gh available?<br/>(run: command -v gh)"} -->|yes — dev machine| CLI["gh CLI + git<br/>→ references/gh-cli.md"]
START -->|no — Claude web / routine| MCP["GitHub MCP server<br/>(mcp__github__*)<br/>→ references/github-mcp.md"]
gh and git are installed → use
references/gh-cli.md. Auth is your gh login.gh is not available; the GitHub MCP
server is → use references/github-mcp.md. Auth is
the MCP server's connected GitHub App (no token to paste).Both are first-class. Detect with command -v gh (or: if the mcp__github__* tools are
present, you're on the MCP path).
Plugin scripts under plugins/*/scripts/ are not a third path — they're the local path,
scripted. They shell out to gh, so they inherit your login and need no token, and they only
run where gh does. What was a third path — a bash script calling api.github.com with
curl and a GH_TOKEN — is gone, because the proxy-injected token never worked in scheduled
routines. Don't reintroduce it.
Tool names can drift across
github-mcp-serverversions — see the note at the top ofgithub-mcp.md.
Every operation a loop needs, with its section anchor in each reference file. Both
files cover the same list — keep them in sync. One operation is genuinely
asymmetric: deleting a remote branch exists locally but has no MCP tool, so a loop
that needs it cannot run in a routine (see the github-mcp.md Notes for what to do
instead).
| Operation | Used by |
|---|---|
| List issues (by label / state) | triage (inbox), all loops (backlog) |
| Get / read an issue | triage |
| Create an issue | triage (mcp-repo, loop-improvement) |
| Comment on an issue | all loops |
| Rewrite an issue's body | issue-discuss-loop |
| Close an issue | triage |
| List PRs (by label / state) | dependabot-rollup |
| List a repo's open Dependabot PRs (security PRs target the default branch) | dependabot-rollup |
| List Dependabot security alerts | dependabot-rollup |
| Get a PR (review decision, mergeable, base) | merge-flow, all loops |
| Get PR reviews + review comments | merge-flow, rework-loop |
| Get PR CI / check-run status | every loop (the merge gate) |
| Read a failing check's log | every loop (diagnosing a red CI run) |
Post a PR review (body + inline comments, COMMENT event) | review-loop |
| Create a PR | all loops |
| Merge a PR (+ delete branch) | merge-flow |
| Update a PR's body | dependabot-rollup |
| Close a PR without merging (+ comment, delete branch) | dependabot-rollup |
| Create a branch | triage (shared-skills), issue-build-loop (content-repo shape) |
| Create / update / push file(s) | triage (shared-skills), issue-build-loop (content-repo shape) |
| Get file contents | any |
| List branches (name + protection) | branch-housekeeping |
Get repo metadata (default branch, delete_branch_on_merge, archived) | branch-housekeeping, release-and-branching |
| Delete a remote branch — local path only | branch-housekeeping (opt-in reap); no MCP equivalent exists |
| Detect base branch | all (defer to release-and-branching) |
These are policy, not mechanism — they apply whichever reference you use:
merge-flow.push-branch.sh enforces
both for the one push a loop makes.release-and-branching, not assumed."No gh" does not mean "no clone". Claude web sessions and routines usually start
inside a checked-out clone with node/npm installed. Before editing repo files, run
git rev-parse --show-toplevel (or git status) to check.
npm version, npm install --package-lock-only, formatters, tests). Commit, then push
the branch with bash ~/.claude/skills/github-ops/scripts/push-branch.sh (-C <dir> for another repo): it pushes the
current branch only, never forces, and refuses main/dev. In a routine it's the only
push allowed to run without asking, so use it there rather than git push. If the push
is refused (no auth), push the edited files with the MCP push_files tool instead.get_file_contents /
create_or_update_file / push_files). This only works for small files. A token-limit
error on get_file_contents (lockfiles, generated code) means stop and re-check the
environment. Don't hand-edit the error's saved output.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub hifi-phil/umbraco-mcp-ops --plugin github-ops