Agent skill

GitHub PR Workflow

by RedWoodOG in RedWoodOG/Hermes-Desktop

Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge.

MITAuto-check: notesDevelopment

Install GitHub PR Workflow

skills CLI
$ npx skills add RedWoodOG/Hermes-Desktop --skill github-pr-workflow -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install RedWoodOG/Hermes-Desktop github-pr-workflow --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/RedWoodOG/Hermes-Desktop.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/github/github-pr-workflow .claude/skills/github-pr-workflow && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
github-pr-workflow
GitHub stars
177
Used in
5 other repos
Token cost
~2.5k tokens
SKILL.md length
417 words
Files
5 (incl. references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge.

  • Works in 7 steps: Branch Creation → Making Commits → Pushing and Creating a PR → …
  • Tasks that involve Git workflow
  • SKILL.md covers Prerequisites, 1. Branch Creation, 2. Making Commits and 3. Pushing and Creating a PR, plus 5 more sections
  • Calls git, gh and curl; reaches api.github.com; needs GITHUB_TOKEN

What it does

GitHub PR Workflow is an agent skill from RedWoodOG/Hermes-Desktop. Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge. Works with gh CLI or falls back to git + GitHub REST API via curl.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/ci-troubleshooting.md`, `references/conventional-commits.md` and `templates/pr-body-bugfix.md`).

It sits in Development, covering Git workflow, Commit messages and REST APIs. It works with GitHub and Git. The licence is MIT.

When your agent uses it

  • Tasks that involve Git workflow
  • Tasks that involve Commit messages
  • Tasks that involve REST APIs

Example prompts

  • “/github-pr-workflow”

Requirements

  • Python 3
  • A credential in GITHUB_TOKEN

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Branch Creation
  2. Making Commits
  3. Pushing and Creating a PR
  4. Monitoring CI Status
  5. Auto-Fixing CI Failures
  6. Merging
  7. Complete Workflow Example

What it can do on your machine

Read from SKILL.md and the folder at commit be46b39. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • curl
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitHub PR Workflow loads about 2.5k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 52 tokens; SKILL.md has 417 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:32
    if [ -f ~/.hermes/.env ] && grep -q "^GITHUB_TOKEN=" ~/.hermes/.env; then
  • NoteMentions a .env fileSKILL.md:33
    _TOKEN=$(grep "^GITHUB_TOKEN=" ~/.hermes/.env | head -1 | cut -d= -f2 | tr -d '\n\r')

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from RedWoodOG/Hermes-Desktop at commit be46b39, republished under its MIT licence (© RedWoodOG). 417 words, ~2,515 tokens.

Download SKILL.mdSave it as .claude/skills/github-pr-workflow/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
github-pr-workflow
description
Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge. Works with gh CLI or falls back to git + GitHub REST API via curl.
version
1.1.0
author
Hermes Agent
license
MIT

GitHub Pull Request Workflow

Complete guide for managing the PR lifecycle. Each section shows the gh way first, then the git + curl fallback for machines without gh.

Prerequisites

  • Authenticated with GitHub (see github-auth skill)
  • Inside a git repository with a GitHub remote
Quick Auth Detection
bash
# Determine which method to use throughout this workflow
if command -v gh &>/dev/null && gh auth status &>/dev/null; then
  AUTH="gh"
else
  AUTH="git"
  # Ensure we have a token for API calls
  if [ -z "$GITHUB_TOKEN" ]; then
    if [ -f ~/.hermes/.env ] && grep -q "^GITHUB_TOKEN=" ~/.hermes/.env; then
      GITHUB_TOKEN=$(grep "^GITHUB_TOKEN=" ~/.hermes/.env | head -1 | cut -d= -f2 | tr -d '\n\r')
    elif grep -q "github.com" ~/.git-credentials 2>/dev/null; then
      GITHUB_TOKEN=$(grep "github.com" ~/.git-credentials 2>/dev/null | head -1 | sed 's|https://[^:]*:\([^@]*\)@.*|\1|')
    fi
  fi
fi
echo "Using: $AUTH"
Extracting Owner/Repo from the Git Remote

Many curl commands need owner/repo. Extract it from the git remote:

bash
# Works for both HTTPS and SSH remote URLs
REMOTE_URL=$(git remote get-url origin)
OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's|.*github\.com[:/]||; s|\.git$||')
OWNER=$(echo "$OWNER_REPO" | cut -d/ -f1)
REPO=$(echo "$OWNER_REPO" | cut -d/ -f2)
echo "Owner: $OWNER, Repo: $REPO"

1. Branch Creation

This part is pure git — identical either way:

bash
# Make sure you're up to date
git fetch origin
git checkout main && git pull origin main

# Create and switch to a new branch
git checkout -b feat/add-user-authentication

Branch naming conventions:

  • feat/description — new features
  • fix/description — bug fixes
  • refactor/description — code restructuring
  • docs/description — documentation
  • ci/description — CI/CD changes

2. Making Commits

Use the agent's file tools (write_file, patch) to make changes, then commit:

bash
# Stage specific files
git add src/auth.py src/models/user.py tests/test_auth.py

# Commit with a conventional commit message
git commit -m "feat: add JWT-based user authentication

- Add login/register endpoints
- Add User model with password hashing
- Add auth middleware for protected routes
- Add unit tests for auth flow"

Commit message format (Conventional Commits):

type(scope): short description

Longer explanation if needed. Wrap at 72 characters.

Types: feat, fix, refactor, docs, test, ci, chore, perf

3. Pushing and Creating a PR

Push the Branch (same either way)
bash
git push -u origin HEAD
Create the PR

With gh:

bash
gh pr create \
  --title "feat: add JWT-based user authentication" \
  --body "## Summary
- Adds login and register API endpoints
- JWT token generation and validation

## Test Plan
- [ ] Unit tests pass

Closes #42"

Options: --draft, --reviewer user1,user2, --label "enhancement", --base develop

With git + curl:

bash
BRANCH=$(git branch --show-current)

curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/$OWNER/$REPO/pulls \
  -d "{
    \"title\": \"feat: add JWT-based user authentication\",
    \"body\": \"## Summary\nAdds login and register API endpoints.\n\nCloses #42\",
    \"head\": \"$BRANCH\",
    \"base\": \"main\"
  }"

The response JSON includes the PR number — save it for later commands.

To create as a draft, add "draft": true to the JSON body.

4. Monitoring CI Status

Check CI Status

With gh:

bash
# One-shot check
gh pr checks

# Watch until all checks finish (polls every 10s)
gh pr checks --watch

With git + curl:

bash
# Get the latest commit SHA on the current branch
SHA=$(git rev-parse HEAD)

# Query the combined status
curl -s \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/commits/$SHA/status \
  | python3 -c "
import sys, json
data = json.load(sys.stdin)
print(f\"Overall: {data['state']}\")
for s in data.get('statuses', []):
    print(f\"  {s['context']}: {s['state']} - {s.get('description', '')}\")"

# Also check GitHub Actions check runs (separate endpoint)
curl -s \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/commits/$SHA/check-runs \
  | python3 -c "
import sys, json
data = json.load(sys.stdin)
for cr in data.get('check_runs', []):
    print(f\"  {cr['name']}: {cr['status']} / {cr['conclusion'] or 'pending'}\")"
Poll Until Complete (git + curl)
bash
# Simple polling loop — check every 30 seconds, up to 10 minutes
SHA=$(git rev-parse HEAD)
for i in $(seq 1 20); do
  STATUS=$(curl -s \
    -H "Authorization: token $GITHUB_TOKEN" \
    https://api.github.com/repos/$OWNER/$REPO/commits/$SHA/status \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['state'])")
  echo "Check $i: $STATUS"
  if [ "$STATUS" = "success" ] || [ "$STATUS" = "failure" ] || [ "$STATUS" = "error" ]; then
    break
  fi
  sleep 30
done

5. Auto-Fixing CI Failures

When CI fails, diagnose and fix. This loop works with either auth method.

Step 1: Get Failure Details

With gh:

bash
# List recent workflow runs on this branch
gh run list --branch $(git branch --show-current) --limit 5

# View failed logs
gh run view <RUN_ID> --log-failed

With git + curl:

bash
BRANCH=$(git branch --show-current)

# List workflow runs on this branch
curl -s \
  -H "Authorization: token $GITHUB_TOKEN" \
  "https://api.github.com/repos/$OWNER/$REPO/actions/runs?branch=$BRANCH&per_page=5" \
  | python3 -c "
import sys, json
runs = json.load(sys.stdin)['workflow_runs']
for r in runs:
    print(f\"Run {r['id']}: {r['name']} - {r['conclusion'] or r['status']}\")"

# Get failed job logs (download as zip, extract, read)
RUN_ID=<run_id>
curl -s -L \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/logs \
  -o /tmp/ci-logs.zip
cd /tmp && unzip -o ci-logs.zip -d ci-logs && cat ci-logs/*.txt
Step 2: Fix and Push

After identifying the issue, use file tools (patch, write_file) to fix it:

bash
git add <fixed_files>
git commit -m "fix: resolve CI failure in <check_name>"
git push
Step 3: Verify

Re-check CI status using the commands from Section 4 above.

Show full SKILL.md (172 more words)Show less
Auto-Fix Loop Pattern

When asked to auto-fix CI, follow this loop:

  1. Check CI status → identify failures
  2. Read failure logs → understand the error
  3. Use read_file + patch/write_file → fix the code
  4. git add . && git commit -m "fix: ..." && git push
  5. Wait for CI → re-check status
  6. Repeat if still failing (up to 3 attempts, then ask the user)

6. Merging

With gh:

bash
# Squash merge + delete branch (cleanest for feature branches)
gh pr merge --squash --delete-branch

# Enable auto-merge (merges when all checks pass)
gh pr merge --auto --squash --delete-branch

With git + curl:

bash
PR_NUMBER=<number>

# Merge the PR via API (squash)
curl -s -X PUT \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls/$PR_NUMBER/merge \
  -d "{
    \"merge_method\": \"squash\",
    \"commit_title\": \"feat: add user authentication (#$PR_NUMBER)\"
  }"

# Delete the remote branch after merge
BRANCH=$(git branch --show-current)
git push origin --delete $BRANCH

# Switch back to main locally
git checkout main && git pull origin main
git branch -d $BRANCH

Merge methods: "merge" (merge commit), "squash", "rebase"

Enable Auto-Merge (curl)
bash
# Auto-merge requires the repo to have it enabled in settings.
# This uses the GraphQL API since REST doesn't support auto-merge.
PR_NODE_ID=$(curl -s \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls/$PR_NUMBER \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['node_id'])")

curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/graphql \
  -d "{\"query\": \"mutation { enablePullRequestAutoMerge(input: {pullRequestId: \\\"$PR_NODE_ID\\\", mergeMethod: SQUASH}) { clientMutationId } }\"}"

7. Complete Workflow Example

bash
# 1. Start from clean main
git checkout main && git pull origin main

# 2. Branch
git checkout -b fix/login-redirect-bug

# 3. (Agent makes code changes with file tools)

# 4. Commit
git add src/auth/login.py tests/test_login.py
git commit -m "fix: correct redirect URL after login

Preserves the ?next= parameter instead of always redirecting to /dashboard."

# 5. Push
git push -u origin HEAD

# 6. Create PR (picks gh or curl based on what's available)
# ... (see Section 3)

# 7. Monitor CI (see Section 4)

# 8. Merge when green (see Section 6)

Useful PR Commands Reference

Actionghgit + curl
List my PRsgh pr list --author @mecurl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$OWNER/$REPO/pulls?state=open"
View PR diffgh pr diffgit diff main...HEAD (local) or curl -H "Accept: application/vnd.github.diff" ...
Add commentgh pr comment N --body "..."curl -X POST .../issues/N/comments -d '{"body":"..."}'
Request reviewgh pr edit N --add-reviewer usercurl -X POST .../pulls/N/requested_reviewers -d '{"reviewers":["user"]}'
Close PRgh pr close Ncurl -X PATCH .../pulls/N -d '{"state":"closed"}'
Check out someone's PRgh pr checkout Ngit fetch origin pull/N/head:pr-N && git checkout pr-N

© RedWoodOG, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/github/github-pr-workflow of RedWoodOG/Hermes-Desktop.

  • SKILL.md
  • references/ci-troubleshooting.md
  • references/conventional-commits.md
  • templates/pr-body-bugfix.md
  • templates/pr-body-feature.md

Open the folder on GitHubat commit be46b39

Used in 5 other repositories

We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 5 other GitHub owners. This page covers the copy in RedWoodOG/Hermes-Desktop, which our catalogue first saw on October 7, 2026.

Compare with similar skills

GitHub PR Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitHub PR Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub PR Workflow this skillRedWoodOG/Hermes-Desktop1775 repos~2.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Draft Pull Request Creatorwordpress-mobile/WordPress-Android3.2k—~881Automated safety check: NotesGPL-2.0
Publish Pull Request for taskctltaskctl/taskctl434—~979Automated safety check: PassGPL-3.0
Git GitHub Opsc5inco/compose-pokedexer143—~1.3kAutomated safety check: PassMIT
Pull Request Creationlobehub/lobehub83k—~3.2kAutomated safety check: PassCustom licence

Similar skills

  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated today
    DevelopmentAuto-check: notes
  • Publishes the current branch and opens or updates a GitHub pull request for the taskctl repo, after a pre-publish gate and with a description template matched to the change.

    434 GitHub stars~979 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Git GitHub Ops

    c5inco/compose-pokedexer

    Handles Pokedexer Git and GitHub workflows: inspect changes, prepare commit messages, manage branches and pushes, and create or update issues and pull requests with safe file-based inputs.

    143 GitHub stars~1.3k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Pull Request Creation

    lobehub/lobehub

    Creates a pull request for the current branch against canary, or splits a cross-layer branch into ordered stacked PRs so backend changes merge before their callers.

    83k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed
  • PR Workflow

    usenotra/notra

    Git workflow for pushing code and opening pull requests on GitHub.

    255 GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from RedWoodOG/Hermes-Desktop

All 62 skills in this repo
  • Obliteratus

    RedWoodOG/Hermes-Desktop

    Remove refusal behaviors from open-weight LLMs using OBLITERATUS — mechanistic interpretability techniques (diff-in-means, SVD, whitened SVD, LEACE, SAE decomposition, etc.) to excise guardrails…

    177 GitHub starsUsed in 6 repos~3.8k tokens
    Auto-check passed
  • Excalidraw

    RedWoodOG/Hermes-Desktop

    Create hand-drawn style diagrams using Excalidraw JSON format.

    177 GitHub starsUsed in 5 repos~1.8k tokens
    Auto-check passed
  • Ascii Video

    RedWoodOG/Hermes-Desktop

    Production pipeline for ASCII art video — any format. An agent skill from RedWoodOG/Hermes-Desktop.

    177 GitHub starsUsed in 2 repos~3.2k tokens
    Auto-check passed
  • Systematic Debugging

    RedWoodOG/Hermes-Desktop

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior.

    177 GitHub starsUsed in 6 repos~2.6k tokens
    Auto-check passed
  • Test Driven Development

    RedWoodOG/Hermes-Desktop

    A skill your agent uses when implementing any feature or bugfix, before writing implementation code.

    177 GitHub starsUsed in 6 repos~2.4k tokens
    Auto-check passed
  • Claude Code

    RedWoodOG/Hermes-Desktop

    Delegate coding tasks to Claude Code (Anthropic's CLI agent).

    177 GitHub starsUsed in 4 repos~784 tokens
    Auto-check passed

Works with

Categories

Questions about GitHub PR Workflow

What does GitHub PR Workflow do?

Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge. GitHub PR Workflow is an agent skill from RedWoodOG/Hermes-Desktop. Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge.

When should I use GitHub PR Workflow?

GitHub PR Workflow fits situations like: tasks that involve Git workflow; tasks that involve Commit messages; tasks that involve REST APIs.

How do I install GitHub PR Workflow in Claude Code?

Run `npx skills add RedWoodOG/Hermes-Desktop --skill github-pr-workflow -a claude-code`. Or copy the skill folder (skills/github/github-pr-workflow in RedWoodOG/Hermes-Desktop) into .claude/skills/github-pr-workflow in your project. Claude Code loads it when a task matches its description.

How do I install GitHub PR Workflow in Codex?

Run `npx skills add RedWoodOG/Hermes-Desktop --skill github-pr-workflow -a codex`. Or copy the skill folder (skills/github/github-pr-workflow in RedWoodOG/Hermes-Desktop) into .agents/skills/github-pr-workflow in your project. Codex loads it when a task matches its description.

Can I use GitHub PR Workflow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add RedWoodOG/Hermes-Desktop --skill github-pr-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github-pr-workflow, .gemini/skills/github-pr-workflow, .github/skills/github-pr-workflow and .opencode/skills/github-pr-workflow in your project.

What does GitHub PR Workflow need to run?

Going by SKILL.md and its folder, GitHub PR Workflow needs the command-line tools its instructions call (git, gh, curl and python3) and credentials named GITHUB_TOKEN. Our summary lists: Python 3; A credential in GITHUB_TOKEN.

Does GitHub PR Workflow access the network?

SKILL.md names 1 domain. In commands or code: api.github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is GitHub PR Workflow safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does GitHub PR Workflow use?

GitHub PR Workflow is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitHub PR Workflow use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.

What are the alternatives to GitHub PR Workflow?

Skills that share tags, products or a category with GitHub PR Workflow: React Router Pull Request Creator (remix-run/react-router, 57k stars), Draft Pull Request Creator (wordpress-mobile/WordPress-Android, 3.2k stars), Publish Pull Request for taskctl (taskctl/taskctl, 434 stars) and Git GitHub Ops (c5inco/compose-pokedexer, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub PR Workflow?

RedWoodOG (a GitHub user) maintains it in RedWoodOG/Hermes-Desktop, which has 177 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on May 30, 2026.

Source: RedWoodOG/Hermes-Desktop on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.