git-push
Skill2 starsChanged 42 days agoMITView on GitHub
Push commits to feature branch and update open PR description with new changes
- Commits and pushes
18 other projects use a version of this.
Adopted by
Most recently taken up by
- Hexi1997/skillstheir own version, first seen Nov 7, 2026
- mattmireles/gemma-tuner-multimodaltheir own version, first seen Nov 1, 2026
- vladimiracunadev-create/claude-skills-toolkittheir own version, first seen Nov 1, 2026
- MYQFJ23333/git-claudetheir own version, first seen Nov 1, 2026
- solplum/agent-git-workflow-skillstheir own version, first seen Oct 15, 2026
- cognis-digital/skillsmiththeir own version, first seen Oct 11, 2026
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
- yunshu0909/yunshu_skillshub★ 760same name
- jerrywu001/cc-sessions-viewer★ 415same name
- chengkj99/kj-skills★ 14same name
- phanghonghao/THU-Awesome-Skills★ 8same name
- pgnzbl-ux/crucible★ 4same name
- rohanhong/tmpl.general-repo★ 3same name
- solplum/agent-git-workflow-skills★ 3same name
- MYQFJ23333/git-claude★ 2same name
- SmartAssets-io/skills★ 2same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- changelog-bump-verSkill
- gh-copilot-review-readSkill
- gh-copilot-review-resolveSkill
- gh-copilot-reviewSkill
- gh-cr-submitSkill
- gh-issue-fixSkill
- gh-issueSkill
- gh-pr-mergeSkill
- gh-protect-default-branchSkill
- gh-pr-reviewSkill
- gh-prSkill
- gh-releaseSkill
- git-branchSkill
- git-commitSkill
- make-changelogSkill
- mir-skills-installSkill
- mir-skills-updateSkill
- python-venvSkill
- save-planSkill
- session-noteSkill
- work-reportSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
57 rules. 0 are common, 37 are distinctive, and 20 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
37
Distinctive
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Update the PR's "Changes" section only when the push adds significant new functionality
- Very specific: line 16
Update the existing PR-linked CHANGELOG.md entry only when the PR's high-level scope materially changes, using the PR URL in the changelog …
- Distinctive: line 22
Use this skill when the user asks to push commits and/or update the PR with the latest changes.
- Distinctive: line 26
Must be on a feature branch (not master/main)
- Very specific: line 29
If gh not installed → error: "GitHub CLI not found.
- Distinctive: line 33
Check current branch: git branch --show-current
- Distinctive: line 34
If on master or main → error: "Error: Cannot push directly to master/main.
- Distinctive: line 35
Check for unpushed commits:
- Distinctive: line 39
If no unpushed commits → inform user: "Nothing to push — branch is up-to-date with remote."
- Distinctive: line 43
Check if branch exists on remote:
- Distinctive: line 47
If the branch already exists on remote, treat the next push as the final push for this batch of local commits
- Distinctive: line 48
If the branch does not exist on remote yet, push it first:
- Distinctive: line 52
Only run pre-push PR detection, PR body updates, and changelog sync when the remote branch already exists and an open PR can already be …
- Very specific: line 53
If the branch was just published and a later changelog sync creates a dedicated CHANGELOG.md commit, push a second time so that new …
- Distinctive: line 54
If the branch already existed on remote, finish with the normal push:
- Distinctive: line 61
When the remote branch already exists, check for an open PR before the final push and update its description when needed.
- Distinctive: line 62
If the branch was not yet on remote, do the initial git push -u first.
- Distinctive: line 63
Only update the PR description when the outgoing commits add something new.
- Very specific: line 72
If status is 0 → PR found.
- Very specific: line 73
If pr_json clearly indicates no open PR for this branch → skip PR update and just report the push
- Very specific: line 74
If status is non-zero for any other reason → surface the gh error instead of treating it like no PR exists
- Distinctive: line 78
If the branch already exists on remote, get the commits that are about to be pushed using the existing remote range:
- Very specific: line 83
If the branch was not yet on remote, use the local commit batch that existed before the initial git push -u as the basis for PR update …
- Distinctive: line 91
Look at the new commits and decide: do they add something new to the branch, or do they fix/correct earlier work in the same branch?
- Distinctive: line 93
Update the PR Changes section: when the new commits:
- Distinctive: line 94
Add a new feature, capability, or behavior
- Distinctive: line 95
Add new files, components, or modules
- Distinctive: line 99
Skip the PR Changes update: when the new commits:
- Very specific: line 107
When skipping, just report the push: "Pushed to <branch>.
- Distinctive: line 111
Only reach this step if the new commits are significant (see above).
- Very specific: line 120
Keep the ## Summary section unchanged unless it no longer reflects the PR accurately — if so, update it
- Distinctive: line 121
Write the updated body back:
- Distinctive: line 143
Only reach this step if an open PR exists for the current branch and the outgoing commits materially change what the PR delivers.
- Very specific: line 145
Check whether root CHANGELOG.md exists and contains exactly one ## [Unreleased] section
- Distinctive: line 148
Update that one-line bullet only if the old wording no longer reflects the PR's overall scope
- Distinctive: line 149
If the best matching changelog subsection changed, move the bullet to the better subsection
- Very specific: line 150
If CHANGELOG.md changed, stage only that file:
- Very specific: line 154
Verify the staged set contains only CHANGELOG.md before committing:
- Very specific: line 158
If any staged path other than CHANGELOG.md appears, warn and skip the changelog commit rather than risking unrelated files in the commit.
- Distinctive: line 159
Create a dedicated changelog commit before the branch push:
- Very specific: line 166
Do not touch CHANGELOG.md if there is no open PR in the current agent context or no open PR for the branch
- Very specific: line 167
Do not create a new changelog bullet from git-push.
- Very specific: line 169
Only move the bullet if the newly selected subsection already exists under ## [Unreleased].
- Distinctive: line 170
Keep the changelog entry in this format:
- Distinctive: line 174
When rewriting text, preserve the PR number and use the current PR URL in linked form
- Distinctive: line 175
If the push only fixes, polishes, refactors, or addresses review feedback on existing branch work, leave the changelog unchanged
- Distinctive: line 176
If no matching bullet for the PR number exists, skip changelog editing
- Distinctive: line 177
If multiple matching bullets for the PR number exist, treat the changelog as ambiguous and skip editing
- Very specific: line 178
If an existing plain (#<pr-number>) suffix is found, rewrite it to the linked (#<pr-number>) form during the update
- Very specific: line 179
Only create the dedicated changelog commit when CHANGELOG.md actually changed
- Very specific: line 181
Verify the staged set contains only CHANGELOG.md before git commit.
- Distinctive: line 182
Keep the changelog commit dedicated to the changelog sync so it can be pushed with the same branch work cleanly
- Very specific: line 183
If CHANGELOG.md already has unrelated local edits that make the sync unsafe or ambiguous, skip changelog editing and warn the user instead …
- Distinctive: line 184
If the branch already exists on remote, include any changelog commit in that same final push
- Distinctive: line 185
If the branch was just published with git push -u, do a second push only when a changelog commit was created afterward
- Distinctive: line 190
No unpushed commits → "Nothing to push — branch is up-to-date with remote."
- Distinctive: line 192
No open PR → push succeeds, inform user: "Pushed to <branch>.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
What I do
- Push new local commits on a feature branch to the remote
- Detect if an open PR exists for the current branch
- Update the PR's "Changes" section only when the push adds significant new functionality
- Update the existing PR-linked
CHANGELOG.mdentry only when the PR's high-level scope materially changes, using the PR URL in the changelog bullet, then commit that changelog change to the same branch before pushing - Skip PR updates for commits that fix bugs or mistakes from earlier commits in the same branch
- Preserve the existing PR Summary while appending new change entries
When to use me
Use this skill when the user asks to push commits and/or update the PR with the latest changes.
Prerequisites
- Must be on a feature branch (not master/main)
- Branch must have unpushed commits ahead of remote
- GitHub CLI (
gh) must be installed and authenticated - If
ghnot installed → error: "GitHub CLI not found. Install: https://cli.github.com/"
Validation Workflow
- Check current branch:
git branch --show-current - If on
masterormain→ error: "Error: Cannot push directly to master/main. Switch to a feature branch." - Check for unpushed commits:
git log origin/<branch>..HEAD --oneline - If no unpushed commits → inform user: "Nothing to push — branch is up-to-date with remote."
Push Workflow
- Check if branch exists on remote:
git ls-remote --heads origin <branch-name> - If the branch already exists on remote, treat the next push as the final push for this batch of local commits
- If the branch does not exist on remote yet, push it first:
git push -u origin <branch-name> - Only run pre-push PR detection, PR body updates, and changelog sync when the remote branch already exists and an open PR can already be associated with it
- If the branch was just published and a later changelog sync creates a dedicated
CHANGELOG.mdcommit, push a second time so that new changelog commit reaches the same branch - If the branch already existed on remote, finish with the normal push:
git push
PR Update Workflow
When the remote branch already exists, check for an open PR before the final push and update its description when needed.
If the branch was not yet on remote, do the initial git push -u first; only then try PR detection and any follow-up sync work.
Only update the PR description when the outgoing commits add something new. Do not update it for fixes to earlier work in the same branch.
Detect Open PR
pr_json="$(gh pr view --json number,url,body --jq '{number: .number, url: .url, body: .body}' 2>&1)"
status=$?- If
statusis0→ PR found; proceed to analyzing the new commits - If
pr_jsonclearly indicates no open PR for this branch → skip PR update and just report the push - If
statusis non-zero for any other reason → surface thegherror instead of treating it like no PR exists
Analyze New Commits
- If the branch already exists on remote, get the commits that are about to be pushed using the existing remote range:
Note: Capture this before the final push to know which commits are new.git log origin/<branch>..HEAD --oneline - If the branch was not yet on remote, use the local commit batch that existed before the initial
git push -uas the basis for PR update analysis instead of relying onorigin/<branch>. - Get the diffs for those commits to understand what changed:
git diff <pre-push-sha>..HEAD --stat
Decide Whether to Update the PR
Look at the new commits and decide: do they add something new to the branch, or do they fix/correct earlier work in the same branch?
Update the PR Changes section when the new commits:
- Add a new feature, capability, or behavior
- Add new files, components, or modules
- Introduce a new integration or API
- Make a meaningful enhancement that changes what the PR delivers
Skip the PR Changes update when the new commits:
- Fix a bug introduced by an earlier commit in this same branch
- Fix typos, linting errors, or test failures from earlier branch work
- Refactor or clean up code that was added in this branch
- Address code review feedback on existing branch changes
The simple rule: if the commit makes the PR do something it didn't do before, update Changes. If it fixes or polishes what the PR already does, skip the update.
When skipping, just report the push: "Pushed to <branch>. PR not updated (commit fixes/polishes existing branch work)."
Update PR Description
Only reach this step if the new commits are significant (see above).
- Fetch the current PR body:
gh pr view <number> --json body --jq .body - Analyze the new commits and session context
- Generate new bullet points for the
## Changessection (same style asgh-prskill) - Append the new bullet points to the existing
## Changessection - Keep the
## Summarysection unchanged unless it no longer reflects the PR accurately — if so, update it - Write the updated body back:
gh pr edit <number> --body "<updated body>"
Updated Description Format
Preserve the existing structure from the gh-pr skill:
## Summary
<existing or updated 2-3 sentence overview>
## Changes
- <existing change 1>
- <existing change 2>
- <new change from latest push>
- <new change from latest push>Update CHANGELOG.md and Commit It
Only reach this step if an open PR exists for the current branch and the outgoing commits materially change what the PR delivers.
- Check whether root
CHANGELOG.mdexists and contains exactly one## [Unreleased]section - Within the
## [Unreleased]section, find the existing changelog bullet for that PR number, whether it uses(#<pr-number>)or([#<pr-number>](<pr-url>)) - Re-evaluate the PR's high-level purpose after the push
- Update that one-line bullet only if the old wording no longer reflects the PR's overall scope
- If the best matching changelog subsection changed, move the bullet to the better subsection
- If
CHANGELOG.mdchanged, stage only that file:git add CHANGELOG.md - Verify the staged set contains only
CHANGELOG.mdbefore committing:
If any staged path other thangit diff --cached --name-onlyCHANGELOG.mdappears, warn and skip the changelog commit rather than risking unrelated files in the commit. - Create a dedicated changelog commit before the branch push:
git commit -m "docs: update changelog entry for PR #<pr-number>"
Rules:
- Do not touch
CHANGELOG.mdif there is no open PR in the current agent context or no open PR for the branch - Do not create a new changelog bullet from
git-push; this skill only updates an existing PR-linked bullet - Reuse the same high-level classification rules as
gh-pr:Added,Changed,Deprecated,Removed,Fixed,Security, thenMiscif none fit well - Only move the bullet if the newly selected subsection already exists under
## [Unreleased]; otherwise skip changelog editing - Keep the changelog entry in this format:
- <high-level PR summary> ([#<pr-number>](<pr-url>)) - When rewriting text, preserve the PR number and use the current PR URL in linked form
- If the push only fixes, polishes, refactors, or addresses review feedback on existing branch work, leave the changelog unchanged
- If no matching bullet for the PR number exists, skip changelog editing
- If multiple matching bullets for the PR number exist, treat the changelog as ambiguous and skip editing
- If an existing plain
(#<pr-number>)suffix is found, rewrite it to the linked([#<pr-number>](<pr-url>))form during the update - Only create the dedicated changelog commit when
CHANGELOG.mdactually changed - Stage only
CHANGELOG.md; never use broad staging likegit add . - Verify the staged set contains only
CHANGELOG.mdbeforegit commit; otherwise warn and skip the changelog commit - Keep the changelog commit dedicated to the changelog sync so it can be pushed with the same branch work cleanly
- If
CHANGELOG.mdalready has unrelated local edits that make the sync unsafe or ambiguous, skip changelog editing and warn the user instead of guessing - If the branch already exists on remote, include any changelog commit in that same final push
- If the branch was just published with
git push -u, do a second push only when a changelog commit was created afterward
Error Handling
- On master/main → "Error: Cannot push directly to master/main. Switch to a feature branch."
- No unpushed commits → "Nothing to push — branch is up-to-date with remote."
ghnot installed → "Error: GitHub CLI not found. Install: https://cli.github.com/"- No open PR → push succeeds, inform user: "Pushed to
<branch>. No open PR found to update." gh pr viewfails for any reason other than no open PR for the branch → surface thegherror and do not silently skip PR/changelog updatesgh pr editfails → warn user but do not fail the push: "Warning: Push succeeded but PR description update failed."CHANGELOG.mdmissing, malformed, ambiguous, or missing the needed unreleased subsection → skip changelog sync and continue- Staged set contains files other than
CHANGELOG.mdafter sync → warn and skip the changelog commit to avoid committing unrelated staged changes git commitforCHANGELOG.mdfails → warn user and continue with the branch push without the changelog update: "Warning: Changelog update was prepared but could not be committed."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

