Pushes the current branch to origin with automated pre-flight checks and optional issue closing.

Install

mkdir -p .claude/skills/push-antonsynd && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12287" && unzip -o skill.zip -d .claude/skills/push-antonsynd && rm skill.zip

Installs to .claude/skills/push-antonsynd

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Push current branch to remote origin
36 charsno explicit “when” trigger
Beginner

Key capabilities

  • Push the current Git branch to the remote origin
  • Optionally close specified GitHub issues upon successful push
  • Perform pre-flight checks for a clean working tree
  • Check for required version bumps on `dev` or `mainline` branches
  • Verify generated artifacts are up-to-date before pushing

How it works

The skill executes a Git push command, performing pre-flight checks like working tree status and version bump verification. It can also close specified GitHub issues after a successful push.

Inputs & outputs

You give it
Git push command, optionally with `--close-issues` argument
You get back
Result of the Git push, including branch pushed, commit count, remote URL, and closed issues

When to use push

  • Pushing code to remote
  • Automatically closing linked GitHub issues
  • Verifying version bumps before pushing release branches
  • Checking for stale generated artifacts

About this skill

Push the current branch to the remote and optionally close GitHub issues.

Usage:

  • /push — push current branch
  • /push --close-issues 208,210 — push and close the specified issues

Argument Handling

Parse $ARGUMENTS for:

  • --close-issues — comma-separated list of issue numbers to close after pushing

Steps

1. Pre-flight checks

Run in parallel:

  • git status — verify working tree is clean (warn if dirty)
  • git log --oneline @{upstream}..HEAD 2>/dev/null || echo "no upstream" — show commits that will be pushed
  • git branch --show-current — get current branch name

If the branch is main or mainline, warn the user that they're about to push directly to the main branch and confirm before proceeding.

1.25. Version bump check (dev/mainline only)

If the current branch is dev or mainline, check whether a version bump is needed before pushing:

git describe --tags --abbrev=0 2>/dev/null || echo "none"
grep -oP '(?<=<SharpyVersion>)[^<]+' Directory.Build.props

If the current SharpyVersion in Directory.Build.props equals the last tag version (strip leading v), warn:

⚠️ Version not bumped: Directory.Build.props is still at X.Y.Z, which matches the last tag vX.Y.Z. If this push is destined for a release, run /bump-version --apply first.

This is advisory — the push is not blocked. Skip silently if the version already exceeds the last tag.

1.5. Generated-artifact staleness gate

CI fails (check_spy_staleness.sh / check_spy_tests_staleness.sh) when generated C# or generated docs fall out of sync with their sources. Catch this before pushing.

Check which paths the outgoing commits touch:

git diff --name-only @{upstream}..HEAD 2>/dev/null || git diff --name-only origin/mainline...HEAD

Then run the matching regeneration checks (use dangerouslyDisableSandbox — these invoke dotnet):

Outgoing changes touchRun
src/Sharpy.Stdlib/spy/ or src/Sharpy.Compiler/ or src/Sharpy.Core/bash build_tools/check_spy_staleness.sh
src/Sharpy.Stdlib.Tests/Spy/ or src/Sharpy.Compiler/ or src/Sharpy.Core/bash build_tools/check_spy_tests_staleness.sh
src/Sharpy.Core/ or src/Sharpy.Stdlib/ (public API / doc comments)python3 -m build_tools stdlib generate --force then git status --short -- docs/stdlib
docs/deviations.yaml or src/Sharpy.Stdlib.Tests/Spy/cpython/python3 -m build_tools.cpython_oracle ledger --write then git status --short -- build_tools/cpython_oracle/ledger.yaml (commit if dirty — the pytest gate test_committed_ledger_is_up_to_date and the dual-execute-oracle CI job both fail on a stale ledger)
  • If a staleness check reports STALE/MISSING files: run the corresponding regeneration script (build_tools/regenerate_spy_stdlib.sh or build_tools/regenerate_spy_tests.sh), commit the regenerated files, and re-run the check.
  • If the docs generator leaves docs/stdlib dirty: commit the regenerated docs (docs(stdlib): regenerate ...). Never hand-edit generated docs or generated C#.
  • Compiler changes matter too: codegen changes alter the generated spy-test C# even when no .spy file changed — that's why src/Sharpy.Compiler/ is in the trigger column.

2. Push

git push -u origin <current-branch>

If the push fails due to diverged history, do not force push. Instead, report the error and suggest git pull --rebase or ask the user how to proceed.

3. Close issues (if requested)

If --close-issues was provided, close each issue:

gh issue close <number> --reason completed

Report which issues were closed.

4. Report

Show:

  • Branch name pushed
  • Number of commits pushed
  • Remote URL
  • Any issues closed

When not to use it

  • When a force push is required due to diverged history
  • When the user wants to push to a branch other than the current one
  • When the user does not want pre-flight checks or issue closing

Limitations

  • Only pushes the current branch to its remote origin
  • Issue closing is limited to GitHub issues

How it compares

This skill automates pre-push checks and optional GitHub issue closing, adding safeguards and convenience beyond a standard `git push` command.

Compared to similar skills

push side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
push (this skill)02moReviewBeginner
resolve-conflicts818moReviewIntermediate
openspec-onboard106moReviewBeginner
codex-cli-bridge99moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry