P
💻DeveloppementIntermediateAll AIs

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.

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

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

Review a pull request before merging to productionAudit legacy code before a major refactoringVerify the security of a critical module before deploymentTrain junior developers by showing areas for improvement

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.

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Pour maximiser la pertinence, précisez le langage et le framework (ex: Python/Django). Ce prompt fonctionne mieux avec des codes de taille modérée (< 500 lignes). Utilisez-le comme une première passe, puis validez manuellement les points critiques. Ajoutez "Ignore les commentaires" si le code est commenté.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementIntermediateAll AIs

Kubernetes Cloud Cost Optimization

Reduce Kubernetes costs

0289
💻DeveloppementIntermediateAll AIs

Write a CloudFormation template

Write CloudFormation templates

0286
💻DeveloppementIntermediateAll AIs

Sora Prompt for Creating Software Architecture

Sora, OpenAI's video generation model, opens up unprecedented perspectives for visualizing software architectures. Where static diagrams struggle to convey the complexity of data flows, microservices interactions, or deployment patterns, Sora enables the creation of dynamic visual animations that bring your systems to life. Whether you are preparing a presentation for non-technical stakeholders, documenting a complex distributed architecture, or wish to illustrate the path of a request through the different layers of your application, Sora transforms your textual descriptions into clear and professional explanatory videos. By combining precise instructions on components, flows, and interactions, you obtain animated visualizations that make the abstract tangible. This guide provides you with optimized prompts for generating visual representations of software architectures with Sora, from simple animated diagrams to complete simulations of a distributed production system.

0327
💻DeveloppementIntermediateChatGPT

Prompt ChatGPT to Create E2E Tests

End-to-end (E2E) tests are essential to ensure an application works as a whole, but writing them is often time-consuming and repetitive. ChatGPT can significantly speed up this process by generating complete test scenarios covering critical user paths, edge cases, and necessary assertions. Whether you use Cypress, Playwright, Selenium, or any other framework, AI can produce structured and maintainable tests from a simple functional description. The challenge is to provide a sufficiently precise prompt to obtain realistic tests that follow best practices (stable selectors, async handling, test isolation) and integrate directly into your CI/CD pipeline. In this guide, you'll find an optimized main prompt along with variants adapted to your expertise level, to turn your functional specifications into robust E2E test suites in seconds.

0304