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.zipInstalls 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 originKey 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
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 pushedgit 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.propsis still atX.Y.Z, which matches the last tagvX.Y.Z. If this push is destined for a release, run/bump-version --applyfirst.
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 touch | Run |
|---|---|
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.shorbuild_tools/regenerate_spy_tests.sh), commit the regenerated files, and re-run the check. - If the docs generator leaves
docs/stdlibdirty: 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
.spyfile changed — that's whysrc/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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| push (this skill) | 0 | 2mo | Review | Beginner |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| openspec-onboard | 10 | 6mo | Review | Beginner |
| codex-cli-bridge | 9 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
openspec-onboard
studyzy
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-sync
KyleKing
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.
github-workflow-automation
ruvnet
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.