Who it is forA developer who wants a quick AI code review of a branch before opening a pull request.
The problemSending the whole repo for a review wastes tokens and buries the actual change.
The outcomeA focused prompt with the diff, log or branch comparison plus your review template.
What you need first
- Cargo, Homebrew, or pip for the Python SDK; binaries are also on the releases page
- Git, Rust and Cargo only if you build from source
- Optional: the wayland feature flag for clipboard support on Wayland systems
Steps
- Install with
cargo install code2promptorbrew install code2prompt - Use the Git Integration options to include diffs, logs or branch comparisons in the prompt
- Write a Handlebars template with your review checklist so every review asks the same questions
- Use the TUI to configure options interactively if you do not remember the flags
- Send the prompt to your LLM and treat its comments as suggestions
Prompt for your agent
Using mufeedvh/code2prompt, create a prompt for reviewing the changes on my branch <branch> against <base>, using a Handlebars template that asks for bugs, missing tests and security issues. Save it to review.txt and give me the command you used.
Caveat. The README points to the online docs for the exact git and template flags, so check them for your version.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mufeedvh/code2prompt and "Build a review prompt from your git changes"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer