Commit Summary
Generate accurate Conventional Commits from real git diffs.
Authorized Scope
Apply this engine only within the user's requested task and existing explicit
authorization. Loading or delegating to it grants no additional authority.
Preserve report-only restrictions and the caller's target, host, provider, and
cost limits. Existing approval satisfies a gate only for the same actions and
scope; obtain approval before expanding them. Forward these limits to delegates.
Contract
Inputs:
- Repository root
- Staged changes, unstaged changes, or approved paths to stage
- Optional commit type, scope, and breaking-change context
Outputs:
- Commit message candidate
- Logical commit grouping when changes are mixed
- Created commit hash after approval, if requested
Creates/Modifies:
- No changes in message-only mode
- May stage files and create commits after approval
External Side Effects:
- None unless another workflow pushes the commit later
Confirmation Required:
- Before staging files
- Before creating a commit
- Before amending or squashing existing commits
Delegates To:
github-pr-publish when the commit should be pushed and opened as a PR
git-safety when secrets or sensitive files appear in the diff
Workflow
Inspect repository state:
git status -sb
git log --oneline -5
git diff --stat
git diff --cached --stat
Determine whether changes are already staged:
- If staged changes exist, generate the message from
git diff --staged.
- If nothing is staged, inspect unstaged changes and propose logical groups.
- If unrelated changes are mixed, recommend separate commits.
Guard against unsafe commits:
- Do not stage secrets,
.env, credentials, private keys, local databases,
build caches, or large generated artifacts.
- If sensitive files appear, stop and delegate to
git-safety.
- Do not include unrelated formatting churn in a feature/fix commit unless
it is required by the change.
Choose the Conventional Commit type:
feat: user-visible feature or capability
fix: bug fix
docs: documentation only
style: formatting only, no behavior change
refactor: code restructuring without behavior change
perf: performance improvement
test: tests only
build: build system, package manager, dependencies
ci: CI/CD workflow changes
chore: maintenance with no user-facing behavior
revert: revert a previous commit
Detect scope:
- Prefer package, app, domain, or subsystem names already used in history.
- Omit scope if it would be vague (
misc, stuff, changes).
Detect breaking changes:
- Public API contract changes
- CLI flags or output changes
- Database/schema migrations requiring user action
- Removed config keys, env vars, routes, events, or exported symbols
Format as type(scope)!: summary and include a BREAKING CHANGE: footer.
Generate the commit message:
type(scope): imperative summary
Optional body explaining why and any non-obvious implementation detail.
Optional footer such as:
BREAKING CHANGE: migration required because ...
Refs: #123
If the user asked to commit, show the exact message and proceed within that
authorization. Obtain approval only if the selected files or operation exceed
the request:
git add <approved-paths>
git diff --staged --stat
git commit -m "<subject>" -m "<body-or-footer>"
Quality Bar
- Subject is imperative and under 72 characters.
- Body explains why when the diff alone is not enough.
- Message does not overstate behavior.
- Commit contains one logical change.
- Verification commands are not placed in the commit message unless the repo
convention asks for them.
Gotchas
git add . can stage unintended files. If .gitignore does not exclude node_modules, .env*, or build artifacts, always prefer git add <specific-paths>. Verify with git diff --staged --stat before committing.
- Breaking-change footer is case-sensitive. The token must be exactly
BREAKING CHANGE: (with a space, all caps) for tools like semantic-release and conventional-changelog to detect it. BREAKING-CHANGE: is not equivalent.
- Amended commits rewrite history. Never amend a commit that has already been pushed to a shared branch. If the commit exists on the remote, create a new fix commit instead.
- Co-authored-by trailers conflict with repo conventions. Some repos (including this project) explicitly forbid
Co-Authored-By trailers. Check the repo's agent instruction file (AGENTS.md, CLAUDE.md, or equivalent) or recent commit history for the project convention before adding them.
Examples
feat(auth): add password reset flow
fix(api): handle null provider response
ci(actions): restrict pull request token permissions
refactor(utils): extract date formatting helper
docs: update GitHub project board workflow
What Did I Get Done procedure
Read what-did-i-get-done procedure when compiling an activity summary over a requested date range.
Apply the authorized scope and mode of this entry point to every step.
Resolve other skills through this distribution’s active catalog; resolve
resources relative to the installed skill directory.
1---2name: commit-summary3description: Generate Conventional Commit messages from staged or unstaged git changes, split unrelated changes into logical commits, detect breaking changes, and optionally create commits after approval. Use when writing commit messages, preparing commits, or committing local work.4---5
6# Commit Summary
7
8Generate accurate Conventional Commits from real git diffs.
9
10## Authorized Scope
11
12Apply this engine only within the user's requested task and existing explicit
13authorization. Loading or delegating to it grants no additional authority.
14Preserve report-only restrictions and the caller's target, host, provider, and
15cost limits. Existing approval satisfies a gate only for the same actions and
16scope; obtain approval before expanding them. Forward these limits to delegates.
17
18## Contract
19
20Inputs:
21
22- Repository root
23- Staged changes, unstaged changes, or approved paths to stage
24- Optional commit type, scope, and breaking-change context
25
26Outputs:
27
28- Commit message candidate
29- Logical commit grouping when changes are mixed
30- Created commit hash after approval, if requested
31
32Creates/Modifies:
33
34- No changes in message-only mode
35- May stage files and create commits after approval
36
37External Side Effects:
38
39- None unless another workflow pushes the commit later
40
41Confirmation Required:
42
43- Before staging files
44- Before creating a commit
45- Before amending or squashing existing commits
46
47Delegates To:
48
49- `github-pr-publish` when the commit should be pushed and opened as a PR
50- `git-safety` when secrets or sensitive files appear in the diff
51
52## Workflow
53
541. Inspect repository state:
55
56 ```bash
57 git status -sb
58 git log --oneline -5
59 git diff --stat
60 git diff --cached --stat
61 ```
62
632. Determine whether changes are already staged:
64 - If staged changes exist, generate the message from `git diff --staged`.
65 - If nothing is staged, inspect unstaged changes and propose logical groups.
66 - If unrelated changes are mixed, recommend separate commits.
67
683. Guard against unsafe commits:
69 - Do not stage secrets, `.env`, credentials, private keys, local databases,
70 build caches, or large generated artifacts.
71 - If sensitive files appear, stop and delegate to `git-safety`.
72 - Do not include unrelated formatting churn in a feature/fix commit unless
73 it is required by the change.
74
754. Choose the Conventional Commit type:
76
77 - `feat`: user-visible feature or capability
78 - `fix`: bug fix
79 - `docs`: documentation only
80 - `style`: formatting only, no behavior change
81 - `refactor`: code restructuring without behavior change
82 - `perf`: performance improvement
83 - `test`: tests only
84 - `build`: build system, package manager, dependencies
85 - `ci`: CI/CD workflow changes
86 - `chore`: maintenance with no user-facing behavior
87 - `revert`: revert a previous commit
88
895. Detect scope:
90 - Prefer package, app, domain, or subsystem names already used in history.
91 - Omit scope if it would be vague (`misc`, `stuff`, `changes`).
92
936. Detect breaking changes:
94 - Public API contract changes
95 - CLI flags or output changes
96 - Database/schema migrations requiring user action
97 - Removed config keys, env vars, routes, events, or exported symbols
98
99 Format as `type(scope)!: summary` and include a `BREAKING CHANGE:` footer.
100
1017. Generate the commit message:
102
103 ```text
104 type(scope): imperative summary
105
106 Optional body explaining why and any non-obvious implementation detail.
107
108 Optional footer such as:
109 BREAKING CHANGE: migration required because ...
110 Refs: #123
111 ```
112
1138. If the user asked to commit, show the exact message and proceed within that
114 authorization. Obtain approval only if the selected files or operation exceed
115 the request:
116
117 ```bash
118 git add <approved-paths>
119 git diff --staged --stat
120 git commit -m "<subject>" -m "<body-or-footer>"
121 ```
122
123## Quality Bar
124
125- Subject is imperative and under 72 characters.
126- Body explains why when the diff alone is not enough.
127- Message does not overstate behavior.
128- Commit contains one logical change.
129- Verification commands are not placed in the commit message unless the repo
130 convention asks for them.
131
132## Gotchas
133
134- **`git add .` can stage unintended files.** If `.gitignore` does not exclude `node_modules`, `.env*`, or build artifacts, always prefer `git add <specific-paths>`. Verify with `git diff --staged --stat` before committing.
135- **Breaking-change footer is case-sensitive.** The token must be exactly `BREAKING CHANGE:` (with a space, all caps) for tools like `semantic-release` and `conventional-changelog` to detect it. `BREAKING-CHANGE:` is not equivalent.
136- **Amended commits rewrite history.** Never amend a commit that has already been pushed to a shared branch. If the commit exists on the remote, create a new fix commit instead.
137- **Co-authored-by trailers conflict with repo conventions.** Some repos (including this project) explicitly forbid `Co-Authored-By` trailers. Check the repo's agent instruction file (`AGENTS.md`, `CLAUDE.md`, or equivalent) or recent commit history for the project convention before adding them.
138
139## Examples
140
141- `feat(auth): add password reset flow`
142- `fix(api): handle null provider response`
143- `ci(actions): restrict pull request token permissions`
144- `refactor(utils): extract date formatting helper`
145- `docs: update GitHub project board workflow`
146
147## What Did I Get Done procedure
148
149Read [what-did-i-get-done procedure](references/what-did-i-get-done-procedure.md) when compiling an activity summary over a requested date range.
150Apply the authorized scope and mode of this entry point to every step.
151Resolve other skills through this distribution’s active catalog; resolve
152resources relative to the installed skill directory.