AI-Assisted Complete Code Review
A complete prompt to get an in-depth code review covering bugs, security, performance, readability, and best practices, with concrete fixes.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Tu es un reviewer de code senior avec 15 ans d'expérience en développement logiciel. Analyse le code suivant écrit en [LANGAGE] et fournis une review complète et structurée. Code à analyser : ``` [CODE_A_REVIEWER] ``` Contexte du projet : [CONTEXTE_PROJET] Réalise ta review en suivant ces axes d'analyse : 1. **Bugs et erreurs logiques** : Identifie tout bug potentiel, cas limites non gérés, conditions de course ou comportements indéfinis. 2. **Sécurité** : Détecte les vulnérabilités (injection SQL, XSS, gestion des secrets, validation des entrées, failles OWASP Top 10). 3. **Performance** : Repère les problèmes de complexité algorithmique, fuites mémoire, requêtes N+1, opérations bloquantes ou optimisations manquées. 4. **Lisibilité et maintenabilité** : Évalue le nommage des variables et fonctions, la structure du code, le respect des conventions du langage et la clarté de la logique. 5. **Bonnes pratiques** : Vérifie l'application des principes SOLID, DRY, KISS, la gestion des erreurs, le logging et la testabilité. 6. **Tests** : Suggère les cas de tests unitaires et d'intégration manquants. Pour chaque problème trouvé : - Attribue une sévérité : 🔴 Critique, 🟡 Important, 🟢 Suggestion - Cite la ligne ou le bloc concerné - Explique pourquoi c'est un problème - Propose une correction avec un exemple de code corrigé Termine par un résumé avec une note globale sur 10 et les 3 actions prioritaires à entreprendre.
Why this prompt works
<p>This prompt transforms AI into a senior code reviewer capable of analyzing your code from multiple critical angles. By specifying the <strong>programming language</strong>, <strong>source code</strong>, and <strong>project context</strong>, you get a targeted and relevant analysis rather than a generic review.</p><p>The six-axis analysis structure ensures exhaustive coverage: from obvious bugs to subtle security flaws, through performance and maintainability issues. The severity system (<strong>Critical, Important, Suggestion</strong>) lets you prioritize fixes and focus on what really matters.</p><p>To maximize review quality, provide detailed project context: is it a <strong>production API endpoint</strong>, a <strong>data migration script</strong>, or a <strong>frontend component</strong>? The more precise the context, the more the recommendations will be adapted to your real situation.</p>
Use Cases
Expected Output
A structured code analysis with issues classified by severity, clear explanations for each point, and corrected code examples, followed by a summary with an overall score and priority actions.
Learn more
Check the full skill on Prompt Guide to master this technique from A to Z.
View on Prompt Guide📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Similar Prompts
Implement Robust Error Handling in Node.js
Create a professional Node.js error handling architecture with custom error classes, centralized middleware, and monitoring.
Create a Python Automation Script
Create a professional Python automation script with CLI configuration, structured logging, error handling, and tests.
Set Up Application Observability
Implement the three pillars of observability (logs, metrics, traces) with OpenTelemetry, Prometheus, and Grafana dashboards.
Automatically Generate Unit Tests with AI
Automatically generate an exhaustive unit test suite covering nominal cases, edge cases, and error cases for any source code.