push
/push
Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.
- Author
- s-hiraoku ↗
- Repository
- vscode-sidebar-terminal ↗
- Licence
- MIT
- Last repository change
- 02.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 02.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.
Original author description
Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.
How it works
- Prerequisites
- Goals
- Related Skills
- Steps
- Commands
- Notes
SKILL.md preview
---
name: push
description:
Push current branch changes to origin and create or update the corresponding
pull request; use when asked to push, publish updates, or create pull request.
---
# Push
## Prerequisites
- `gh` CLI is installed and available in `PATH`.
- `gh auth status` succeeds for GitHub operations in this repo.
## Goals
- Push current branch changes to `origin` safely.
- Create a PR if none exists for the branch, otherwise update the existing PR.
- Keep branch history clean when remote has moved.
## Related Skills
- `pull`: use this when push is rejected or sync is not clean (non-fast-forward,
merge conflict risk, or stale branch).
## Steps
1. Identify current branch and confirm remote state.
2. Run local validation before pushing:
- `npm run compile` — TypeScript compilation
- `npm run lint` — ESLint checks
- `npm run test:unit` — unit tests
3. Push branch to `origin` with upstream tracking if needed, using whatever
remote URL is already configured.
4. If push is not clean/rejected:
- If the failure is a non-fast-forward or sync problem, run the `pull`
skill to merge `origin/main`, resolve conflicts, and rerun validation.
- Push again; use `--force-with-lease` only when history was rewritten.
- If the failure is due to auth, permissions, or workflow restrictions on
the configured remote, stop and surface the exact error instead of
rewriting remotes or switching protocols as a workaround.
5. Ensure a PR exists for the branch:
- If no PR exists, create one.
- If a PR exists and is open, update it.
- If branch is tied to a closed/merged PR, create a new branch + PR.
- Write a proper PR title that clearly describes the change outcome
- For branch updates, explicitly reconsider whether current PR title still
matches the latest scope; update it if it no longer does.
6. Write/update PR body:
- Fill every section with concrete content for this change.
- If PR already exists, refresh body content so it reflects the total PR
scope (all intended work on the branch), not just the newest commits,
including newly added work, removed work, or changed approach.
- Do not reuse stale description text from earlier iterations.
7. Reply with the PR URL from `gh pr view`.
## Commands
```sh
# Identify branch
branch=$(git branch --show-current)
# Validation gate
npm run compile
npm run lint
npm run test:unit
# Initial push: respect the current origin remote.
git push -u origin HEAD
# If that failed because the remote moved, use the pull skill. After
# pull-skill resolution and re-validation, retry the normal push:
git push -u origin HEAD
# If the configured remote rejects the push for auth, permissions, or workflow
# restrictions, stop and surface the exact error.
# Only if history was rewritten locally:
git push --force-with-lease origin HEAD
# Ensure a PR exists (create only if missing)
pr_state=$(gh pr view --json state -q .state 2>/dev/null || true)
if [ "$pr_state" = "MERGED" ] || [ "$pr_state" = "CLOSED" ]; then
echo "Current branch is tied to a closed PR; create a new branch + PR." >&2
exit 1
fi
# Write a clear, human-friendly title that summarizes the shipped change.
pr_title="<clear PR title written for this change>"
if [ -z "$pr_state" ]; then
gh pr create --title "$pr_title"
else
# Reconsider title on every branch update; edit if scope shifted.
gh pr edit --title "$pr_title"
fi
# Show PR URL for the reply
gh pr view --json url -q .url
```
## Notes
- Do not use `--force`; only use `--force-with-lease` as the last resort.
- Distinguish sync problems from remote auth/permission problems:
- Use the `pull` skill for non-fast-forward or stale-branch issues.
- Surface auth, permissions, or workflow restrictions directly instead of
changing remotes or protocols.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · s-hiraoku/vscode-sidebar-terminal | 100 | MIT |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| hamedmp/matrix-os | 100 | AGPL-3.0 |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| JQ-WCoding/devkit | 100 | MIT |
| Mooshieblob1/MooshieUI | 100 | AGPL-3.0 |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| tibursocampos/agent-dev-toolkit | 100 | MIT |
Database snapshot: 13.11.2026 · package version 478401497f06 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90push-pr
Commits changes, pushes to remote, and creates or updates a pull request for the current branch. Use when the user says "push pr", "create pr", "push and create pr", or invokes "codagent:push-pr". - 100create-pr
Open or update a GitHub pull request for the current branch — use when asked to create a PR, open a pull request, push and PR, or submit a PR. - 90commit-push-current
Use when a human explicitly asks to commit and push to the checked-out branch with no branch creation and no pull request. Not for the default branch: use commit-push-main; not for a pull request: use commit-push-pr. - 100create-pr
This skill should be used when user asks to "create a PR", "make a pull request", "open PR for this branch", "submit changes as PR", "push and create PR", or explicitly invokes "create-pr". - 100commit-push-pr
Commit current changes, push to remote, and create or update a pull request. Use when the user wants to commit and create a PR, push changes and open a pull request, or ship their current work as a PR. - 90submit-pr-from-current-changes
Create a branch, commit existing local changes, push them, and open a pull request. Use when submitting current work as a PR.