/git:prfrom git
Commit, push, and open a pull request without ever switching the working tree's branch. Use when the user asks to open a PR, ship changes as a pull request, or says things like "open a PR", "commit and open a PR", "提交并开 PR". On the default branch it publishes the commit as a new remote branch instead of checking one out.
Ships in git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The full ship-it flow: commit, push, open a pull request. Invoking this command is the explicit request to push and open a PR.
The commit never reaches the remote default branch, and the working tree's branch never changes — no git switch, no git checkout, no git worktree add. Commit on whatever branch is already checked out; publishing is what keeps the default branch clean.
This flow mirrors the host's standard commit workflow, spelled out so it holds identically on every host.
git status, git diff, and git log in parallel: what changed, what is untracked, and the repository's existing commit message style.git add -A or git add ...env files, private keys, credential files, tokens. If any are staged, stop and report instead of committing. Never create an empty commit.git log. Write the message in another language only when the user explicitly asks for it in this session.--no-verify or --no-gpg-sign; never touch git config.git push --force, never amend pushed commits, and never use git reset --hard to discard work.The pull request title and body follow the same language rule as the commit message: English by default, another language only on an explicit request from the user in this session.
On a non-default branch:
git push -u origin HEAD to set the upstream.gh pr create, using a HEREDOC body containing a ## Summary bullet list explaining why the change was made and a ## Test plan checklist.On the default branch (main/master) the commit is now sitting on the local default branch, so publish it under another name instead:
git branch <name>, with a descriptive kebab-case name drawn from the change. This only creates a ref — do not check it out.git push origin <name>. Never -u here: it would repoint the default branch's upstream at <name>.gh pr create --head <name> --base <default>, with the same HEREDOC body. --head is mandatory — gh otherwise infers the head from the checked-out branch, which is the default branch.git status --porcelain is now empty, run git reset --hard origin/<default> so the local default branch matches its remote again. The commit is already safe on <name> and on the remote, so nothing is lost. If anything is still pending, skip the reset and report that the local default branch is one commit ahead.Never git push --force.
The PR URL, the commit message, the branch name, and — when the flow started on the default branch — whether the local default branch was reset or left one commit ahead.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mywsq/plugins --plugin git4 skills in this plugin
/cleanDelete local branches whose upstream is gone, along with their linked worktrees. Use when the user asks to clean up stale or gone branches (e.g. "clean up old branches", "清理分支", "clean gone"). Deletes only branches whose remote tracking branch is marked [gone]./commitCommit and push with a fixed safety floor — stage by name, refuse staged secrets, match the repository's message style. Use when the user asks to commit, save, or push code (e.g. "commit this", "提交代码", "push my changes")./pushCommit and push the current branch to its upstream, without opening a PR or changing branches. Use when the user asks to commit and push in one step, or says things like "commit and push", "提交并推送", "push this up". Pushes the branch that is already checked out, including the default branch.