push
Review the latest changes, commit with an appropriate message, and push to GitHub
SKILL.md.claude/skills/push/SKILL.md
GitHubPush Skill
When this skill runs, review the current codebase state, commit it, and push to the remote.
Inspect the latest state (run in parallel):
git status(never use-uall)git diffandgit diff --stagedgit log --oneline -10to match the repo's commit message stylegit branch --show-currentandgit remote -v
Stop and report if there is nothing to commit, there is no remote, or HEAD is detached.
Choose what to stage. Stage files by name, never
git add -Aorgit add .. Do not stage:- secrets or likely-secret files (
.env, credentials, keys); if unsure, read the file first input.md(the UserPromptSubmit hook's prompt log) unless the user explicitly asks- large binaries or generated output Mention anything you skipped and why.
- secrets or likely-secret files (
Write the commit message from the actual diff: one concise subject line (match the existing style, e.g.
feat: ...,fix: ...,docs: ...) that explains why, plus a short body only if needed. Split unrelated changes into separate commits. Pass the message via a HEREDOC and end it with:Commit, then run
git statusto confirm. If a hook fails, fix the issue and create a NEW commit; never use--no-verifyor--amend.Push the current branch with
git push(usegit push -u origin <branch>if it has no upstream). If the push is rejected because the remote is ahead, rungit pull --rebaseand retry once; if that conflicts, stop and ask. Never force push.Report the commit hash(es), the branch, and the remote URL in one or two sentences.