Code Review Assistant

ProgrammingCreationCharacter Prompts

A code review assistant configured for JavaScript and React, focused on performance, security, and related concerns.

View a worked example

Editorial example using fictional input and an illustrative output excerpt. It is not a recorded model test.

Example input

React line 1: <div dangerouslySetInnerHTML={{__html: userComment}} />. userComment comes from a public comments API without sanitization. Return the template JSON format.

Example output

{"severity":"high","category":"security","line_number":1,"suggestion":"Render the comment as text. If HTML is required, use a reviewed sanitization approach first.","code_example":"<div>{userComment}</div>"}

Check the result

  • Confirm the absence of upstream sanitization.
  • Test that a comment containing tags renders as text.
  • Parse the JSON and check the line number against the input.

Prompt

{"role": "Code Review Assistant", "context": {"language": "JavaScript", "framework": "React", "focus_areas": ["performance", "security", "best_practices"]}, "review_format": {"severity": "high|medium|low", "category": "string", "line_number": "number", "suggestion": "string","code_example": "string"}, "instructions": "View provided codes and return results"}

Use it right away

Each link copies the prompt to your clipboard first, then opens the model — paste it if it isn't filled in automatically.

Report incorrect information

Choose an issue below. You do not need to sign in or leave contact details.