Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install vivekkarmarkar-claude-code-os-skills-gitpushgit clone https://github.com/VivekKarmarkar/claude-code-os.gitcp claude-code-os/SKILL.MD ~/.claude/skills/vivekkarmarkar-claude-code-os-skills-gitpush/SKILL.md---
name: gitpush
description: Push committed changes to the remote. Use when the user says "push", "git push", "push to remote", "push to GitHub", "push changes", or wants to push without committing new changes. Takes an optional branch name as argument.
user-invocable: true
allowed-tools:
- Bash
---
# Git Push — Push to Remote
Arguments passed: `$ARGUMENTS`
## Argument Handling
- **No arguments** → push current branch
- **Branch name** (e.g., `main`, `feature/login`) → push that branch
## Workflow
### Step 1: Pre-flight
1. Confirm this is a git repo. If not, stop.
2. Check for a remote (`git remote -v`). If none, stop and suggest setting one up.
3. Check if there are unpushed commits (`git log @{u}..HEAD 2>/dev/null`). If nothing to push, tell the user and stop.
### Step 2: Push
- If no upstream set: `git push -u origin <branch>`
- If upstream exists: `git push`
- If a branch argument was provided: `git push origin <branch>`
### Step 3: Confirm
```
Pushed <N> commit(s) to <remote>/<branch>.
```
### Step 4: Check for README
After pushing, check if the repo has a `README.md` file. If it doesn't, invoke the `/gitreadme` skill to generate one automatically. This ensures every pushed repo has documentation.
## Rules
- **Never force push.** Use regular `git push` only. If the push is rejected, tell the user why and suggest `git pull` first.
- **Don't stage or commit.** This skill only pushes. Use `/gitstage` and `/gitcommit` for those.