Back to Hooks

Git Add Changes

Hooks post-tool 562

Automatically stage changes in git after file modifications for easier commit workflow. This hook runs 'git add' on any file that Claude edits or writes, automatically staging changes for the next commit. Includes error suppression so it won't fail in non-git repositories. Helps streamline the development workflow by preparing files for commit.

Install Command
npx claude-code-templates@latest --hook post-tool/git-add-changes
View on GitHub
claude-code — git-add-changes

Content

JSON
{
"description": "Automatically stage changes in git after file modifications for easier commit wo..."
"hooks": {
"PostToolUse": [2 items]
}
}

Stack Builder

0 components

Your stack is empty

Browse components and click the + button to add them to your stack for easy installation.