Skip to content
cccskills
FreePublished on GitHub

push

Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create a pull request.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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 the branch is stale.

Validation gate

Run the checks that match the repo's normal contribution flow before pushing:

bun run lint
bun run test

Run browser coverage too when the change is user-facing, routing-related, or otherwise browser-observable:

bun run test:e2e

If Playwright browsers are missing, install them first:

bunx playwright install --with-deps chromium

Steps

  1. Identify the current branch and confirm the remote state.
  2. Run the required validation for the scope.
  3. Push the branch to origin with upstream tracking if needed.
  4. If push is rejected because the remote moved, run the pull skill, rerun validation, and push again.
  5. If push fails because of auth, permissions, or repo rules, stop and surface the exact error.
  6. Ensure a PR exists for the branch:
    • If no PR exists, create one.
    • If a PR exists and is open, update it.
    • If the current branch is tied to a closed or merged PR, create a fresh branch and PR.
  7. Write or update a clear PR title and body that match the current diff.
  8. Reply with the PR URL from gh pr view.

Commands

branch=$(git branch --show-current)

git push -u origin HEAD

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

pr_title="<clear PR title written for this change>"
if [ -z "$pr_state" ]; then
  gh pr create --fill --title "$pr_title"
else
  gh pr edit --title "$pr_title"
fi

gh pr view --json url -q .url

Notes

  • Do not use --force; use --force-with-lease only when local history was intentionally rewritten.
  • Distinguish sync problems from auth or permission problems. Use the pull skill for the former and surface the latter directly.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

commit

Free

Create a well-formed git commit from current changes using session history for rationale and summary; use when asked to commit, prepare a commit message, or finalize staged work.

The English summary is being prepared. Showing the original description.

sushaantu/boxento154Updated Oct 8, 2026

land

Free

Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion.

The English summary is being prepared. Showing the original description.

sushaantu/boxento154Updated Oct 8, 2026

linear

Free

Use Symphony's `linear_graphql` client tool for raw Linear GraphQL operations such as comment editing and status updates.

The English summary is being prepared. Showing the original description.

sushaantu/boxento154Updated Oct 8, 2026

pull

Free

Pull latest origin/main into the current local branch and resolve merge conflicts (aka update-branch). Use when Codex needs to sync a feature branch with origin, perform a merge-based update, and resolve conflicts safely.

The English summary is being prepared. Showing the original description.

sushaantu/boxento154Updated Oct 8, 2026

See all skills by sushaantu

Report a problem with this skill