plugins/git/skills/commit-push-pr/SKILL.md
Create commits, push to remote, and open a PR/MR - auto-detects GitHub/Gitea/GitLab and skips PR if on the default branch
npx skillsauth add jason-hchsieh/marketplace commit-push-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are creating commits, pushing to remote, and opening a pull request or merge request. This skill composes /commit-push with platform-aware PR creation.
Run the platform detection script:
bash "$CLAUDE_PLUGIN_ROOT/scripts/detect-platform.sh"
Parse the output. Key fields for PR creation:
platform — determines which CLI to usecli_tool / cli_available — required for PR creationcurrent_branch / default_branch / is_default_branchIf on default branch (is_default_branch=true): Skip PR creation. Warn the user:
You're on the default branch (main). Commits will be pushed directly.
No PR will be created. Switch to a feature branch first if you want a PR.
If CLI tool not available: Commits and push will work, but PR creation requires the platform CLI. Show install instructions and offer to just commit+push without PR.
Follow the /commit-push skill workflow (pass through --review flag if provided):
--review: show plan and wait for approval. Otherwise: execute directly.Only if NOT on the default branch and CLI tool is available.
Analyze all commits on this branch vs the default branch to draft the PR:
git log <default-branch>..HEAD --oneline
Also check the full diff for context:
git diff <default-branch>...HEAD --stat
Draft the PR:
Create the PR using the platform CLI:
GitHub:
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<bullet points>
## Test plan
<checklist>
EOF
)"
Gitea:
tea pr create --title "<title>" --description "$(cat <<'EOF'
## Summary
<bullet points>
EOF
)"
GitLab:
glab mr create --title "<title>" --description "$(cat <<'EOF'
## Summary
<bullet points>
EOF
)"
Fallback (no CLI): Show the user a formatted PR description they can copy, and provide the URL to create it manually.
## Commit, Push & PR Summary
Platform: GitHub (gh)
### Commits
1. abc1234 feat: add JWT refresh (3 files)
2. def5678 docs: document JWT refresh (1 file)
### Push
Branch: feature/jwt-refresh → origin/feature/jwt-refresh
### Pull Request
Title: Add JWT token refresh on expiry
URL: https://github.com/owner/repo/pull/42
Status: Open (draft: no)
Check .claude/git.local.md for PR preferences:
---
pr_draft: false # Create PRs as draft by default
pr_labels: [] # Default labels to add
pr_reviewers: [] # Default reviewers to request
pr_base: "" # Override base branch (default: auto-detect)
---
Apply these when creating the PR:
pr_draft: true → add --draft flagpr_labels → add --label flags (GitHub/GitLab)pr_reviewers → add --reviewer flags (GitHub)pr_base → add --base flag to override target branch| Argument | Effect |
|----------|--------|
| (none) | Auto-detect everything, commit directly |
| --review | Show commit plan and wait for approval before executing |
| --draft | Create PR as draft |
| --style conventional | Force commit style |
| --no-split | Single commit |
| --no-pr | Skip PR creation (same as /commit-push) |
gh pr view / tea pr list / glab mr list, report existing PR URL instead of creating duplicate-u flag for new branchestools
Bootstrap versioning for a project - detect project type, initialize git-cliff config, and generate initial CHANGELOG.md using semantic versioning
development
Validate version consistency across all project files, check semver format, git tag alignment, and changelog synchronization per https://semver.org/
tools
Generate or update CHANGELOG.md using git-cliff from conventional commit history - see https://git-cliff.org/docs/category/usage
tools
Bump the project version following semver, update all version files per https://semver.org/