openshelf-git-ops
Purpose
Run a safe Git handoff workflow from chat: validate repo state, optionally stash, add, commit, and push.
Use this skill when
- •You want chat to finish code changes with Git operations.
- •You need consistent commit quality and safer pushes.
- •You want fewer manual terminal steps.
Constraints
- •Never force-push unless user explicitly requests it.
- •Never commit secrets, tokens, or local environment files.
- •Do not include generated build artifacts unless the repo already tracks them intentionally.
- •If there are unrelated changes, stash them before staging targeted files.
Execution checklist
- •Inspect branch and status (
git branch --show-current,git status --short). - •If unrelated modifications exist, stash with message (
git stash push -u -m "pre-commit safety stash"). - •Stage intended files (
git add <paths>orgit add -Aif user approved). - •Confirm staged diff (
git diff --staged). - •Create a clear commit message and commit.
- •Sync with remote safely (
git pull --rebasewhen needed). - •Push branch (
git pushorgit push -u origin <branch>). - •Report final commit hash, branch, and push result.
Prompt templates
- •"Use openshelf-git-ops: commit all current changes with message 'feat: improve epub loading', then push current branch safely."
- •"Use openshelf-git-ops: stash unrelated work, commit only README and AGENTS updates, and push."
- •"Use openshelf-git-ops: check if branch is behind remote, rebase safely, then push and summarize."
Handoff template
- •Branch used.
- •Whether stash was created (name + how to restore).
- •Files committed.
- •Commit hash + message.
- •Push target and result.