Commit All
Collect every change on the current branch into one commit with a generated message.
No push, no --amend, no new branches, no history rewriting: the skill produces exactly
one commit on the branch the user is already on, or stops to ask. The explicit
invocation is the approval: on a feature branch a normal run analyzes the tree, shows
the plan, and commits in the same turn without asking again.
Only the user triggers this skill: never activate it from a description of finished
work, and never invoke it from another skill. When the user supplies their own commit
message, commit directly without this skill.
Arguments: /commit-all commits; /commit-all dry-run prints the file list and the
generated message without committing.
Workflow
- Survey the tree. Run
git status --short, git diff, git diff --staged, and
git log --oneline -10 for the branch's message conventions. A clean tree ends the
run with "no changes to commit" and nothing else.
- Check the branch. On
main or master, stop and ask whether to commit there or
create a branch first; never commit to a default branch silently.
- Separate the session's changes from pre-existing ones. Compare the tree against
the
git status from the start of the conversation, when available. The split feeds
the message's thematic groups and helps spot suspicious files; it is never a reason
to pause. An explicit /commit-all already covers the whole tree, pre-existing
changes included.
- Screen untracked files. Skip anything
.gitignore should have covered, one-off
scripts, and files that may hold secrets; ask about them instead of staging blindly.
- Generate the message. One imperative summary line up to ~72 characters. Reuse a
prefix convention (
feat(scope):, fix:) only when git log shows one; never
impose your own. Add a body only when the diff spans several unrelated groups: 2-4
short bullets, one per group, no per-file listing. Write the message in English. No
co-author or agent attribution unless the repository's conventions require it.
- Show before committing. Print the file list and the generated message as a
progress update, then continue to the commit in the same turn. Only
dry-run stops
here. The remaining stop conditions are step 2 (default branch), step 4 (suspicious
untracked files), and arguments whose intended scope cannot be determined safely
(explicit paths or partial-commit requests that do not match the tree).
- Commit. One commit on the current branch. Afterwards show
git log -1 --stat
(or a short excerpt). Do not push.
Mechanics
- Pass the message via
git commit -F - with a heredoc, never -m with escaping.
- Argument order matters:
git commit -F - -- <paths>; putting -F after the pathspec
breaks.
- zsh does not word-split an unquoted variable, so
git diff -- $PATHS silently matches
nothing; keep path lists in a file or a shell array.
- For a partial commit use
git commit -F - -- <paths> so already-staged index entries
(renames in particular) survive untouched.
- Never pass
--no-verify; a failing pre-commit hook is a result to report, not an
obstacle.
- Force push and history rewriting are out of scope for this skill under any wording.
Amend
When the previous commit was made by this same session and is not pushed, offer
--amend in one sentence; run it only after the user agrees. Never offer it for a
pushed or foreign commit.
1---2name: commit-all3description: User-invoked via /commit-all only. Gathers the working tree into a single commit on the current branch, no push.4license: MIT5---6
7# Commit All
8
9Collect every change on the current branch into one commit with a generated message.
10No push, no `--amend`, no new branches, no history rewriting: the skill produces exactly
11one commit on the branch the user is already on, or stops to ask. The explicit
12invocation is the approval: on a feature branch a normal run analyzes the tree, shows
13the plan, and commits in the same turn without asking again.
14
15Only the user triggers this skill: never activate it from a description of finished
16work, and never invoke it from another skill. When the user supplies their own commit
17message, commit directly without this skill.
18
19Arguments: `/commit-all` commits; `/commit-all dry-run` prints the file list and the
20generated message without committing.
21
22## Workflow
23
241. **Survey the tree.** Run `git status --short`, `git diff`, `git diff --staged`, and
25 `git log --oneline -10` for the branch's message conventions. A clean tree ends the
26 run with "no changes to commit" and nothing else.
272. **Check the branch.** On `main` or `master`, stop and ask whether to commit there or
28 create a branch first; never commit to a default branch silently.
293. **Separate the session's changes from pre-existing ones.** Compare the tree against
30 the `git status` from the start of the conversation, when available. The split feeds
31 the message's thematic groups and helps spot suspicious files; it is never a reason
32 to pause. An explicit `/commit-all` already covers the whole tree, pre-existing
33 changes included.
344. **Screen untracked files.** Skip anything `.gitignore` should have covered, one-off
35 scripts, and files that may hold secrets; ask about them instead of staging blindly.
365. **Generate the message.** One imperative summary line up to ~72 characters. Reuse a
37 prefix convention (`feat(scope):`, `fix:`) only when `git log` shows one; never
38 impose your own. Add a body only when the diff spans several unrelated groups: 2-4
39 short bullets, one per group, no per-file listing. Write the message in English. No
40 co-author or agent attribution unless the repository's conventions require it.
416. **Show before committing.** Print the file list and the generated message as a
42 progress update, then continue to the commit in the same turn. Only `dry-run` stops
43 here. The remaining stop conditions are step 2 (default branch), step 4 (suspicious
44 untracked files), and arguments whose intended scope cannot be determined safely
45 (explicit paths or partial-commit requests that do not match the tree).
467. **Commit.** One commit on the current branch. Afterwards show `git log -1 --stat`
47 (or a short excerpt). Do not push.
48
49## Mechanics
50
51- Pass the message via `git commit -F -` with a heredoc, never `-m` with escaping.
52- Argument order matters: `git commit -F - -- <paths>`; putting `-F` after the pathspec
53 breaks.
54- zsh does not word-split an unquoted variable, so `git diff -- $PATHS` silently matches
55 nothing; keep path lists in a file or a shell array.
56- For a partial commit use `git commit -F - -- <paths>` so already-staged index entries
57 (renames in particular) survive untouched.
58- Never pass `--no-verify`; a failing pre-commit hook is a result to report, not an
59 obstacle.
60- Force push and history rewriting are out of scope for this skill under any wording.
61
62## Amend
63
64When the previous commit was made by this same session and is not pushed, offer
65`--amend` in one sentence; run it only after the user agrees. Never offer it for a
66pushed or foreign commit.