Prompt file imported from jonaskeller14/pyisomme (
.claude/commands/gc.md). Fill in{{arguments}}before use. Copyright stays with the author.
Commit the changes that are already staged. Do not stage anything yourself.
Steps
-
Inspect staged changes:
git diff --cached --statandgit diff --cached.- If nothing is staged, STOP and tell the user there is nothing to commit (do not run
git add). - Scan the staged diff for obvious (major) errors or typos — e.g. syntax errors, broken/leftover debug code, obviously wrong identifiers, or misspellings in user-facing strings. If any exist, STOP and return the list of errors to the user (do not commit). Ignore stylistic nitpicks.
- If nothing is staged, STOP and tell the user there is nothing to commit (do not run
-
If
{{arguments}}is provided, use it as the commit message (or as a strong subject/hint). Otherwise write a message in this repo's Conventional Commit style:type(scope): summarywheretype∈ feat | fix | refactor | docs | chore | test | perf | style | build. Derive it from the staged diff; keep the summary in the imperative mood.When the changeset includes multiple sub-changes (new files, refactors across multiple files, mixed types of changes, etc.), use multiple
-mflags to break them down:- First
-m: concise subject line - Subsequent
-mflags: bullet-point list of all specific changes (e.g., "- Add widget.dart", "- Update ComponentType with maxCount", "- Refactor preset picker")
- First
-
Commit ONLY the staged changes:
git commit -m "<message>"(use multiple-mflags for a body). -
Print the result:
git log -1 --format='%h %s'.
Constraints
- Never
git add,git push, orgit commit --amend. - Never add a
Co-Authored-Byline. - Use multiple
-mflags for multi-paragraph messages (avoid PowerShell here-strings). - If the current branch is
mainormaster, warn the user and ask for confirmation before committing.