github-pr-workflow

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

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill github-pr-workflow-avatar-arts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-workflow
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/github/github-pr-workflow
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill github-pr-workflow-avatar-arts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing pull requests involves many repetitive steps—branching, committing, opening PRs, watching CI, fixing failures, and merging—and doing them manually or inconsistently slows down development and introduces errors. ## Core Features & Use Cases - Full PR Lifecycle Automation: Covers branch creation, conventional commits, PR creation, CI status monitoring, and merging with both gh CLI and git + curl fallbacks for machines without the GitHub CLI. - CI Failure Diagnosis and Auto-Fix Loop: Provides a structured loop to read failure logs, patch code, push fixes, and re-check status, plus a troubleshooting reference for common failure patterns like test, lint, type, build, and permission errors. - Ready-Made Templates and References: Includes PR body templates for features and bugfixes plus a Conventional Commits cheat sheet for consistent commit messages. - Use Case: You fixed a login redirect bug on a branch. Use this Skill to commit with a conventional message, push, open a PR via the GitHub API, poll CI until green, and squash-merge with branch cleanup. ## Quick Start Create a pull request for my current branch, monitor its CI checks, and merge it with squash once 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?

Use `gh pr create` with a title and body if the GitHub CLI is installed, or send a POST request to the GitHub REST API pulls endpoint with your token, head branch, and base branch. The API response returns the PR number for later commands.

How to monitor GitHub CI checks for a pull request?

Run `gh pr checks --watch` to poll until checks finish, or query the commit status and check-runs API endpoints with curl using the branch's HEAD SHA. A polling loop every 30 seconds works when gh is unavailable.

Can I use GitHub PR workflows 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 can be read from a .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 pull request?

Download the failed run logs via `gh run view --log-failed` or the API logs endpoint, identify the failure pattern (test, lint, type, build, or permission), patch the code, commit, push, and re-check 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`. With curl, auto-merge requires the GraphQL API: fetch the PR's node_id, then call the enablePullRequestAutoMerge mutation with a merge method like SQUASH. The repository must have auto-merge enabled in settings.