skill · built into metaphor
/pr-review-perf
Performance reviewer contract for Agent Review (hot paths, N+1, allocations, render cost)
- Built in
- Slash command
you ›/pr-review-perf
metaphor ›Loaded the pr-review-perf skill. What should I work on?
What the agent is told
This is the skill's SKILL.md, exactly what Metaphor reads before the task.
Selected when the diff is large or touches queries, workers, caches, or render-hot code. Only report cost the user or the bill can feel.
What to check
- N+1 and per-item I/O — a query, fetch, or file read inside a loop or
mapover request-scoped data. - Missing bounds — unpaginated list queries, unbounded
readFileon user input, unbounded in-memory maps and caches that never evict. - Query shape — a filter or sort with no supporting index, a
SELECT *on a wide table, a join that fans out rows. - Blocking the wrong thread — synchronous filesystem or crypto work on a request path or in the UI thread;
awaitinside a loop where the calls are independent. - Render cost — work in a React render body, a new subscription per render, list rendering without virtualization at realistic sizes, layout thrash from a read-after-write on the DOM.
- Cache correctness as cost — an added cache with no invalidation, or an invalidation that clears far more than it needs to.
Severity
blocker only when the change plausibly takes production down (unbounded growth, a hot-path N+1 over user-scaled data). major for a measurable regression on a path users hit. minor for waste worth cleaning. At most one praise.
Do not nit
No micro-optimizations without a measurement story. No useMemo/useCallback advice unless a profile or an obvious O(n²) says so. No speculative benchmarks — if the number is not observed, say it is an estimate.
Evidence
Attach evidence with the loop, query, or render body in question. Name the axis that grows (rows, files, list length) so the author can judge the scale.
Agents that use it
Questions
What is the pr-review-perf skill?
Performance reviewer contract for Agent Review (hot paths, N+1, allocations, render cost)
How do I use pr-review-perf in Metaphor?
It is built into Metaphor. Type /pr-review-perf in the composer, or describe the task and the agent loads the skill when it fits.
What is a skill?
A skill is a set of written instructions the agent reads before it starts a kind of task. It changes how the agent works, not what it is allowed to do.
More built-in skills
- /ai-ciSkillBudgeted investigation of failed GitHub Actions / PR checks — bootstrap annotations first, then failed logs, localize to code, classify flake vs real vs infraships with metaphor
- /ai-prSkillBudgeted whole-PR critique via the pr subagent — map diff, evidence findings, return a pr_review_draft for the Agent Review canvasships with metaphor
- /ai-securitySkillBudgeted security and AI-agent risk review — ai_security scan, OSV CVE/GHSA lookups, OWASP LLM/MCP/Top10 tagging, draft for Agent Review canvasships with metaphor
- /ai-sreSkillBudgeted production investigation against connected observability/logs MCP servers — scope, resolve schema, query, correlate, conclude with evidenceships with metaphor
- /boardSkillHow to work on the shared Board canvas — when to use it, locking onto one board, teaching with drawings, tool choice, placement, camera, narration and the…ships with metaphor
- /board-designSkillDesign language for the Board canvas — layout grid, hierarchy, roles and colour, typography, arrows, frames and patterns for common diagram typesships with metaphor