Hey,

Issue #011. Let's get into it.

---

⚙️ **AI TOOL OF THE WEEK: Claude as a Code Reviewer**

GitHub Copilot summarizes your pull request. It won't tell you the logic is broken, the auth check is missing, or that you forgot to handle the error case. Claude will.

Here's the system prompt, the Python script, and the GitHub Actions integration.

**The problem:** Linting catches style. Tests catch regressions. Neither catches logic errors — the stuff that actually causes incidents. A missing null check. A race condition. An auth bypass hiding in plain sight. Human reviewers catch these when they have time and focus. An AI reviewer reads every diff the same way at 2am as it does at 9am.

**The system prompt:**

```
You are a senior software engineer reviewing a pull request. Your job is to identify:
- Logic errors that could cause incorrect behavior
- Security vulnerabilities (auth bypasses, injection risks, insecure defaults)
- Missing error handling
- Race conditions or concurrency issues
- Missing or inadequate tests

For each issue found, state the file and line, describe the problem, and suggest a fix. Be direct. If the code looks correct, say so. Do not summarize what the code does unless it helps explain a problem.
```

That's the whole product. Four categories. Direct output. No summaries of code you already wrote.

**The script (20 lines of Python):**

```python
import subprocess
import anthropic
import sys

SYSTEM_PROMPT = """You are a senior software engineer reviewing a pull request..."""  # full prompt above

def review_pr(base_branch="main"):
    diff = subprocess.check_output(
        ["git", "diff", f"{base_branch}...HEAD"],
        text=True
    )
    if not diff.strip():
        print("No changes to review.")
        return

    client = anthropic.Anthropic()
    message = client.messages.create(
        model="claude-opus-4-5",
        max_tokens=2048,
        system=SYSTEM_PROMPT,
        messages=[{"role": "user", "content": f"Review this diff:\n\n{diff}"}]
    )
    print(message.content[0].text)

if __name__ == "__main__":
    base = sys.argv[1] if len(sys.argv) > 1 else "main"
    review_pr(base)
```

Run it locally before pushing: `python3 review_pr.py main`

**GitHub Actions integration:** One workflow file. Trigger on PR open/update. Run the script. Post the output as a PR comment. Every PR gets a Claude review before any human looks at it.

**What it catches:** Logic errors, missing error handling, obvious security issues, inconsistent patterns. **What it misses:** Business logic it doesn't have context for, performance issues requiring profiling. Use it as a first pass — it clears the obvious stuff so humans focus on the hard stuff.

**The cost:** 2–5K tokens per typical PR diff. Fraction of a cent each. Ten PRs a day = ~$0.50. Team of ten engineers = ~$5/day for an always-on senior reviewer.

Full script + workflow file on GitHub: github.com/mttaylor/deployordiecontent

---

💰 **MONEY MOVE: Sell the Integration**

"I'll set up an AI code review bot for your team." Fixed-price offer.

Deliverables: system prompt tuned for their stack, Python script configured and tested, GitHub Actions workflow deployed, 30-day support. One day of work. $1,000–$1,500.

Every engineering team with more than three people is a prospect. The ROI is immediate and obvious. Use the offer template from EP009.

---

⛓️ **CRYPTO/WEB3 SIGNAL**

Smart contract audits are expensive ($20K–$100K for a full audit) and slow (weeks). AI-assisted pre-audit reviews are becoming a real category — teams using Claude or GPT-4 to do a first-pass review before the paid audit. Catches the obvious stuff, reduces audit scope, reduces cost. If you're building in Web3, this is worth adding to your pre-audit workflow today.

---

🔗 **3 LINKS WORTH YOUR TIME**

[EP011 code review bot on GitHub](https://github.com/mttaylor/deployordiecontent) — script, prompt, workflow file

[Anthropic Claude API docs](https://docs.anthropic.com) — pricing, models, API reference

[EP001 — the original release automation](https://newsletter.deployordie.io/p/automated-release-notes-with-claude) — where the Claude + CI pipeline journey started

---

That's Issue #011.

Forward it to one engineer. Still the only growth strategy running.

— Deploy or Die

Keep reading