commit-push-pr skill
Automates the complete Git workflow including branch creation, committing changes, pushing to origin, and managing pull requests.
- GitHub stars
- 75
- Files
- 1
- Last commit
- Sep 14, 2026
- License
- MIT
- Allowed tools
- 10
What does the commit-push-pr skill do?
commit-push-pr automates the complete Git workflow including branch creation, committing changes, pushing to origin, and managing pull requests.
Summary generated from the skill's SKILL.md.
About the commit-push-pr skill
Automating the entire Git lifecycle from local changes to pull requests is what this skill enables for developers. It manages the transition from a main branch to a feature branch, handles staging and committing, pushes code to the origin, and uses the GitHub CLI to manage pull requests. An agent should load this skill when a user wants to finalize code changes and move them into a formal review process.
The workflow relies on standard Git commands and the GitHub CLI, specifically using tools like git checkout, git commit, git push, and gh pr commands. It includes a safety protocol to prevent destructive actions like force pushing to main or skipping git hooks. The skill also ensures that pull requests include a structured summary and a test plan checklist. It distinguishes itself by analyzing the full diff between the current branch and the main branch to generate meaningful commit messages and PR descriptions.
What an agent can do with it
- 1Finalize a new featureCreate a new branch, commit changes, and open a pull request with a summary and test plan.
- 2Update an existing pull requestModify the title and body of a pull request that is already open.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the commit-push-pr skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the commit-push-pr skill in Plugin
/plugin marketplace add sneg55/agent-starter /plugin install agent-starter@agent-starter
Install the commit-push-pr skill in Claude Code
~/.claude/skills/commit-push-pr/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit-push-pr ~/.claude/skills/commit-push-prInstall the commit-push-pr skill in Claude Code (project)
.claude/skills/commit-push-pr/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit-push-pr .claude/skills/commit-push-prInstall the commit-push-pr skill in Codex
~/.agents/skills/commit-push-pr/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit-push-pr ~/.agents/skills/commit-push-prInstall the commit-push-pr skill in Gemini CLI
~/.gemini/skills/commit-push-pr/SKILL.md
$ npx degit sneg55/agent-starter/skills/commit-push-pr ~/.gemini/skills/commit-push-prInstall the commit-push-pr skill in Claude.ai
npx degit sneg55/agent-starter/skills/commit-push-pr commit-push-pr && zip -r commit-push-pr.zip commit-push-pr # claude.ai → Customize → Skills → + → Create skill → Upload a skill → commit-push-pr.zip
SKILL.md
View on GitHubCommit, Push, and Open PR
Context
Gather this context first:
git statusgit diff HEADgit branch --show-currentgit diff main...HEAD(or default branch)gh pr view --json number 2>/dev/null || true
Git Safety Protocol
- NEVER update the git config
- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
- NEVER run force push to main/master, warn the user if they request it
- Do not commit files that likely contain secrets (.env, credentials.json, etc)
- Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported
Task
Analyze ALL changes that will be included in the pull request - look at ALL commits from git diff main...HEAD, not just the latest commit.
Based on the changes:
1. Create branch (if on main/master)
Use the format username/feature-name:
git checkout -b username/descriptive-feature-name
2. Create a single commit
Use heredoc syntax for the message:
git commit -m "$(cat <<'EOF'
Commit message here.
EOF
)"
- Follow the repo's commit message style (check
git log --oneline -10) - Focus on "why" not "what"
- Keep it concise (1-2 sentences)
3. Push the branch
git push -u origin HEAD
4. Create or update PR
Check if a PR already exists (from the gh pr view output above).
If PR exists - update it:
gh pr edit --title "Short title" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>
## Test plan
- [ ] Test item 1
- [ ] Test item 2
EOF
)"
If no PR - create one:
gh pr create --title "Short, descriptive title" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>
## Test plan
- [ ] Test item 1
- [ ] Test item 2
EOF
)"
Rules:
- Keep PR titles under 70 characters. Use the body for details.
- Summary should be 1-3 bullet points covering WHAT changed and WHY
- Test plan should be a checklist of verification steps
5. Return the PR URL
Do all of the above in a single message using multiple tool calls. Return the PR URL when done.
Files in this skill
1commit-push-pr skill questions
How do I install the commit-push-pr skill in Claude Code?
Run npx degit sneg55/agent-starter/skills/commit-push-pr ~/.claude/skills/commit-push-pr. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the commit-push-pr skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What safety protocols are followed during git operations?
The skill avoids updating git config, running destructive commands like force pushes without permission, skipping hooks, or using interactive flags.
How are pull request descriptions structured?
Pull requests include a short title and a body containing a summary with 1-3 bullet points and a test plan checklist.
What happens if a pull request already exists for the current branch?
Instead of creating a new one, the skill updates the existing pull request with a new title and body.