<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harshit Singh</title>
    <description>The latest articles on DEV Community by Harshit Singh (@samtan69).</description>
    <link>https://dev.to/samtan69</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3907255%2F87cd4226-fb1c-42b6-8c1f-ef11f68e3347.jpeg</url>
      <title>DEV Community: Harshit Singh</title>
      <link>https://dev.to/samtan69</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samtan69"/>
    <language>en</language>
    <item>
      <title>I Built an AI-Powered Code Reviewer in Python (And What Broke Along the Way)</title>
      <dc:creator>Harshit Singh</dc:creator>
      <pubDate>Fri, 01 May 2026 09:10:40 +0000</pubDate>
      <link>https://dev.to/samtan69/i-built-an-ai-powered-code-reviewer-in-python-and-what-broke-along-the-way-33gc</link>
      <guid>https://dev.to/samtan69/i-built-an-ai-powered-code-reviewer-in-python-and-what-broke-along-the-way-33gc</guid>
      <description>&lt;p&gt;As a backend engineer working on enterprise systems, I spend a lot of time thinking about security — credential rotation, access control, encryption. So when I decided to build a side project, I wanted it to be something that actually solves a real problem I face daily: catching security issues in code before they reach production.&lt;/p&gt;

&lt;p&gt;The result: an AI-powered code review tool that automatically analyzes your git diffs and flags vulnerabilities, bugs, and bad practices — in seconds.&lt;/p&gt;

&lt;p&gt;Here's exactly how I built it, what broke, and what I learned.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Manual code review is slow and inconsistent. You might catch a hardcoded password on a good day and miss a SQL injection vulnerability on a bad one. I wanted a tool that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs automatically after every commit&lt;/li&gt;
&lt;li&gt;Catches security issues I might miss when tired&lt;/li&gt;
&lt;li&gt;Gives specific, actionable feedback — not generic warnings&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt; — for scripting and LLM integration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Groq API&lt;/strong&gt; — free LLM API running LLaMA 3.3 70B&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git&lt;/strong&gt; — to extract code diffs automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Actions&lt;/strong&gt; — to run the pipeline on every push&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker&lt;/strong&gt; — to containerize the whole thing&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The core idea is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;git diff HEAD~1 HEAD&lt;/code&gt; to get the latest code changes&lt;/li&gt;
&lt;li&gt;Send the raw diff to an LLM with a structured prompt&lt;/li&gt;
&lt;li&gt;Print the AI's feedback directly in the terminal
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_diff&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;diff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;check_output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;git&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;diff&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;HEAD~1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;HEAD&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;STDOUT&lt;/span&gt;
    &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;diff&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;review_code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Groq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;You are a senior software engineer reviewing a pull request.
Analyze this code diff and provide feedback on:
1. Security vulnerabilities
2. Bugs or logical errors
3. Performance issues
4. Best practices violations

Code diff:
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;diff&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;llama-3.3-70b-versatile&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
        &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt engineering here matters more than you'd think. Asking the model to be "specific and actionable" and to "reference exact line changes" produces dramatically better output than a vague "review this code."&lt;/p&gt;




&lt;h2&gt;
  
  
  What the Output Looks Like
&lt;/h2&gt;

&lt;p&gt;I tested it on a deliberately vulnerable file containing a hardcoded password and a SQL injection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;admin123&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT * FROM users WHERE id=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AI caught both immediately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Security Vulnerabilities:
1. Hardcoded password 'admin123' detected on line 2.
   Recommendation: Use environment variables or a secrets manager like HashiCorp Vault.

2. SQL Injection vulnerability on line 3.
   The query is constructed via string concatenation with user input.
   Recommendation: Use parameterized queries instead.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exactly what a senior engineer would flag in a real review.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Broke Along the Way
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problem 1: The Deprecated Library Trap
&lt;/h3&gt;

&lt;p&gt;I started with &lt;code&gt;google-generativeai&lt;/code&gt; for Gemini. First run threw a &lt;code&gt;FutureWarning&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;All support for the google.generativeai package has ended.
Please switch to the google.genai package.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google had deprecated the library mid-project. Switched to &lt;code&gt;google-genai&lt;/code&gt;, hit quota limits immediately. Switched to Groq. Lesson: always check the library's GitHub issues before building on a free API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 2: Windows BOM Encoding
&lt;/h3&gt;

&lt;p&gt;This one took an hour to debug. My &lt;code&gt;.env&lt;/code&gt; file was being read as &lt;code&gt;None&lt;/code&gt; despite existing right next to my script.&lt;/p&gt;

&lt;p&gt;Turned out Windows Notepad saves files with a hidden BOM (Byte Order Mark) — &lt;code&gt;ï»¿&lt;/code&gt; — prepended to the file. Python's &lt;code&gt;dotenv&lt;/code&gt; library couldn't parse it.&lt;/p&gt;

&lt;p&gt;Running &lt;code&gt;Get-Content .env | Format-Hex&lt;/code&gt; revealed the culprit immediately. Fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;System.IO.File]::WriteAllText&lt;span class="o"&gt;(&lt;/span&gt;
  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="s2"&gt;env"&lt;/span&gt;,
  &lt;span class="s2"&gt;"GROQ_API_KEY=your-key&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;n&lt;span class="s2"&gt;",
  [System.Text.UTF8Encoding]::new(&lt;/span&gt;&lt;span class="nv"&gt;$false&lt;/span&gt;&lt;span class="s2"&gt;)
)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;$false&lt;/code&gt; parameter explicitly disables BOM. Small thing, easy to miss.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 3: Git Diff Returning Binary Files
&lt;/h3&gt;

&lt;p&gt;PowerShell's &lt;code&gt;echo&lt;/code&gt; command writes files in UTF-16 by default. Git treats UTF-16 files as binary and won't diff them. So my reviewer was receiving an empty diff and the AI was responding with generic advice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;Binary files a/sample.py and b/sample.py differ
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fix: use &lt;code&gt;Set-Content&lt;/code&gt; with explicit UTF-8 encoding instead of &lt;code&gt;echo&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Adding a CI/CD Pipeline
&lt;/h2&gt;

&lt;p&gt;Once the core tool worked, I wired it into GitHub Actions so it runs automatically on every push:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CI/CD Pipeline&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build-and-push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-python@v5&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;python-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.11'&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pip install groq python-dotenv&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docker/login-action@v3&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DOCKER_USERNAME }}&lt;/span&gt;
          &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DOCKER_PASSWORD }}&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docker build -t yourusername/ai-pr-reviewer:latest .&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docker push yourusername/ai-pr-reviewer:latest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every commit now automatically builds a fresh Docker image and pushes it to Docker Hub. No manual steps.&lt;/p&gt;




&lt;h2&gt;
  
  
  Keeping the API Key Safe
&lt;/h2&gt;

&lt;p&gt;Never hardcode API keys. Never. I learned to use a &lt;code&gt;.env&lt;/code&gt; file excluded via &lt;code&gt;.gitignore&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="c"&gt;# .gitignore
&lt;/span&gt;&lt;span class="err"&gt;.env&lt;/span&gt;
&lt;span class="err"&gt;__pycache__/&lt;/span&gt;
&lt;span class="err"&gt;*.pyc&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And load it in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dotenv&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dotenv&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="nf"&gt;load_dotenv&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GROQ_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For GitHub Actions, secrets go in &lt;strong&gt;Settings → Secrets and variables → Actions&lt;/strong&gt; — never in the workflow file itself.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I'd Add Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub PR integration&lt;/strong&gt; — post review comments directly on pull requests via the GitHub API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Severity scoring&lt;/strong&gt; — tag findings as Critical / Warning / Info&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-file support&lt;/strong&gt; — currently reviews one diff at a time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom rules&lt;/strong&gt; — let teams define their own coding standards in a config file&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;The full project is on GitHub: &lt;a href="https://github.com/harshit19424/ai-pr-reviewer" rel="noopener noreferrer"&gt;github.com/harshit19424/ai-pr-reviewer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setup takes under 5 minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/harshit19424/ai-pr-reviewer.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ai-pr-reviewer
pip &lt;span class="nb"&gt;install &lt;/span&gt;groq python-dotenv
&lt;span class="c"&gt;# Add your Groq API key to .env&lt;/span&gt;
python reviewer.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Groq is free — no credit card required. Get your key at console.groq.com.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt engineering matters.&lt;/strong&gt; Specific instructions produce specific output. Vague prompts produce generic advice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free APIs have hidden limits.&lt;/strong&gt; Always test quota limits before building.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows encoding is a minefield.&lt;/strong&gt; Always specify UTF-8 without BOM explicitly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD is not optional.&lt;/strong&gt; Automating the build and push took 30 minutes and saves time on every future commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're a backend engineer who hasn't integrated an LLM into a workflow yet — this is the simplest possible starting point. The whole core script is under 50 lines of Python.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm a Software Engineer at Jio Platforms working on enterprise security systems. Connect with me on &lt;a href="https://linkedin.com/in/harshit-singh2000" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or check out my projects on &lt;a href="https://github.com/harshit19424" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>devops</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
