Auto-commit changes after a Spec Kit command completes
Automatically stage and commit all changes after a Spec Kit command completes.
This command is invoked as a hook after (or before) core commands. It:
after_specify hook, the event is after_specify; if before_plan, the event is before_plan).specify/extensions/git/git-config.yml for the auto_commit sectionauto_commit.default if no event-specific key existsmessage if configured, otherwise a default messagegit add . + git commitDetermine the event name from the hook that triggered this command, then run the script:
.specify/extensions/git/scripts/bash/auto-commit.sh <event_name>.specify/extensions/git/scripts/powershell/auto-commit.ps1 <event_name>Replace <event_name> with the actual hook event (e.g., after_specify, before_plan, after_implement).
In .specify/extensions/git/git-config.yml:
auto_commit:
default: false # Global toggle — set true to enable for all commands
after_specify:
enabled: true # Override per-command
message: '[Spec Kit] Add specification'
after_plan:
enabled: false
message: '[Spec Kit] Add implementation plan'