惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
T
ThreatConnect
SecWiki News
SecWiki News
F
Future of Privacy Forum
AWS News Blog
AWS News Blog
C
Cisco Blogs
A
Arctic Wolf
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Scott Helme
Scott Helme
V
V2EX
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
K
Kaspersky official blog
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
NISL@THU
NISL@THU
Microsoft Azure Blog
Microsoft Azure Blog
量子位
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
Security Latest
Security Latest
M
Microsoft Research Blog - Microsoft Research
Google Online Security Blog
Google Online Security Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
F
Fox-IT International blog
S
Security @ Cisco Blogs
博客园 - 司徒正美
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Comments on: Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 最新话题
GbyAI
GbyAI
Project Zero
Project Zero
腾讯CDC
T
Tailwind CSS Blog

DEV Community

My Skills Construí um motor ATS determinístico porque estava cansado de adivinhar por que meu currículo era rejeitado SCS-Lab1 — CloudTrail: Trail + S3 + KMS + Log Validation LuisCore MCP server — daily syndication · 2026-05-25 Cursor vs JetBrains Rider for C#/.NET in 2026: which to pay for I built a local-first movie recommender with Corrective-RAG (cited explanations, hybrid retrieval, runs entirely on Ollama) Scaling to 1 Million Users : Load Balancing & Caching Strategies How the Events Table That Looked Right Killed Our Queue Three Failures My AI Memory System Caught — And the Flaw It Revealed in Itself dotnet Framework life cycle tool LangGraph 워크플로우 템플릿 (v41) I built a free image compression API — no signup, just curl Designing TikTok from Scratch — A System Design Deep Dive PREDICTION-20260525-0007: boredom-with-asymmetric-leverage [2026-Q3 through 2027-Q3] [Boost] How to integrate the QuickBooks Invoice API in 2026 How I Cut My Anthropic API Bill by 50% With a Local Python Tool Vibe Coding Problems: 7 Visual Bugs AI Code Generators Always Ship Chinese AI Models 2026: The Agentic Revolution, Hardware Independence, and What It Means for Global Developers The Quiet AI War Inside Your Browser The 12-Line Anti-Bot Trick That Saved Our Airdrop Snapshot From Sybil Farms Building a production-ready SaaS dashboard in Next.js 16 — Recharts, TanStack Table, dark mode, and collapsible sidebar Why 2026 Belongs to Agentic AI (And How to Build Your First Local Agent) It Was 2024 When We Tried to Outsmart the Treasure Hunt Engine RAG 시스템 실전 구축 (v40) I Found a Tool That Generates a Complete .NET 8 or Java Spring Boot API From SQL Schema in 30 Seconds I Added a 4th Agent That Audits My Other Agents. It Caught My Strategist Procrastinating for 3 Weeks. Streaming LLM responses to the browser in Go (Server-Sent Events) How We Publish and Manage Educational Admission Updates at Scale on DailyAxom A prompt is not a conversation. It's a component contract. How to Pass the EAA 2025 Accessibility Audit — A Step-by-Step WCAG Checklist Building an Autonomous MCP Lead Generation System with Hermes Agent LangGraph 워크플로우 템플릿 (v40) How I Built 100 Browser-Based Image Tools With No Server (FFmpeg WASM, PDF-lib, AI Background Removal) Nginx CVE-2026-9256, AI Prompt Injection Defenses, and Claude AI Data Leak Demo Scaling RAG for 10M+ Docs, .md Agent Memory, & Claude Code for Motion Graphics Diagram as Code with draw.io DuckDB Delta, PostgreSQL 17 Migration, & SQLite Optimization Deep Dives Windows 11 Microsoft Account Login Recovery During Internet Restrictions The Linux Commands You Forgot Exist (And Why AI Workflows Make Them Relevant Again) Spec-Driven Development Without an IDE: I Generated NestJS, Go, Spring Boot, Laravel, and Rust Apps From a Single PRD File Components are states Edge SEO y Middleware: Cómo Interceptar a Googlebot y LLMs antes de llegar a tu Servidor Context window exceeded at turn 23. Here's how I track token usage without a tokenizer. My Hermes agent spent $3 before I noticed. Now it can't. My Hermes agent's stop condition was a 40-line if/elif chain. I replaced it with 3 lines. My agent kept hitting context limits. This one function fixed it. Create and configure Azure Firewall Your Hermes agent's audit log is leaking customer emails. Here's a 100-line lib that fixes that. My agent kept forgetting what it was doing. A scratchpad fixed it. I replaced 200 lines of ad-hoc state management in my Hermes agent with one object. Per-Key Rate Limiting for Agent Tool Calls: Stop One User From Breaking Everything Composable Output Guardrails: Filter Agent Responses Before They Reach Users Sanitize Your LLM Message Lists Before Every API Call Thread a Run ID Through Every Agent Call So You Can Debug Anything Normalize Provider Error JSON So Your Agent Can Actually Handle Failures Priority Queue for Agent Sub-Tasks: Stop Processing Low-Priority Work First Static Lint Rules for Your LLM Prompts (Before They Hit Production) tool-call-budgets: Stop Runaway Agent Loops Before They Hit Your Invoice Step Through Your Agent's Failures Like a Debugger The Simplest Stop Condition: A Hard Cap on Agent Loop Iterations Score Your Agent's Responses With a 0.0-1.0 Rubric (No LLM Judge Required) Fix Bad Structured Output by Feeding the Error Back to the Model Building an effective Storyblok Tool Plugin with SvelteKit How to Get Your Renault / Dacia Radio Code for Free RAG 시스템 실전 구축 (v39) Retraction — scrml’s Living Compiler I built a fitness app where the AI roasts you for eating pizza (and hypes you when you PR) The Top SaaS Founder Communities on Discord (Beyond the AI Hype) I Built a Production-Grade Async Job Queue from Scratch — Here's Everything That Actually Happened How to watch SMS from multiple Android phones in one iOS app We Didn’t Want Another AI Wrapper — So We Explored a High-Speed Hermes Orchestrator for Engineering Crews Multi-tenant além do TenantId: problemas reais e aprendizados em sistemas .NET After failing 23 times, I am sharing How I Actually Prepare for a Tech Interview Every Single Time Now. I built an app that works like a nutritionist for your brain. Here's what happened in 7 days. GoBadge Dynamic: From Module Stats to Universal Badges LangGraph 워크플로우 템플릿 (v39) The git Commands You Forgot Exist (And Why AI Workflows Make Them Relevant Again) Six Levels of MCP Servers One container to replace Grafana + Loki + Tempo + Prometheus The Request/Response Cycle, HTTP, Auth, JWT, OAuth & Sessions — Explained Properly Python Week 3: We Stopped Repeating Ourselves (Loops!) Creating a Custom Grid Editor tool in Unreal Engine 我做了个付费 Telegram bot。Telegram Stars 实际给开发者多少钱,我算了一笔账。 I Got 96% Recall on LLM Hallucination Detection With No ML Model – Just 50 Lines of Python A practitioner's guide to getting more value out of AI coding: agent quality & token optimization How to Handle Telegram Albums in Telegraf I Built a Multilingual Spam Detection Dataset with 149K+ Messages Across 23 Languages How to Handle Telegram Albums in grammY RAG 시스템 실전 구축 (v38) Beyond Pip Install: Why Your AI Agent Needs a "Hermetic" Life-Support System to Survive Resume Building using HTML & CSS SpecFlow: Multi-Agent SDD in Cursor (4 phases, /approve, single code writer) Running ASR for smart homes in the NPU of Intel processors "Building a CI/CD Pipeline From Scratch: A Practical Guide for Developers (with GitHub Actions)" SpecFlow: SDD multi-agente en Cursor (4 fases, /approve, un solo escritor de código) How to Extract Your Full Team Hierarchy from HubSpot (the API doesn't expose it) Adobe Commerce Cloud now costs $40k/year. We migrated from Adobe Commerce to Magento Open Source — here's the honest breakdown .klickd v4.0.0 — Portable AI memory with constraints, strict schemas, and test vectors We Trust Third Party Code, It’s Time to Trust AI Generated Code
How I Use AI as a Senior Engineer
Kengineering · 2026-05-26 · via DEV Community

How I Use AI as a Senior Engineer for Code Reviews (25 Prompts That Actually Work)

Tags: #ai #codereview #productivity #webdev


I've been using AI for code reviews for over a year. In that time I've learned one uncomfortable truth:

Most developers are using AI wrong for code reviews.

They paste code and ask "is this good?" They get back a wall of generic feedback that could apply to literally any codebase. It feels useful for about 10 seconds, then you realize nothing actionable came out of it.

The problem isn't the AI. It's the prompt.

After hundreds of iterations, I've identified the patterns that separate a mediocre AI code review from one that actually finds bugs, catches security holes, and suggests fixes a senior engineer would be proud of.

Here's what I learned — and the exact prompts I now use daily.


Why Most AI Code Review Prompts Fail

When you ask AI a vague question, you get a vague answer. This is especially true for code review because the AI has no context about:

  • What "good" means for your team
  • What severity of issues matter to you
  • What you already know vs. what you need explained
  • What the code is supposed to do

A great code review prompt gives the AI a role, a framework, and a specific output format. When you do that, the results are night and day.


The Anatomy of a Prompt That Works

Every high-quality code review prompt has three parts:

1. A role — "You are a senior engineer with 15 years of experience..."
This primes the model to respond with depth and specificity, not generic advice.

2. A framework — tell it exactly what to look for and in what order.
Security issues? Performance? Readability? All three? Be explicit.

3. A structured output — "For each issue provide: severity, line reference, what's wrong, and a fix."
Without this, you get an essay. With it, you get an actionable list.


5 Prompts I Use Every Week

Here are five from my collection. These are copy-paste ready — just fill in the brackets.


1. The Senior Engineer Review

Use this as your default. It gives you a structured pull request review with severity levels and concrete fixes.

You are a senior software engineer with 15+ years of experience. Review the following code as if you were doing a thorough pull request review for a production system.

For each issue you find, provide:
1. Severity (Critical / Major / Minor / Nitpick)
2. Line or section reference
3. What's wrong and why it matters
4. A concrete fix with example code

After the issue list, give an overall score (1–10) and a 2-sentence summary of the code's strengths.

Code to review:
[PASTE CODE HERE]

Language/framework context: [e.g. Python 3.11, FastAPI]

Enter fullscreen mode Exit fullscreen mode


2. Security Vulnerability Scanner

This one's saved me twice from shipping auth bugs to production.

Act as a security-focused code auditor. Analyze the following code specifically for security vulnerabilities.

Check for (but don't limit yourself to):
- Injection attacks (SQL, command, LDAP)
- Authentication/authorization flaws
- Sensitive data exposure
- Hardcoded secrets or credentials
- Input validation gaps

For each vulnerability found:
- Name the vulnerability type (use OWASP naming where applicable)
- Explain the attack vector
- Show the vulnerable code snippet
- Provide a secure replacement

End with a risk rating: Low / Medium / High / Critical.

Code:
[PASTE CODE HERE]

Enter fullscreen mode Exit fullscreen mode


3. Performance Bottleneck Finder

Perfect for spotting N+1 queries and O(n²) nightmares before they hit prod.

You are a performance engineering expert. Analyze the following code for performance issues and optimization opportunities.

Focus on:
- Time complexity (provide Big-O analysis)
- Unnecessary loops or redundant operations
- Database query inefficiencies (N+1 problems, missing indexes)
- Caching opportunities

For each issue: explain the problem, estimate the performance impact (low/medium/high), and show an optimized version.

Code:
[PASTE CODE HERE]

Context: [expected data volume, latency requirements]

Enter fullscreen mode Exit fullscreen mode


4. The Rubber Duck Debugger

When you're stuck on a bug and need a structured way out.

I'm going to describe a bug. Help me debug it systematically like a senior engineer who has seen everything.

Walk me through:
1. Likely root causes ranked by probability
2. Specific questions I should answer to isolate the issue
3. Diagnostic steps in order
4. Common gotchas in this area I might be overlooking
5. The most likely fix based on the symptoms

Bug description: [DESCRIBE THE BUG]
Relevant code: [PASTE CODE IF AVAILABLE]
Environment: [language, framework, recent changes]

Enter fullscreen mode Exit fullscreen mode


5. The 5 Whys Root Cause Analyst

For bugs that keep coming back. Gets to the real issue, not just the symptom.

Apply the "5 Whys" technique to this bug to find the true root cause.

Walk through:
Why 1: Why did the bug happen? (immediate cause)
Why 2: Why did [Why 1] happen?
...and so on to Why 5.

Then provide:
- The systemic fix that prevents recurrence
- Process or tooling improvements to catch this class of bug earlier

Bug description: [DESCRIBE THE BUG IN DETAIL]

Enter fullscreen mode Exit fullscreen mode


Tips for Getting Even Better Results

Provide context generously. The more the AI knows about your stack, team size, and constraints, the more relevant its feedback.

Ask for one thing at a time. Don't ask for a security review AND a performance review AND a readability audit in one prompt. Run them separately and compare.

Iterate on the output. If a suggestion doesn't fit your codebase, push back: "That fix won't work because we use X. What's an alternative?"

Use the feedback to learn. When AI flags something you didn't notice, understand why it's a problem. This is how your actual engineering instincts improve over time.


Want All 25 Prompts?

I've put together a full pack covering:

  • Code review (readability, architecture, API design, tech debt, test coverage gaps)
  • Debugging (error decoding, memory leaks, production incidents, flaky tests, log analysis)

All model-agnostic — works with Claude, ChatGPT, Gemini, or whatever you use.

Grab the full pack here: [MY LEMON SQUEEZY LINK]


If this was useful, drop a ❤️ or share it with your team. Happy shipping.