github-pr-workflow

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/swcstudiospace/aimeecodes --skill github-pr-workflow-swcstudiospace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-pr-workflow
Source: https://github.com/swcstudiospace/aimeecodes/tree/main/.aimee/skills/github-pr-workflow
Command: npx skills add https://github.com/swcstudiospace/aimeecodes --skill github-pr-workflow-swcstudiospace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing pull requests involves repetitive manual steps: creating branches, writing conventional commits, opening PRs, watching CI, diagnosing failures, and merging. This Skill guides an AI agent through the entire GitHub PR lifecycle with ready-to-run commands, working both with the gh CLI and with plain git plus curl against the GitHub REST and GraphQL APIs. ## Core Features & Use Cases - Full PR Lifecycle Coverage: Branch naming conventions, Conventional Commits, PR creation (including drafts, reviewers, and labels), CI status polling, and squash/rebase/merge with branch cleanup. - Dual Auth Modes: Detects whether gh is authenticated and falls back to git + curl with a GITHUB_TOKEN, including extracting owner/repo from the git remote and enabling auto-merge via GraphQL. - CI Auto-Fix Loop: A structured diagnose-fix-push-verify loop (up to 3 attempts) backed by a troubleshooting reference covering test, lint, type, build, permission, timeout, and Docker failures. - Use Case: Ask the agent to implement a fix on a new branch, open a PR that closes an issue, watch the checks, automatically diagnose and fix a failing lint job, then squash-merge and delete the branch. ## Quick Start Ask the agent to create a branch, commit your current changes with a conventional commit message, open a pull request, monitor CI, and merge it when the 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?▼

Use `gh pr create` with a title, body, and optional flags like `--draft`, `--reviewer`, and `--label`. Without the gh CLI, send a POST request with curl to the GitHub API pulls endpoint using a GITHUB_TOKEN, specifying head branch, base branch, title, and body.

How to check GitHub Actions CI status for a pull request?▼

Run `gh pr checks` for a one-shot view or `gh pr checks --watch` to poll until completion. With curl, query the commit status endpoint and the check-runs endpoint for the branch HEAD SHA, optionally looping every 30 seconds until the state is success or failure.

Can I use the GitHub API without installing the gh CLI?▼

Yes, every operation has a git plus curl fallback using a GITHUB_TOKEN against the REST API. Auto-merge is the exception: it requires the GraphQL API with the pull request node ID, since the REST API does not support enabling auto-merge.

How do I fix failing CI checks on a pull request automatically?▼

Follow the auto-fix loop: fetch failed run logs with `gh run view --log-failed` or by downloading the logs zip via the API, diagnose the failure pattern (test, lint, type, build, permission, timeout, or Docker), patch the code, commit, push, and re-check status, repeating up to three attempts.

What merge methods does the GitHub API support for pull requests?▼

The merge endpoint supports three methods: merge commit, squash, and rebase, set via the merge_method field. Squash merging with branch deletion is recommended for feature branches, and auto-merge can be enabled through GraphQL when the repository allows it.