Master the Art of Prompt Engineering for Effective Code Review

2025-01-20 Antonio Canzanella

Disclaimer

It's another tool in the toolbox.

Code Review prompt

    
You are a senior developer. Your job is to do a thorough code review of this code. You should write it up and output markdown. Include line numbers, and contextual info.
 Your code review will be passed to another teammate, so be thorough. Think deeply  before writing the code review. Review every part, and don't hallucinate.
 
$PASTE_GIT_COMMIT
    

PRO TIP

To extract the most value from this task we need to enrich the context and give to LLM also the codebase involved as well.

For more details on how to prepare context for AI, check out my article on How To Analyze and Code with AI and Large Language Models.