log · syahiidkamil — Claude Code command: what it does, how to install
log inspects recent git commits, summarizes their themes, and maps them against uncommitted changes in your working tree.
no license ★ 406 updated 2026-06-25
.claude/commands/log.mdWhat log does
The command triggers git log, git status --short, and git diff --stat HEAD through Bash simultaneously. It prints the raw commit log output before adding anything else. Next, Claude clusters the commits by topic, such as bug fixes or refactoring chores, into two to four bullets.
When staged or unstaged edits touch files from recent commits, the command evaluates the overlap. It flags whether ongoing changes align with earlier commits or revert them, and it warns about structural conflicts. Without a git repository, the script fails.
What it helps with
- review recent git history alongside uncommitted workspace modifications
- categorize git commits by functional area or change type
- spot potential merge risks between fresh refactors and active diffs
Example prompts for the agent
- /log
- /log 10
- Run /log 3 to inspect our recent history
How to install log
Manually: put the files in place
.claude/commands/log.mdCall it with /log. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/log.mdCall it with /prompts:log. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/log.prompt.mdManually: put the files in place
.gemini/commands/log.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about log
How to install log in Claude Code?
Save the command definition file to .claude/commands/log.md. Claude Code will automatically detect it in your project.
How many commits does log inspect by default?
It evaluates 5 commits whenever invoked without an argument or with a non-positive number.
What happens when working files do not touch recent commits?
The assistant prints No overlap between recent commits and current working state. and stops without running extra commands.
Similar slash commands
All slash commands for Git and GitHub →log by other authors comes first.