Prompt lesson · 27 prompts
Code Review and Analysis prompts for Software Developers
27 ready-to-use prompts from our AI for Software Developers course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Analyze Code Dependencies for Conflicts
Use this when you need to analyze code dependencies in a project to identify conflicts, version mismatches, or circular dependencies.
Role — You are a senior software architect specializing in dependency management. Your goal is to analyze a project's dependency graph and pinpoint version conflicts, security vulnerabilities, and circular dependencies.
Context you provide
- {{project_language}}: The programming language (e.g., Python, Node.js, Java).
- {{dependency_files}}: List of relevant files (e.g., requirements.txt, package.json, pom.xml).
- {{specific_concerns}}: Any known issues or areas of focus (e.g., recent updates, breaking changes).
Instructions
- If the project language or dependency files are missing, ask for them before proceeding.
- Parse the provided dependency information (you can simulate reading file contents given in the prompt).
- Identify conflicts: incompatible versions, transitive dependency clashes, outdated packages.
- Flag security vulnerabilities by referencing known CVEs (if publicly available).
- Suggest resolutions: version pinning, dependency updates, or alternative packages.
- Provide a summary of the most critical issues and recommended actions.
Output format A structured report with sections: Conflict Summary, Vulnerabilities, Recommended Changes. Use tables for clarity. Keep the tone technical but clear.
Guardrails
- Do not execute any code or access external databases; rely on the information provided.
- Do not invent specific vulnerability details; if a library is known to have CVEs, mention it generically.
- Stay within dependency analysis; do not refactor the codebase.
Example
- Project language: Python
- Dependency files: requirements.txt (numpy==1.19.5, pandas==1.2.0, scipy==1.6.0) and setup.py
- Specific concerns: Recent upgrade of numpy to 1.21.0 caused a conflict with scipy
Open this prompt Analysis · Advanced
Analyze Test Coverage and Identify Gaps
Use this when you need to build a system or process to analyse test coverage in your codebase and identify areas lacking proper testing.
Role You are a senior QA engineer and automation specialist who designs systems to analyse code coverage and produce actionable insights for development teams. Your goal is to help teams improve test coverage efficiently.
Context you provide
- {{codebase_language}} – programming language(s) used (e.g., Python, Java, TypeScript).
- {{testing_framework}} – existing test framework (e.g., pytest, JUnit, Jest).
- {{coverage_tool}} – any coverage tool already in use (e.g., coverage.py, JaCoCo, Istanbul).
- {{areas_of_concern}} – specific modules or features that are suspected to be under‑tested.
- {{integration_requirements}} – must the system integrate with CI/CD pipelines, or be a standalone script?
Instructions
- Ask for any missing context before starting.
- Outline a system design that includes:
- Data collection (parsing coverage reports, extracting metrics).
- Analysis logic (identifying low‑coverage files, untested branches, conditional gaps).
- Output generation (report or dashboard with prioritised recommendations).
- Provide a step‑by‑step implementation plan, including code snippets where relevant.
- Suggest how to handle false positives (e.g., generated code, test helpers).
- Recommend how to incorporate the analysis into the development workflow (e.g., CI gating, periodic reports).
Output format A detailed design document:
- System overview (architecture diagram in text).
- Data collection and processing pipeline.
- Analysis algorithms and thresholds.
- Example output (e.g., a sample report).
- Implementation roadmap (short‑ and long‑term).
- Tone: technical and precise, suitable for an engineering team.
Guardrails
- Do not assume any specific third‑party service; propose open‑source or self‑contained solutions.
- Flag any assumptions about the codebase structure (e.g., monorepo vs. multi‑repo).
- Avoid recommending a single tool without alternatives; present options.
Example {{codebase_language: "Python"}} {{testing_framework: "pytest"}} {{coverage_tool: "coverage.py"}} {{areas_of_concern: "API endpoints, data processing pipeline"}} {{integration_requirements: "must run in GitHub Actions and produce a PR comment"}}
Open this prompt Analysis · Advanced
Automated Documentation Generation
Use this when you need to design a tool or approach that automatically generates documentation from a codebase, reducing manual effort.
Open this prompt Automation · Advanced
Bug Prediction Model Development Guide
Use this when you want to build a bug prediction model using historical code and defect data.
Open this prompt Planning · Advanced
Code Architecture Analysis
Use this when you need to analyze a codebase's architecture, identify design patterns, and get recommendations for improving modularity, extensibility, and maintainability.
Open this prompt Analysis · Advanced
Code Consistency Enforcement
Use this when you need to establish or enforce consistent naming conventions and coding patterns across your codebase.
Open this prompt Coding · Intermediate
Code Dependency Analysis and Conflict Resolution
Use this when you need to analyze code dependencies for potential issues, conflicts, or compatibility problems.
Open this prompt Analysis · Advanced
Code Dependency Analysis and Risk Assessment
Use this when you need to analyze external dependencies in a codebase for compatibility, security, and impact.
Open this prompt Analysis · Advanced
Code Documentation Quality Review
Use this when you need to review code comments and documentation for accuracy, completeness, and clarity, and get suggestions for improvement.
Open this prompt Analysis · Intermediate
Code Efficiency Optimization
Use this when you need to optimize code for performance, reducing memory usage or execution time.
Open this prompt Coding · Intermediate
Code Maintainability Assessment
Use this when you need to evaluate the maintainability of a code snippet and receive specific recommendations for improvement.
Open this prompt Analysis · Intermediate
Code Modularity Assessment
Use this when you need to evaluate the modularity of a code snippet and get suggestions for improving organization and reusability.
Open this prompt Analysis · Intermediate
Code Performance Analysis and Optimization
Use this when you need to analyze a code snippet's performance metrics and suggest optimizations to improve execution speed or resource usage.
Open this prompt Analysis · Advanced
Code Performance Analysis and Optimization
Use this when you need to identify performance bottlenecks and get optimization suggestions for your codebase.
Open this prompt Analysis · Intermediate
Code Quality Metrics Tool Design
Use this when you need to design a tool that analyzes code quality metrics such as cyclomatic complexity and integrates with existing workflows.
Open this prompt Analysis · Advanced
Code Readability Review
Use this when you need to evaluate a code snippet for readability and get specific improvement suggestions.
Open this prompt Analysis · Intermediate
Code Reusability Evaluation and Refactoring
Use this when you need to evaluate a code snippet's reusability and get suggestions for making it more modular and adaptable.
Open this prompt Analysis · Intermediate
Code Review and Best Practices
Use this when you need to review code for security, performance, or readability issues and get improvement suggestions.
Open this prompt Analysis · Intermediate
Code Scalability Assessment
Use this when you need to assess the scalability of code for a web application, backend system, or mobile app, and propose enhancements to handle increased user load.
Open this prompt Analysis · Intermediate
Code Security Vulnerability Analysis
Use this when you need to analyze code snippets for security vulnerabilities like SQL injection, XSS, and authentication flaws.
Open this prompt Analysis · Intermediate
Code Style Check
Use this when you need to ensure your code adheres to established coding style guidelines.
Open this prompt Analysis · Intermediate
Code Style Consistency Enforcer
Use this when you need to enforce consistent coding style across a project by analyzing code for violations and suggesting fixes.
Open this prompt Analysis · Intermediate
Code Test Coverage Review
Use this when you need to review test coverage of a codebase and suggest improvements to ensure comprehensive testing.
Open this prompt Coding · Intermediate
Error Handling Code Review and Improvement
Use this when you need to analyze and improve the error handling mechanisms in your code.
Open this prompt Analysis · Intermediate
Seamless Software Integration
Use this when you need to plan and execute the integration of a new feature or third-party API into an existing system.
Open this prompt Planning · Advanced
Security Vulnerability Detection System Design
Use this when you want to design a system to detect security vulnerabilities in code using AI or rule-based approaches.
Open this prompt Analysis · Advanced
Version Control Best Practices Guide
Use this when you need to understand the importance of version control and learn best practices for integrating code with systems like Git.
Open this prompt Learning · Intermediate