# git-commit-changes > Commit all staged changes into a single git commit with an automatically generated one-line Conventional Commit subject based on staged diffs and repository context. Use when asked to write or run a Conventional Commit for staged changes. - Author: Wenda - Repository: wdhuang/skills - Version: 20260205224654 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/wdhuang/skills - Web: https://mule.run/skillshub/@@wdhuang/skills~git-commit-changes:20260205224654 --- --- name: git-commit-changes description: Commit all staged changes into a single git commit with an automatically generated one-line Conventional Commit subject based on staged diffs and repository context. Use when asked to write or run a Conventional Commit for staged changes. --- # Git Commit Changes ## Overview Commit all currently staged changes in one commit. Analyze staged diffs and repository context before selecting the commit subject. ## Workflow 1. Inspect staged changes: - `git status -sb` - `git diff --cached --stat` - `git diff --cached` 2. Optionally scan staged file paths for scope hints when useful (for example: dominant top-level area such as `auth`, `api`, `ui`, or `build`). 3. If no staged changes exist, output `No staged changes to commit.` and stop. 4. Generate exactly one Conventional Commit subject line for staged changes only. 5. Run `git commit -m ""`. 6. Output only `` and nothing else. ## Commit Message Rules - Use format `(): ` when scope is clear. - Use format `: ` when scope is cross-cutting or unclear. - Choose the most accurate type from: - `feat` - `fix` - `refactor` - `perf` - `docs` - `test` - `chore` - `build` - `ci` - `revert` - Keep the subject imperative and concise. - Keep total subject length at or under 72 characters. - Do not end the subject with a period. - Describe staged changes only. ## Safety and Boundaries - Never include unstaged or untracked changes in the commit message reasoning. - Never add a commit body or footer. - Never output multiple commit subject lines. - Never run `git add` or stage additional files. ## Example `fix(auth): reject expired refresh tokens`