GitHub MCP Repository and PR Operations
Manage GitHub branches, commits, PRs, and reviews through MCP with duplicate checks and verified results.
Before & after
Same prompt, same agent — the only difference is the skill.
GitHub has a great API and the MCP connector lets Claude interact with it. You could set up authentication, then have Claude create branches, make commits, and open PRs. The MCP handles the API details, so you'd just need to define what operations Claude should do and when. You might want to think about permissions — maybe Claude creates feature branches but needs confirmation before merging. There's a bit of setup involved, but it would save you manual repo management. Would you like me to walk through the setup, or do you want to scope specific operations first?
MCP SETUP STEPS 1. Connect GitHub account via OAuth (one-time) 2. Enable repository scope: restrict Claude to your repo, not your whole account 3. Define autonomous operations: create branch, commit, open PR, add labels 4. Enable confirmation gates: merge/delete branch requires human approval WORKFLOW TRIGGER Prompt: "Create a feature branch for dashboard-redesign, add commit with UI wireframe updates, open PR with description" WHAT HAPPENS • Branch created: feature/dashboard-redesign-7-31 • Commit staged: added src/components/Dashboard.tsx (with JSDoc) • PR opened to main with auto-generated description from commit history • Labels applied: type/feature, status/review-ready • Reviewers assigned from CODEOWNERS file PERMISSION MATRIX → Create/delete branches: AUTONOMOUS → Push commits: AUTONOMOUS (to non-main branches) → Open PR: AUTONOMOUS → Merge PR: REQUIRE CONFIRMATION → Force push: BLOCKED EXPECTED TIME SAVED 15 min/day on branch setup and PR boilerplate → 75 hours/year
About this skill
“Open a PR for this fix” should not produce a duplicate pull request, target the wrong branch, or report success after an uncertain API response. This skill makes Claude resolve the repository, inspect live state, perform the authorized GitHub operation through MCP, and read back the result.
It also separates remote GitHub changes from local workspace changes, so an uncommitted fix never gets mistaken for code already included in a PR.
What it does
- Resolves the repository, fork, head branch, and base branch before changing anything.
- Finds existing branches and pull requests before creating duplicates, including after interrupted requests.
- Checks permissions, branch protection, and tool capabilities without assuming the connection can write or run tests.
- Creates branches and commits with concurrency checks, preserving unrelated local and remote work.
- Opens or updates PRs from the actual diff and places review comments against the inspected revision.
- Checks merge readiness against the current PR head and verifies completed writes with a fresh read.
What you get
Completed, verified GitHub operations with links, relevant commit SHAs, validation evidence, and any remaining blockers. If a required MCP capability is unavailable, you get the exact access gap and a prepared next step rather than a fabricated success.
Best for
Developers and engineering teams using Claude with an authenticated GitHub MCP connection for everyday branch, commit, PR, and review work. The skill provides the operating workflow; it does not install a connector or grant GitHub access.
SKILL.md preview
---
name: github-mcp-repository-and-pr-operations
description: "Manage live GitHub repositories, branches, commits, pull requests, and reviews through an available MCP connection using state discovery, duplicate detection, concurrency checks, and readback verification, or hand the user exact git and gh commands when no live connection exists. Use when the user says \"open a PR for this fix\", \"push these changes to a new branch\", \"review this pull request\", \"check whether this PR can merge\", \"update the existing PR\", \"my PR keeps targeting the wrong branch\", \"the request timed out, did it create anything?\", or \"merge this PR after the checks pass\"."
---
… (sign up to view the full skill)More development skills
View all Development skills →Performance Bottleneck Profiling: Node, Python, Go
Classifies a slowdown, gives exact profiler commands, reads the output, and proves the fix with same-conditions p95/p99 numbers.
Feature Scaffolding with Working Tests
Turn a short feature spec into code, runnable tests, and integration wiring that match your existing project.
Feature Flag Rollouts and Kill Switches
Design staged flag rollouts, verify rollback paths, and audit flag debt with explicit defaults, gates, and retirement plans.
Microcontroller Firmware and RTOS Engineering
Build and debug MCU firmware with bounded ISR/RTOS timing, safe DMA ownership, and measured power budgets.