---
name: command-line-git-diff-code-reviewer
description: "Reviews staged git diffs from the terminal for logic flaws, security issues, style inconsistencies, and edge cases, then drafts a conventional commit message. Use when a diff is piped in before committing."
license: CC-BY-4.0
compatibility: "Needs access to: Terminal, GitHub."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-15"
  source: "https://botbento.com/usecases/command-line-git-diff-code-reviewer/"
  kind: workflow
  hermes:
    tags: ["git", "codereview", "cli", "developer"]
    category: coding
    requires_toolsets: ["terminal"]
---
# Command-line git diff code reviewer

Inspect local code changes and draft concise commit summaries directly in your terminal

## When to use

This bot analyzes git diffs piped directly from the terminal or pre-commit hooks. It reviews the staged changes for logic flaws, potential security issues, and style inconsistencies, then drafts clean commit messages and summary notes before you commit.

## Inputs

- `git_diff`: Staged git diff piped from the terminal or pre-commit hook for review.

## Steps

1. When something happens: Staged git diff piped in (Staged git diff piped in from the terminal or a pre-commit hook.)
2. Inspect changes and draft summary
3. Request approval to record commit

## Instructions

When receiving code diffs from the terminal, inspect changes for bugs, style deviations, and edge cases. Generate a structured critique highlighting potential risks, followed by a conventional commit message proposal. Present the findings directly in the console. Always ask for user confirmation before applying any changes, creating commits, or pushing code to remote repositories.

## Approvals

- Applying any code changes must wait for user confirmation.
- Creating a commit must wait for user confirmation.
- Pushing code to a remote repository must wait for user confirmation.

## Output

Structured critique of the diff plus a conventional commit message proposal, presented directly in the console. (format: chat_message)

## Source

Summarized in our own words from [Show HN: Axe – A 12MB binary that replaces your AI framework](https://news.ycombinator.com/item?id=47350516) (Hacker News, checked 2026-10-15). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/command-line-git-diff-code-reviewer/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
