git-sc is meant to be called by other tools. The Claude Code stop hook that commits after every agent turn is in the README; this page covers what else git-sc can take in or plug into.
When git-sc is used with claw-hooks, it automatically receives context about what the coding agent was working on via the CLAW_HOOKS_AGENT_MESSAGE environment variable. This context is included in the AI prompt, enabling the generated commit message to reflect the high-level intent rather than just describing the raw diff.
claw-hooks is a companion tool that manages Claude Code's hook lifecycle. When its stop hook fires, it sets CLAW_HOOKS_AGENT_MESSAGE with the agent's last activity summary before invoking git-sc.
# Automatically set by claw-hooks stop hook
# CLAW_HOOKS_AGENT_MESSAGE="Refactored authentication to use JWT tokens"
git-sc -a -y -qWhen the environment variable is set, the prompt includes an <agent-context> block that guides the AI to prioritize the developer's intent. This applies to standard commit generation as well as --amend, --reword, --squash, and --generate-for.
Git-SC (Smart Commit) - Available on VS Code Marketplace