$npx -y skills add CommonstackAI/ClawBox --skill clawbox-git-commit-pushUse when the user asks to stage ClawBox changes, write a git commit, create a non-interactive commit, or push the current branch safely without mixing unrelated worktree changes.
| 1 | # ClawBox Git Commit Push |
| 2 | |
| 3 | Use this skill when the task is to prepare a clean git commit and push it from the current ClawBox repository. |
| 4 | |
| 5 | ## Read first |
| 6 | |
| 7 | - `git status --short --branch` |
| 8 | - `git diff --stat` |
| 9 | - `git diff --cached --stat` |
| 10 | - Targeted `git diff -- <paths>` for files intended for the commit |
| 11 | |
| 12 | ## Workflow |
| 13 | |
| 14 | 1. Inspect repo state before staging anything. |
| 15 | 2. Confirm the requested commit scope from actual modified files, not assumptions. |
| 16 | 3. Stage only intended paths with `git add <paths>`. |
| 17 | 4. Create the commit with `git commit -m "..."`. |
| 18 | 5. Check upstream with `git rev-parse --abbrev-ref --symbolic-full-name @{u}`. |
| 19 | 6. Use `git push` when upstream exists, or `git push -u origin <branch>` when the target is obvious. |
| 20 | 7. Report the commit hash, branch, and push result. |
| 21 | |
| 22 | ## Guardrails |
| 23 | |
| 24 | - Never use destructive commands such as `git reset --hard`, `git checkout --`, rebase, or force-push unless the user explicitly asks. |
| 25 | - Never stage unrelated or generated files silently. |
| 26 | - Never amend a commit unless explicitly requested. |
| 27 | - Prefer non-interactive git commands only. |
| 28 | - Stop and ask when branch target, commit scope, or staged changes are ambiguous. |
| 29 | |
| 30 | ## Verification |
| 31 | |
| 32 | - Run `git status --short --branch` before and after the commit. |
| 33 | - Run `git log --oneline -1` after the commit. |
| 34 | - If pushed, verify the branch is no longer ahead with `git status --short --branch`. |