Try it: messy draft β one hotkey β polished
Before β your draft
ok few things. the query in getUserOrders builds sql with string concat from req.query.status, thats injectable. also no pagination so this will die for big accounts. the try/catch just swallows errors which is why we never saw the failures. naming nit: data2 lol. otherwise looks good
After β Code Reviewer
In the real app this happens in place β in Gmail, Word, Outlook, Slack or your terminal β with Alt+Shift+Z / β₯β§Z. No copy-paste, no prompt.
What the Code Reviewer lens does
It organizes review comments by severity, states each issue directly and technically, and pairs it with a specific fix β with a short code snippet where that's clearer than prose. If you paste code instead of notes, it reviews the code itself for bugs, anti-patterns, security and performance issues while preserving what the code is meant to do. The labels do the prioritizing, so the wording can stay matter-of-fact.
- In-app name
- Code Reviewer
- Directory description
- Technical code review with actionable feedback
- Category
- Software Engineering Β· 25 lenses
- Lens id
code-reviewer
When to use the Code Reviewer lens, and when not to
When to use it
- You've left a dozen comments and the author can't tell which ones block the merge.
- Your review notes are a list of βhmmβ and β?β that only make sense to you.
- You want a second pass on a snippet β injection risks, missing error handling, sequential awaits β before you approve.
- Writing the summary comment at the top of a large PR review.
- Reviewing a junior developer's work, where every point needs a reason and a suggested fix.
When not to
- Your feedback is technically right but came out harsh. Diplomat, or the Soften a Harsh Code Review tool, fixes tone without restructuring.
- You're describing your own changes. PR Description is built for that.
- As a substitute for tests, linters or a security scanner. It reads text; it doesn't execute or analyze your whole codebase.
3 real drafts
All Code Reviewer examples
Before
ok few things. the query in getUserOrders builds sql with string concat from req.query.status, thats injectable. also no pagination so this will die for big accounts. the try/catch just swallows errors which is why we never saw the failures. naming nit: data2 lol. otherwise looks good
After
π΄ Critical β SQL injection in getUserOrders The query concatenates req.query.status into the SQL string. Use a parameterized query instead, e.g.: db.query("... WHERE status = $1", [req.query.status]) π‘ Suggestion β Add pagination getUserOrders returns every order with no limit, which will fail or time out for large accounts. Add limit and cursor/offset parameters. π‘ Suggestion β Don't swallow errors The try/catch discards the error, which is why these failures never surfaced. Log it and rethrow, or return an explicit error response. π’ Nitpick β Rename data2 Use a name that describes what it holds. Otherwise looks good.
Before
can u look at this before i push async function loadAll(ids) { const results = [] for (const id of ids) { const r = await fetch('/api/item/' + id) results.push(await r.json()) } return results }
After
π‘ Suggestion β Requests run one at a time Each fetch waits for the previous one, so N ids means N sequential round trips. Run them in parallel (or in batches if the API is rate-limited): const results = await Promise.all(ids.map((id) => fetch('/api/item/' + id).then((r) => r.json()))) π‘ Suggestion β Failed responses aren't handled fetch only rejects on network errors; a 404 or 500 still reaches r.json(), which may throw or return an error body. Check r.ok and decide whether one failure should fail the whole batch. π’ Nitpick β Encode the id If ids can contain special characters, use encodeURIComponent(id) when building the URL.
Before
why is the api key in the config file committed?? needs to go in env. also the retry loop has no max so if the service is down it spins forever. would be nice to extract the date formatting into a helper since its copy pasted 3 times. tabs vs spaces mixed in utils.js
After
π΄ Critical β API key committed in the config file Secrets shouldn't live in version control. Move the key to an environment variable and remove it from the file. Since it has been committed, treat it as exposed and rotate it. π΄ Critical β Retry loop has no limit If the service is down, the loop retries forever. Cap the attempts and add backoff, e.g.: for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) { ... } π‘ Suggestion β Extract date formatting The same date-formatting code is copy-pasted in 3 places. Move it into a shared helper. π’ Nitpick β Mixed tabs and spaces in utils.js Run the formatter to make indentation consistent.
Hotkey workflow: Code Reviewer in any app
Select the text, or just keep typing
Gmail, Slack, LinkedIn and Google Docs work through the Chrome extension; Word, Outlook, Mail, VS Code and terminals through the Mac, Windows and Linux apps. Zero Shot suggests lenses as you type.
Press Alt+Shift+Z / β₯β§Z, or Alt+Shift+L and type βCode Reviewerβ
The hotkey applies the lens Zero Shot suggests first for your text. To run Code Reviewer specifically, open Spotlight, type its name and pick it. Either way the rewrite replaces your text in place; there is no prompt to write. If you use Code Reviewer daily, pin it in your dashboard's My Lenses tab so it stays in the set your hotkey cycles through.
Press Alt+T to compare
Cycles through the 5 cached lens results instantly, so you can see Code Reviewer next to the alternatives before you send.
Press Alt+U to undo
Puts back your exact original text, whichever lens you ended on.
In the terminal (zs CLI)
zs -l code-reviewer "your draft"
echo "your draft" | zs -l code-reviewer -c # also copies the result
zs -l code-reviewer --local --model llama3.2 "your draft" # offline via Ollama, $0-c copies the rewrite to your clipboard as well as printing it. --local talks to Ollama at http://127.0.0.1:11434/v1 and keeps the text on your machine, but your local model only gets the lens name, not Zero Shot's full Code Reviewer instructions, so expect a rougher approximation than the default cloud mode. Setup for every platform is on the setup page.
Tips for better Code Reviewer rewrites
- Write down the problem, not just your reaction. βstring concat from req.queryβ becomes a precise Critical item; βthis looks sketchyβ can only become a vague one.
- Severity is inferred from what you wrote. If something must block the merge, say so in your notes.
- If the structured version reads colder than you want for a new teammate, select it and run Diplomat from Spotlight (Alt+Shift+L) β the severity labels survive.
- On Windows the hotkey works in VS Code too, so you can draft review notes in a scratch file next to the diff and transform them there.
Related lenses
- PR Description-l pr-descriptionClean pull request summary with context and changesExamples & how to use
- Diplomat-l diplomatFirm but polite conflict resolutionExamples & how to use
- Bug Report-l bug-reportDetailed bug report with reproduction steps and expected behaviorExamples & how to use
- Senior Dev-l seniordevTechnical specificationExamples & how to use
- Incident Report-l incident-reportStructured post-incident report with timeline and action itemsExamples & how to use
More Software Engineering lenses
None of these has a full guide yet, but each runs the same way: hotkey, Spotlight or zs -l <id>. Hit Try to load one into the playground below, or browse all 996 in the lens directory.
Security Audit
security-auditSecurity vulnerability assessment with severity ratings
System Diagram
system-diagramText-based system architecture diagram
Tech Spec
tech-specTechnical specification document for engineering proposals
Test Case
test-caseComprehensive test cases with edge cases and assertions
API Docs
api-docsClean REST/GraphQL API documentation
Architect Brief
architect-briefHigh-level system architecture summary
Changelog Entry
changelog-entryStandardized changelog in Keep a Changelog format
Code Comment
code-commentClear inline and block comments for code documentation
Try the Code Reviewer lens on your own draft
Paste your own draft below. 50 free transforms, no card β the same rewrite runs in any app with Alt+Shift+Z (β₯β§Z on Mac).
Try it yourself
Type or paste text, then use the hotkeys to transform
Frequently asked questions
How do you write good code review comments?
Be specific about the problem and where it is, explain why it matters, suggest a fix, and label how important it is. Separate blocking issues from preferences so the author can prioritize. Comment on the code, not the person.
What do π΄ Critical, π‘ Suggestion and π’ Nitpick mean?
Critical: must be fixed before merging β bugs, security holes, data loss. Suggestion: worth doing, in this PR or a follow-up β performance, structure, error handling. Nitpick: naming or style the author can take or leave.
Can AI review my code?
It can catch common problems in a snippet you paste, like injection risks, missing error handling, sequential awaits and unbounded loops. It can't see the rest of your codebase, run your tests or know team conventions you don't mention, so treat it as an extra reviewer, not the only one.
How do I give code review feedback without sounding rude?
Severity labels help β marking something a Nitpick tells the author it's optional. Describe the code (βthis query concatenates inputβ) rather than the person (βyou didn't sanitizeβ). For more, see the critical feedback guide.
Is my code sent anywhere when I use this lens?
Text you transform is sent encrypted over HTTPS to the AI provider, and Zero Shot never sells personal data. If you'd rather proprietary code never leave your machine, the desktop apps and zs CLI can use a local Ollama model, fully offline. Local mode runs a simplified version of the lens, so the severity structure may be less consistent than in the cloud.
