Publishes local commits to remote branches. Ensures tests pass and uses non-destructive push methods.

Install

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

Installs to .claude/skills/push-hojinzs

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.

Publish verified local commits to the remote branch without unsafe force pushes.
80 charsno explicit “when” trigger
Beginner

Key capabilities

  • Run local tests before pushing commits
  • Run linting before pushing commits
  • Push local commits to a remote branch
  • Handle non-fast-forward push rejections by fetching and merging
  • Re-run tests after a merge due to rejection
  • Verify CI status after a push

How it works

The skill executes local tests and linting, then attempts to push commits to a remote branch. If the push is rejected, it fetches, merges, re-tests, and attempts to push again.

Inputs & outputs

You give it
Local commits on a branch
You get back
Commits published to the remote branch or a record of push rejection and resolution steps

When to use push

  • Pushing commits to a remote feature branch
  • Handling non-fast-forward push rejections
  • Verifying CI status after a push

About this skill

/push — Git Push Workflow

Trigger

Use this skill when publishing local commits to the remote branch.

Flow

  1. Run local tests and lint — ensure they pass before pushing
  2. Push to remote:
    git push origin <branch>        # subsequent pushes
    git push -u origin <branch>     # first push (sets upstream)
    
  3. If push is rejected (non-fast-forward):
    • Run git fetch origin && git merge origin/main
    • Resolve any conflicts
    • Re-run tests
    • Push again
  4. Record push result in workpad Notes

Rules

  • Never use --force (destructive)
  • Only use --force-with-lease if absolutely necessary — record the reason in workpad
  • Verify CI starts after push (check GitHub Actions tab)
  • Do not push directly to main or master

When not to use it

  • When pushing directly to `main` or `master` branches
  • When an unsafe force push is required
  • When the user wants to bypass local tests and linting

Limitations

  • Does not allow direct pushes to `main` or `master`
  • Discourages the use of `--force`

How it compares

This workflow automates pre-push checks and handles common push rejections, providing a more controlled and safer alternative to a manual `git push`.

Compared to similar skills

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

SkillInstallsUpdatedSafetyDifficulty
push (this skill)04moReviewBeginner
github-workflow-automation112moReviewAdvanced
testing-workflow169moReviewIntermediate
github-actions-templates73moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

Search skills

Search the agent skills registry