mcpbeat Sign in

Github Pr Workflow Agent Skill

GitHub PR lifecycle: branch, commit, open, CI, merge.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
117
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HezaoHezao/poirot --skill github-pr-workflow

The instruction itself

11 sections, as written by the author

GitHub Pull Request Workflow

Complete guide for managing the PR lifecycle. gh first, git + curl

fallback.

Prerequisites

  • Authenticated with GitHub (see github-auth skill)
  • Inside a git repository with a GitHub remote

1. Branch & Commit

# Create feature branch
git checkout -b feature/add-login

# Make changes, commit
git add -A
git commit -m "feat: add login endpoint"

# Push
git push -u origin feature/add-login

2. Create PR

# With gh (interactive)
gh pr create

# With gh (inline)
gh pr create \
  --title "feat: add login endpoint" \
  --body "## Changes
- Add /api/login route
- Add JWT token generation
- Add tests

## Testing
\`\`\`bash
pytest tests/test_auth.py -v
\`\`\`" \
  --base main \
  --head feature/add-login

# With curl
curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls \
  -d '{
    "title":"feat: add login endpoint",
    "body":"Add /api/login route with JWT",
    "head":"feature/add-login",
    "base":"main"
  }'

3. Check CI Status

# With gh
gh pr checks 42

# With curl (check runs)
curl -s "https://api.github.com/repos/$OWNER/$REPO/commits/$HEAD_SHA/check-runs" | python3 -c "
import sys, json
for r in json.load(sys.stdin)['check_runs']:
    print(f'{r[\"name\"]:30s} {r[\"conclusion\"] or r[\"status\"]}')
"

# With curl (statuses — legacy CI)
curl -s "https://api.github.com/repos/$OWNER/$REPO/commits/$HEAD_SHA/status" | python3 -c "
import sys, json
r = json.load(sys.stdin)
print(f'Overall: {r[\"state\"]}')
for s in r['statuses']:
    print(f'  {s[\"context\"]:30s} {s[\"state\"]}')
"

4. Update PR (push more commits)

# Make more changes
git add -A
git commit --fixup HEAD  # or regular commit
git push
# PR automatically updates

5. Review & Approve

# Request review
gh pr edit 42 --add-reviewer username

# Approve (as reviewer)
gh pr review 42 --approve --body "LGTM!"

# Request changes
gh pr review 42 --request-changes --body "See inline comments."

# Comment
gh pr review 42 --comment --body "Some suggestions."

6. Merge

# With gh
gh pr merge 42 --merge        # merge commit
gh pr merge 42 --squash       # squash merge
gh pr merge 42 --rebase       # rebase merge
gh pr merge 42 --squash --delete-branch  # squash + delete branch

# With curl
curl -s -X PUT \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls/42/merge \
  -d '{"merge_method":"squash"}'

7. Cleanup

# Delete local branch
git checkout main
git pull origin main
git branch -d feature/add-login

# Delete remote branch (if not auto-deleted)
git push origin --delete feature/add-login

Full Workflow Example

# 1. Branch
git checkout -b fix/issue-42-login-timeout

# 2. Implement + test
# ... make changes ...
pytest tests/test_auth.py -v

# 3. Commit
git add -A
git commit -m "fix: increase login timeout to 30s (fixes #42)"

# 4. Push
git push -u origin fix/issue-42-login-timeout

# 5. Create PR
gh pr create --title "fix: increase login timeout (fixes #42)" --body "..." --base main

# 6. Check CI
gh pr checks

# 7. After CI passes + review approved
gh pr merge --squash --delete-branch

# 8. Cleanup
git checkout main && git pull

Pitfalls

  • fixes #42: auto-closes issue 42 on merge. Use refs #42 to reference

without closing.

  • Squash merge: all commits become one. Branch history is lost. Best for

small PRs.

  • Merge conflicts: git fetch origin && git rebase origin/main to resolve

before pushing.

  • Draft PR: gh pr create --draft marks as WIP. Reviewers can't approve

until marked ready.

  • Force push: git push --force-with-lease (not --force) to avoid

overwriting others' work on shared branches.

  • CI not triggering: check if branch protection rules require specific

status checks. Some CI only runs on certain branch patterns.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take hezaohezao/github-pr-workflow from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.