github-pr-workflow

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

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/luckybbjason1/trading --skill github-pr-workflow-luckybbjason1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-workflow
Source: https://github.com/luckybbjason1/trading/tree/main/.hermes/skills/github/github-pr-workflow
Command: npx skills add https://github.com/luckybbjason1/trading --skill github-pr-workflow-luckybbjason1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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 - Full PR Lifecycle Automation: Create branches with conventional naming, write Conventional Commits messages, push, and open PRs using either the gh CLI or git plus curl against the GitHub REST API. - CI Monitoring and Auto-Fix Loop: Poll commit statuses and check runs, download failed workflow logs, diagnose failures using a troubleshooting reference, patch code, and re-push until checks pass. - Merge Management: Squash, rebase, or merge-commit PRs, enable auto-merge via the GraphQL API, and clean up local and remote branches after merging. - Use Case: After fixing a login bug, an agent creates a fix/login-redirect-bug branch, commits with a conventional message, opens a PR that closes the linked issue, watches CI, auto-fixes a failing lint check, and squash-merges once green. ## Quick Start Ask the agent to create a branch, commit your current changes, open a pull request, monitor CI, and merge it when all checks pass.

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?

Push your branch with git push -u origin HEAD, then run gh pr create with a title and body. Without the gh CLI, send a POST request with curl to the GitHub API pulls endpoint including the head branch, base branch, title, and body.

How to monitor GitHub CI checks for a pull request?

Run gh pr checks --watch to poll until all checks finish. Alternatively, query the commit status endpoint and check-runs endpoint with curl using the HEAD commit SHA, polling every 30 seconds until the state is success, failure, or error.

Can I use GitHub API without the gh CLI installed?

Yes, every operation has a git plus curl fallback using the GitHub REST API with a GITHUB_TOKEN. The token is read from the environment, the Hermes .env file, or git-credentials, and owner/repo is extracted from the git remote URL.

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

Download the failed run logs with gh run view --log-failed or the logs API endpoint, diagnose the failure pattern such as test, lint, type, or build errors, patch the code, commit and push, then re-check status. The loop repeats 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 --delete-branch. With curl, auto-merge requires the GraphQL API: fetch the PR node_id from the REST API, then call the enablePullRequestAutoMerge mutation with the desired merge method.

Why does GitHub CI fail with permission or 403 errors?

Permission failures occur when the workflow token lacks required scopes or secrets are missing. Add a permissions block to the workflow YAML, verify secrets exist with gh secret list, and note that fork PRs cannot access some secrets by design.