Skill · OpenAI Official Documentation
Audit code quality with Canvas shortcuts
Photo: Jackson Sophat on Unsplash
ChatGPT Canvas's one-click "Review Code" shortcut runs a full code audit inline, identifying optimization opportunities and best practices in seconds. Instead of pasting code into chat and hunting through walls of text for suggestions, you get side-by-side editing where ChatGPT annotates directly on your code-tracked through version history. Developers report 60% faster iteration cycles on refactoring tasks.
Canvas is ChatGPT's side-by-side editor that opens automatically for coding tasks. The "Review Code" shortcut analyzes your entire function or file for optimization opportunities, best practices, and potential improvements without regenerating it from scratch.
To use it: paste or write your code in Canvas (or ask ChatGPT to create something and Canvas opens automatically). Click the "Code review" icon (terminal prompt symbol) in the bottom right toolbar. Select "Review code." ChatGPT provides inline suggestions annotated directly on the code, explaining structure issues, redundancies, inefficient algorithms, and refactoring opportunities-like a colleague reviewing your PR.
Example: You inherit a Python script that's slow and hard to follow. Paste it into Canvas, hit "Review code," and ChatGPT instantly highlights the O(n²) loop that should be vectorized, suggests variable names for clarity, and flags error handling gaps. You see these suggestions right on the code, not buried in a chat reply. Accept changes one by one or ask clarifying questions in the sidebar chat-Canvas keeps context across all edits.
Combine shortcuts for efficiency: start with Review Code to identify issues, then use "Add Comments" to document, "Add Logs" to instrument debugging, and finally "Fix Bugs" to resolve flagged problems. Version history is preserved via the back button, so you can compare your original code against each revision. Canvas works with JavaScript, Python, Java, TypeScript, C++, PHP, and HTML/React-with live rendering for frontend code.
Sources & credits
Original source: OpenAI Official Documentation