github-pr-workflow

Automates the GitHub pull request lifecycle from branch creation through CI monitoring and merge.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill github-pr-workflow-jamsdoescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-workflow
Source: https://github.com/jamsdoescode/Erik-s-Portfolio/tree/main/openclicky/AppResources/OpenClicky/OpenClickyBundledSkills/github-pr-workflow
Command: npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill github-pr-workflow-jamsdoescode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing pull requests involves repetitive manual steps across branching, committing, PR creation, CI monitoring, failure diagnosis, and merging, often requiring different tooling depending on whether the GitHub CLI is installed. ## Core Features & Use Cases - Dual-Mode Operation: Every workflow step provides both the gh CLI command and a git + curl REST/GraphQL API fallback for machines without the CLI. - CI Monitoring and Auto-Fix: Polls commit statuses and check runs, downloads failed workflow logs, and follows a structured fix-commit-push-verify loop. - Merge Automation: Supports squash, merge, and rebase methods plus auto-merge enablement via the GitHub GraphQL API. - Use Case: A developer asks the agent to ship a bug fix; the skill creates a fix/ branch, commits with conventional messages, opens a PR, watches CI, fixes a failing test, and squash-merges once green. ## Quick Start Create a pull request for my current changes, monitor the CI checks, fix any failures, and merge it when everything passes.

Frequently Asked Questions about github-pr-workflow

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

FAQPage Schema
How do I create a GitHub pull request from the command line?

Use `gh pr create` with a title and body if the GitHub CLI is installed. Without it, push your branch with git and send a POST request to the GitHub REST API pulls endpoint using a token, specifying head, base, title, and body.

How to monitor GitHub CI checks for a pull request?

Run `gh pr checks --watch` to poll until checks finish. Alternatively, query the commit status and check-runs REST API endpoints with curl and loop every 30 seconds until the state becomes success, failure, or error.

Can I create a GitHub PR without the gh CLI installed?

Yes, the workflow supports a full git plus curl fallback. Extract the owner and repo from the git remote URL, then call the GitHub REST API with a GITHUB_TOKEN for PR creation, CI checks, log downloads, and merging.

How do I automatically fix failing CI checks on a PR?

Download the failed workflow run logs via `gh run view --log-failed` or the actions logs API, identify the error, patch the code, commit and push the fix, then re-check CI status. Repeat up to three attempts before asking the user.

How do I enable auto-merge on a GitHub pull request?

With gh, run `gh pr merge --auto --squash`. Via API, auto-merge requires the GraphQL endpoint: fetch the PR node_id from the REST API, then call the enablePullRequestAutoMerge mutation with your chosen merge method.