git-commit-pr
Commit changes and create a pull request to the official upstream repo
Security Assessment
About git-commit-pr
git-commit-pr packages a disciplined workflow for committing local changes and opening a pull request against an upstream (official) repository. It solves the problem of turning a set of working-tree edits into a clean, reviewable PR without accidentally including temporary files, debug code, or unrelated changes. The skill triggers when a user asks to submit changes and raise a PR to the original repo, and it is scoped to the Bash tool.
The workflow is a fixed, reviewable sequence: create a new branch (named by the user or derived from the change), review everything with `git status` and `git diff`, stage files individually rather than with `git add -A` or `git add .`, commit with `--signoff` and a specified author, push the branch, and create the PR with `gh pr create` against the official owner/repo. If the user has merge rights and requests it, the skill can review and merge the PR, switch back to the main branch, sync the upstream with `git fetch official` and `git reset --hard`, and delete the temporary local and remote branches. It also checks that an `official` remote exists and prompts the user to configure one if it is missing. A notable convention is that all outward-facing text — commit messages and PR titles/descriptions — must be written in English and must never reference AI, Claude, LLMs, or any auto-generation, and no AI-related trailers such as Co-Authored-By are added.
The skill targets contributors working in a fork-and-upstream model who want consistent, human-looking commits and PRs. It is most useful for open-source contribution flows where selective staging, signed-off commits, and clean upstream synchronization matter.
FAQ
When should this skill be used?
Use it when you want to commit your changes and open a pull request to the original upstream (official) repository. It assumes a fork-and-upstream contribution model.
How does it stage files?
It stages relevant files individually with `git add`, deliberately avoiding `git add -A` or `git add .`, after reviewing all changes with `git status` and `git diff` to keep temporary or unrelated files out of the commit.
What are the rules for commit messages and PR text?
All outward-facing text must be written in English and must never mention AI, Claude, LLMs, or any automatic generation. No AI-related trailers such as Co-Authored-By are added. Commits use `--signoff` and an explicit author.
Can it also merge the PR?
Yes, if the user has merge permission and asks. It reviews and merges the PR, switches back to the main branch, syncs the upstream with `git fetch official && git reset --hard`, and deletes the temporary local and remote branches.
What prerequisite does it check?
It confirms that an `official` remote exists and, if not, prompts the user to configure it before proceeding.
Install git-commit-pr
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
zc277584121/mygitplugin