commit-push-pr

Commit current changes, push to remote, and create or update a pull request. Use when the user wants to commit and create a PR, push changes and open a pull request, or ship their current work as a PR.

971 stars

Best use case

commit-push-pr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Commit current changes, push to remote, and create or update a pull request. Use when the user wants to commit and create a PR, push changes and open a pull request, or ship their current work as a PR.

Teams using commit-push-pr should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/commit-push-pr/SKILL.md --create-dirs "https://raw.githubusercontent.com/dyoshikawa/rulesync/main/.rulesync/skills/commit-push-pr/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/commit-push-pr/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How commit-push-pr Compares

Feature / Agentcommit-push-prStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Commit current changes, push to remote, and create or update a pull request. Use when the user wants to commit and create a PR, push changes and open a pull request, or ship their current work as a PR.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Commit, Push, and PR Management

## Step 1: Check Current Branch

Run `git branch --show-current` to get the current branch name.

If the current branch is `main` or `master`:

1. Generate a descriptive branch name based on the staged/unstaged changes
2. Create and switch to the new branch: `git checkout -b <new-branch-name>`

## Step 2: Stage and Commit Changes

1. Run `git status` to check for changes
2. If there are unstaged changes, stage them: `git add .`
3. Analyze the changes and create a meaningful commit message
4. Commit with: `git commit -m "<commit-message>"`

## Step 3: Push to Remote

Push the branch to remote with upstream tracking:

```bash
git push -u origin <branch-name>
```

## Step 4: Handle Pull Request

Check if a PR already exists for this branch:

```bash
gh pr view --json number,title,body 2>/dev/null
```

### If PR does NOT exist:

Create a new PR:

```bash
gh pr create --title "<title>" --body "<description>"
```

The PR description should include:

- Summary of changes
- Test plan (if applicable)

### If PR already exists:

1. Compare the current PR title and description with the actual changes
2. If updates are needed (e.g., scope of changes has expanded), update the PR using GitHub API:

```bash
gh api repos/<owner>/<repo>/pulls/<pr-number> -X PATCH -f title="<new-title>" -f body="<new-description>"
```

Note: Use `gh api` instead of `gh pr edit` to avoid GraphQL deprecation warnings. 3. If no updates are needed, skip this step

## Step 5: Report Result

Output the PR URL and a summary of actions taken.

Related Skills

rulesync

986
from dyoshikawa/rulesync

Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations.

skill-creator

986
from dyoshikawa/rulesync

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

security-scan-diff

986
from dyoshikawa/rulesync

Scan for malicious code in git diff between a tag/commit and HEAD

release-dry-run

986
from dyoshikawa/rulesync

Dry run for release: summarize changes since last release and suggest version bump.

playwright-cli

986
from dyoshikawa/rulesync

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

git-worktree-runner

986
from dyoshikawa/rulesync

Manages git worktrees using git-worktree-runner (gtr). Use when the user needs to create, list, remove, or navigate worktrees with `git gtr` commands, open editors or AI tools in worktrees, manage parallel development branches, or check out GitHub PRs (including from forks) into worktrees.

draft-release

986
from dyoshikawa/rulesync

Draft a new release of the project.

create-scrap-issue

986
from dyoshikawa/rulesync

Create a GitHub issue that consolidates passed content into a single scrap issue with background context and solution details, labeled as maintainer-scrap. Use when the user wants to create a scrap issue, jot down notes as a GitHub issue, or save findings for later.

create-issue

986
from dyoshikawa/rulesync

Create a GitHub issue with detailed description, purpose, and appropriate labels

review-pr

971
from dyoshikawa/rulesync

Review a pull request for code quality and security issues. Use when the user wants to review a PR, check PR code changes, or audit a pull request. Triggers on: "review PR", "review pull request", "check this PR", "/review-pr".

review-and-comments

971
from dyoshikawa/rulesync

Review a PR for code quality and security issues, then post review comments on it. Runs review-pr followed by post-review-comments sequentially.

rebase-latest-main

971
from dyoshikawa/rulesync

Fetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their branch with latest main, or sync with upstream.