cp
Purpose
Run a safe commit-and-push flow for this repository.
Defaults
- •Auto-stage all files with
git add -A. - •Target non-
mainbranches. - •Always run
just pre-flightbefore committing.
Workflow
- •Verify current branch with
git branch --show-current. - •If branch is
main, stop and ask user to create/switch branches first. - •Review changes with
git statusandgit diff --staged/git diff. - •Run preflight checks:
just pre-flight. - •Stage everything with
git add -A. - •Write a commit message with:
- •Subject line (concise, action-oriented).
- •Body that explains why the change exists and user impact.
- •Commit with a multi-line message (HEREDOC preferred).
- •Push:
- •If no upstream:
git push -u origin HEAD - •Else:
git push
- •If no upstream:
Commit Message Rules
- •Include meaningful why-context in the body.
- •Avoid empty or one-line commits when context is needed.
- •Keep message factual and user-relevant.
Safety Rails
- •Never push to
main. - •Never use
--no-verify. - •Never use force-push in this skill unless user explicitly asks.
- •If
just pre-flightfails, stop and report the failing step and output. - •If commit or push fails, report the exact failure and next step.