Perf Lens

Performance review from a paste — findings, fixes, quick wins, rewrite.

Back to SkillSafe
Or pick files: .js, .ts, .py, .sql, .go and friends are read locally, nothing uploads until you run.
Context — data sizes, request rates, framework, environment
How it works

Nothing to hand? Load the — a Node handler with N+1 queries, sequential awaits and string building in a loop — or the , a mostly-clean component where the findings are optimizations, not fires.

1

Paste the code

A module, a component, a handler, a query layer, or several files together. The instant prescan reads it for free while you type and lists what it mechanically found: queries and awaits inside loops, SELECT * and missing LIMITs, string concatenation in loops, nested loops, listeners and intervals without cleanup, JSON deep clones, sync I/O — plus the functions in your paste and the stack it detects.

2

The AI reviews it

Severity-ranked findings — critical, high, medium, low, honestly calibrated — each quoting the code it concerns and carrying a corrected snippet; the quick wins ordered by impact-per-effort; and an honest health check across data access, memory & resources, CPU & algorithms, network & I/O, and rendering. Every prescan hit is confirmed or explicitly set aside — including the false positives.

3

Fix, then re-review

Your worst hotspot optimized — same function, same behavior, findings fixed — as a downloadable file, plus the ordered next steps and the findings as CSV. Paste the fixed code back in and the free prescan immediately shows which anti-patterns are gone, before you spend anything. Run a fresh review and you get a per-finding delta against your last review of the same code: fixed, still open, new. History is kept on your account and mirrored on this device, and the review exports as a PR comment, Markdown, JSON or CSV.

Derived from the @mastra-ai/performance-review skill.

Questions

What kind of code should I paste?

A module, a React component, an Express handler, a data-access layer, a SQL file, or several files dropped in together — whatever you are about to ship or whatever is currently slow. Perf Lens reviews the paste in front of it; it does not read your repository. Pastes over 100,000 characters are clipped from the middle so both ends survive, and the cut is marked in the text the reviewer sees.

Does it find N+1 queries?

Yes, twice over. The free in-browser prescan pattern-matches queries and awaits inside loops, SELECT * without needed columns, SELECT without LIMIT or pagination, string concatenation in loops, nested loops, linear membership tests in loops, JSON deep clones, synchronous file I/O, listeners added without removal and intervals set without clearing. The AI review then has to confirm every one of those hits as a real finding or say in writing why it is a false positive here — that reconciliation is shown under “Prescan coverage”.

Does it tell me whether to ship?

Yes. Every review opens with a ship line computed from the severities: “Blocks ship” when there is a critical finding that degrades performance under normal load today, “Fix before scale” when the worst findings are high and will bite as load grows, and “Clear to ship” when what remains is optimization. “Copy PR comment” puts that line, the summary, the critical and high findings with their corrected snippets, and the quick wins as a checklist onto your clipboard, sized for a review thread.

Can I check my fixes without paying for another review?

Yes. Paste the fixed code back in and the free prescan compares it against the anti-patterns your last review was given, listing which are gone, which are still present and which are new. That check runs entirely in your browser and costs nothing, so you can keep editing until it stops shrinking and only pay for a fresh review when it is worth it.

Is my code stored anywhere?

Files you drop are read in your browser and nothing leaves the page until you press Review it. Past reviews are saved to your SkillSafe account so a baseline set on one machine is there on the next, and mirrored into this browser for instant loading; the account copy keeps the six most recent reviews with long pastes clipped. Clear history removes both copies.

What does a review cost?

You are charged only for what a run actually uses. Before you run, the price meter shows the maximum that will be reserved for this paste, and the run button is disabled with a top-up link if your balance cannot cover the minimum — you never discover the shortfall after submitting. The two bundled examples replay a saved run, so you can see a full review for free.