Skip to content
cccskills
FreePublished on GitHub

pr

Commit and push local changes, then create a pull request or update an existing one based on the branch state. The skill prepares commit messages and new pull request details from the changes being submitted.

OriginalShow the original description

Commit and push changes, then create a new PR or append to an existing one.

Works withGitHub
See how to install

Good for

  • Creating a pull request from local changes
  • Adding changes to an existing pull request
  • Choosing staged changes or all changes for a commit
  • Preparing a title and description for the full branch diff

Files included (1)

  • SKILL.md3.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

PR — Commit & Push

Commits local changes, pushes to remote, and creates a new PR or appends to an existing one — automatically detected based on branch state.

Instructions

  • NEVER force push.
  • NEVER push directly to main/master — always go through PR workflow.
  • All user-facing text must use the language the user has been using in the conversation. Do not default to English.
  • When presenting choices, use interactive dialogs with selectable options rather than plain text.

Step 1: Pre-flight

  1. git branch --show-current — current branch name. If empty (detached HEAD), ask the user to switch to a branch first and stop.
  2. gh pr list --head {branch} --state open --json number,url — open PRs

Determine the remote's default branch and store as {default_branch}.

Mode selection:

Current branchOpen PR on this branchMode
{default_branch}N/A (new branch)Create
otheryesAppend
othernoCreate

Step 2: Stage & Generate Commit Message

Run git status --porcelain and inspect the output:

  • No output → no local changes. Skip to Step 3 (there may be unpushed commits to push).
  • Both staged and unstaged changes → ask the user: commit only the staged files (partial), or stage everything (full)?
  • Otherwise → full (stage everything).

If full: run git add -A. If partial: skip (files are already staged).

Read the staged diff (git diff --cached) and generate a commit message following the project's commit conventions. If no convention is found, default to a concise English message under 120 characters ending with a period, with no other punctuation, focusing on user-perceivable changes.


Step 3: Commit & Push

Append mode

If there is staged content, commit first. Then push and output the existing PR URL.

If there is nothing to commit and nothing to push, inform the user and stop.

Create mode

Generate PR metadata

Based on all changes since {default_branch} (staged diff and existing commits), generate:

  • Branch name (only when on {default_branch}): follow the project's branch naming convention if one exists; otherwise use feature/{username}_topic or bugfix/{username}_topic ({username} = local git username, lowercase; obtain via git config user.name). When on a non-default branch, use the current branch name.
  • PR title: concise summary following project conventions, or a short English sentence if none found. Always based on all changes since {default_branch}, not the latest commit message.
  • PR description: plain text (no Markdown formatting) in the user's conversation language, briefly describing what changed and why.

Create branch, commit, and push

If on {default_branch}, create a new branch: git checkout -b {branch_name}.

If there is staged content, commit.

Push and create the PR:

git push -u origin {branch_name}
gh pr create --title "{title}" --body "$(cat <<'EOF'
{description}
EOF
)"

Output the PR URL to the user.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

accept-baseline

FreeSummary

Accept screenshot baseline changes by running the project's dedicated script, then commit the updated version.json using the project's commit conventions. This provides an explicit command for recording changes to the screenshot comparison baseline.

  • Accepting changes to a screenshot comparison baseline
  • Committing the updated baseline version.json
  • Running the baseline acceptance procedure with an explicit command
Tencent/libpag5.8KUpdated Oct 19, 2026

commit

FreeSummary

Commit local changes to the current Git branch with a message based on the project's conventions. When staged and unstaged changes coexist, choose which to include. The skill does not push changes or create pull requests.

  • Saving local work as a commit
  • Committing only changes already staged
  • Staging and committing all local changes
Tencent/libpag5.8KUpdated Oct 19, 2026

cr

FreeSummary

Review local branches, pull requests, commits, or files and address issues. The skill selects a single-agent or multi-agent workflow based on the environment, with automatic fixes for lower-risk issues and confirmation for high-risk changes.

  • Reviewing changes on a local branch
  • Starting a pull request review from its number or URL
  • Checking a specific commit or file
Tencent/libpag5.8KUpdated Oct 19, 2026

pagx

FreeSummary

Create PAGX vector graphics files from a visual description, HTML file, or public URL, including supported animations. Edit existing designs, check their appearance, and export them to SVG, HTML, or PPTX.

  • Creating a poster or product card from a written description
  • Converting an HTML file or public URL to PAGX
  • Making an animated banner or loading animation
Tencent/libpag5.8KUpdated Oct 19, 2026

squash

FreeSummary

Review a branch's commits, combine adjacent changes that belong together, and improve commit messages. A rebuilt history is prepared separately and replaces the original branch only after the user reviews and confirms the proposed changes.

  • Combining unpushed commits on the current branch
  • Cleaning up a named branch without checking it out
  • Improving unclear commit messages
Tencent/libpag5.8KUpdated Oct 19, 2026

See all skills by Tencent

Report a problem with this skill