Commit push pr
Skill Lightbridge-KS/agent-skills/plugins/coding/skills/commit-push-pr
My Public Agent Skills
npx -y skills add Lightbridge-KS/agent-skills --skill commit-push-prAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Git workflow: commit, push, and create/update a draft PR. If a PR exists for the current branch, update its body. Trigger: 'commit push pr', 'ship it', 'send a PR', or /commit-push-pr.
SKILL.md
2.3 KB, as published. Nobody here has run it
Commit → Push → PR
Step 1: Gather Context
Run in parallel:
git status,git diff,git diff --staged,git log --oneline -10git branch --show-current,git rev-parse --abbrev-ref @{upstream} 2>/dev/nullgh auth statusgh pr list --head $(git branch --show-current) --json number,title,isDraft,url --limit 1
Hard stops:
- Stop if
gh auth statusfails. Report a clear fix (e.g., rungh auth login). - Stop if branch is
mainormaster.
Skip steps that aren't needed (e.g., nothing to commit → skip to push).
Step 2: Commit
- Stage files by name (never
git add -Aorgit add .) - Never commit files that likely contain secrets (
.env, credentials, tokens) - Follow project's commit conventions; default to Conventional Commits
- Use HEREDOC for multi-line messages
- Co-author trailer should be runtime-appropriate and configurable (do not hardcode Claude-specific identity)
Step 3: Push
- If no upstream exists:
git push -u origin HEAD; otherwisegit push. - If branch is high-risk or protected (e.g.,
release/*, protected remote branches), ask for explicit confirmation before pushing.
Step 4: Create or Update PR
- Get diff/log against base branch:
git log --oneline BASE..HEADandgit diff BASE...HEAD --stat - Draft PR body in a temp markdown file and use
--body-file(avoid inline multi-line shell quoting) - No existing PR →
gh pr create --draftwith title (<70 chars) and body summarizing all commits since base - Existing PR → Update body via
gh pr edit --body-fileincorporating new changes; keep title unless outdated - PR body:
## Summary+ bullet points +## Test planchecklist. Scale detail to change size.
Step 5: Optional Quality Checks (recommended)
Before push/PR, run project checks when available (e.g., test/lint/typecheck). If checks fail, report and ask whether to proceed.
Step 6: Report
Show: commit hash/message (if any), clickable PR URL, whether PR was created or updated, and whether checks passed/skipped.