pr-agent

Pushes the current branch and creates a GitHub pull request via gh CLI.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/shawn-sandy/agentics-kit --skill pr-agent-shawn-sandy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-agent
Source: https://github.com/shawn-sandy/agentics-kit/tree/main/kit/plugins/git-agent/skills/pr-agent
Command: npx skills add https://github.com/shawn-sandy/agentics-kit --skill pr-agent-shawn-sandy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually pushing branches, checking for duplicate PRs, and writing consistent pull request descriptions is repetitive and error-prone. This Skill automates the guarded, step-by-step creation of a pull request from the current branch. ## Core Features & Use Cases - Guarded PR Creation: Blocks PRs from detached HEAD, the default branch, or unauthenticated gh sessions before doing any work. - Duplicate Detection: Checks for an existing open PR and stops instead of creating a duplicate. - Auto-Generated PR Body: Builds a structured body with Summary, Changes, Test Plan, and Linked Issues sections, including issue references extracted from completed plans. - Adversarial Pre-PR Review: Spawns a code-review subagent to catch defects, secrets, and regressions before the PR is created. - Use Case: After committing feature work on a branch, ask to open a pull request and get a pushed branch plus a well-formed GitHub PR with linked issues and an honest test plan. ## Quick Start Ask the assistant to create a pull request for the current branch using the pr-agent skill.

Frequently Asked Questions about pr-agent

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 the GitHub CLI with gh pr create after pushing your branch. This Skill automates that flow: it pushes the branch, detects the base branch, and runs gh pr create with a structured title and body.

How to avoid creating duplicate pull requests for the same branch?▼

Run gh pr view to check the PR state before creating one. This Skill stops with the existing PR URL if an open PR already exists, and only proceeds when the prior PR was merged, closed, or never existed.

Does this skill commit my working tree changes before opening a PR?▼

No, it never commits uncommitted changes. You must commit your work first (for example with a commit skill); the only commit it ever makes is a single review-fix commit during the pre-PR review step.

Why does PR creation fail with a detached HEAD or on the main branch?▼

Pull requests require a named feature branch, so the Skill stops on detached HEAD state or when the current branch is main or master. Checkout a feature branch first, then retry.

Can I use this with GitLab instead of GitHub?▼

The description mentions GitLab via glab, but the implemented workflow uses the GitHub CLI (gh auth status, gh pr view, gh pr create). GitLab support is not exercised in the documented steps.