commit-and-pr

Commit local Git changes, push a branch, and create a GitHub Pull Request.

Updated May 24, 2026
One-click install
npx skills add https://github.com/empty-can/cc-relative-info --skill commit-and-pr-empty-can
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-and-pr
Source: https://github.com/empty-can/cc-relative-info/tree/main/.claude/skills/commit-and-pr
Command: npx skills add https://github.com/empty-can/cc-relative-info --skill commit-and-pr-empty-can

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the final step of development work by turning local code changes into a clean commit, a pushed branch, and a ready Pull Request without manually piecing together the Git workflow.

Core Features & Use Cases

  • Branch Safety Checks: Detects when work is being done on main or master and redirects the flow toward creating a feature branch first.
  • Single-Commit Delivery Flow: Guides the user to bundle staged and unstaged changes into one appropriately labeled commit with a concise message.
  • Pull Request Creation: Pushes the branch and creates a GitHub Pull Request through gh, with a fallback path when gh is unavailable.
  • Use Case: After finishing a documentation fix or feature update, use this Skill to package the current workspace changes, publish the branch, and open a PR for review in one pass.

Quick Start

Use the commit-and-pr skill to review the current Git changes, create one well-named commit, push the branch, and open a Pull Request.

Frequently Asked Questions about commit-and-pr

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

FAQPage Schema
How do I commit local changes, push a branch, and open a GitHub Pull Request in one step?

To commit changes and open a pull request, this workflow inspects your Git status, validates the branch, bundles staged and unstaged changes into a single commit, pushes the branch to the remote, and creates a GitHub Pull Request.

Can I create a GitHub Pull Request if the gh command line tool is not installed?

Yes, you can create a GitHub Pull Request through the primary gh CLI path, which includes a fallback mechanism to handle environments where the gh tool is unavailable.

Does this workflow protect against accidentally committing changes directly to the main branch?

Yes, this workflow includes branch safety checks that detect when you are working on main or master and redirects the flow to create a feature branch before committing.

How does the commit message generation work for bundled staged and unstaged changes?

The commit message generation works by classifying your Git changes and guiding you to label the single commit with a concise, appropriately categorized message.

What happens if I try to commit changes to protected files in my repository?

When committing changes, the workflow applies protected-file caution to identify sensitive files and prevent accidental inclusion in your Git commit and subsequent pull request.