💻 Developers
intermediate

JavaScript Code Review

958 views
Updated 9/23/2026

ChatGPT Prompt

Review the following JavaScript code for {purpose}. Work in priority order and say why each finding matters rather than only naming it: first correctness and security — injection, authentication and authorisation gaps, unsafe input handling, secrets in source; then reliability — error handling, resource cleanup, and behaviour under partial failure; then performance where it is measurably relevant rather than speculative; then readability and structure. Check for unhandled promise rejections, missing await, accidental floating promises, closure captures inside loops, prototype pollution on merges, and equality and coercion bugs from ==. For every issue give the location, the concrete failure it causes, a corrected snippet, and a severity. Separate defects that will bite in production from stylistic preferences, and state explicitly what you could not assess without seeing tests, configuration or the calling code.

💡 Pro Tip: Replace placeholders in [BRACKETS] with your specific information for best results.

How to Use This Prompt

  1. 1Click the copy button above to copy the prompt to your clipboard
  2. 2Open ChatGPT, Claude, or your preferred AI assistant
  3. 3Paste the prompt and replace any [PLACEHOLDER TEXT] with your specific details
  4. 4Review the AI's response and iterate if needed for better results

Related Prompts

Python Code Review

Review the following Python code for {purpose}. Work in priority order and say why each finding matters rather than only naming it: first correctness and security — injection, authentication and authorisation gaps, unsafe input handling, secrets in source; then reliability — error handling, resource cleanup, and behaviour under partial failure; then performance where it is measurably relevant rather than speculative; then readability and structure. Check for mutable default arguments, bare except clauses swallowing errors, missing context managers around resources, type hints on public interfaces, and the GIL implications of any threading used for CPU-bound work. For every issue give the location, the concrete failure it causes, a corrected snippet, and a severity. Separate defects that will bite in production from stylistic preferences, and state explicitly what you could not assess without seeing tests, configuration or the calling code.

intermediate
5626 views

TypeScript Code Review

Review the following TypeScript code for {purpose}. Work in priority order and say why each finding matters rather than only naming it: first correctness and security — injection, authentication and authorisation gaps, unsafe input handling, secrets in source; then reliability — error handling, resource cleanup, and behaviour under partial failure; then performance where it is measurably relevant rather than speculative; then readability and structure. Check for `any` escaping through public APIs, unsafe type assertions hiding real mismatches, non-null assertions used instead of narrowing, discriminated unions that are not exhaustively handled, and whether types actually encode the invariants or merely decorate them. For every issue give the location, the concrete failure it causes, a corrected snippet, and a severity. Separate defects that will bite in production from stylistic preferences, and state explicitly what you could not assess without seeing tests, configuration or the calling code.

intermediate
8792 views

Java Code Review

Review the following Java code for {purpose}. Work in priority order and say why each finding matters rather than only naming it: first correctness and security — injection, authentication and authorisation gaps, unsafe input handling, secrets in source; then reliability — error handling, resource cleanup, and behaviour under partial failure; then performance where it is measurably relevant rather than speculative; then readability and structure. Check for resource leaks outside try-with-resources, mutable state shared across threads without synchronisation, equals and hashCode contract violations, overly broad exception catching, and N+1 queries behind an ORM. For every issue give the location, the concrete failure it causes, a corrected snippet, and a severity. Separate defects that will bite in production from stylistic preferences, and state explicitly what you could not assess without seeing tests, configuration or the calling code.

intermediate
1402 views

C++ Code Review

Review the following C++ code for {purpose}. Work in priority order and say why each finding matters rather than only naming it: first correctness and security — injection, authentication and authorisation gaps, unsafe input handling, secrets in source; then reliability — error handling, resource cleanup, and behaviour under partial failure; then performance where it is measurably relevant rather than speculative; then readability and structure. Check for ownership ambiguity and raw pointers where a smart pointer belongs, rule-of-five violations, iterator and reference invalidation after container mutation, undefined behaviour from signed overflow or aliasing, and exception safety across resource acquisition. For every issue give the location, the concrete failure it causes, a corrected snippet, and a severity. Separate defects that will bite in production from stylistic preferences, and state explicitly what you could not assess without seeing tests, configuration or the calling code.

intermediate
4254 views

REST API Design for Task Management

Design a RESTful API for Task Management. Define the resource model and the relationships between resources, then the endpoints with methods, path structure, request and response schemas, and status codes for success and every failure. Model the hierarchy carefully — projects, tasks, subtasks, assignees, comments — and decide whether subtasks are a separate resource or a self-referential relation. Handle bulk operations, since clients will always need to move many tasks at once. Cover authentication and authorisation including how object-level permissions are enforced, pagination (state whether cursor or offset and why), filtering and sorting conventions, rate limiting with the headers returned, and a consistent error envelope carrying a machine-readable code. Address versioning strategy and what constitutes a breaking change. Provide an OpenAPI fragment for two representative endpoints, and list the three design decisions most likely to be regretted later with the alternative for each.

advanced
6027 views

REST API Design for Social Media Scheduling

Design a RESTful API for Social Media Scheduling. Define the resource model and the relationships between resources, then the endpoints with methods, path structure, request and response schemas, and status codes for success and every failure. Timezone correctness is the core difficulty: store instants in UTC with the originating timezone retained separately, and be explicit about DST behaviour for recurring schedules. Model per-platform constraints and partial failure when one network rejects a post. Cover authentication and authorisation including how object-level permissions are enforced, pagination (state whether cursor or offset and why), filtering and sorting conventions, rate limiting with the headers returned, and a consistent error envelope carrying a machine-readable code. Address versioning strategy and what constitutes a breaking change. Provide an OpenAPI fragment for two representative endpoints, and list the three design decisions most likely to be regretted later with the alternative for each.

advanced
8110 views

Want More AI Prompts?

Explore 500+ ChatGPT prompts across 20+ categories

Browse All Prompts

Advertisement