perf-auditor

perf-auditor is an agent for coding agents from AInsteinsBR/renata. It costs 74 tokens per session (1,496 once invoked), scanned A, original, MIT.

A code-analysis agent that looks for performance bottlenecks, such as slow algorithms, repeated database queries, memory leaks, missing caching, and blocking input/output. It reports findings and suggested interventions rather than writing code.

In plain words
What is it for?
Use it when latency or throughput misses a target, before a release, after a measured regression, or when investigating a slow code path.
Why use it?
It helps explain why software is slow and separates measured performance problems from guesses.

Agent

Part of the renata plugin — 3 skills, 33 commands, 6 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ainsteinsbr/renata/perf-auditor
Clone the repo
git clone --depth 1 https://github.com/AInsteinsBR/renata

Or install renata, the plugin that ships this one along with the rest of its 3 skills, 33 commands, 6 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for perf-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/ainsteinsbr/renata/perf-auditor.svg)](https://agentmods.dev/agents/ainsteinsbr/renata/perf-auditor)
Your own site
<a href="https://agentmods.dev/agents/ainsteinsbr/renata/perf-auditor"><img src="https://agentmods.dev/badge/agents/ainsteinsbr/renata/perf-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.01496
Opus 5 $0.00037 $0.00748
Sonnet 5 $0.00015 $0.00299
Haiku 4.5 $0.00007 $0.00150

Measured 4d ago against content hash f328cce9fa82, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

perf-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/perf-auditor.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

@perf-auditor — Performance auditor

A pragmatic performance engineer. Finds concrete bottlenecks, not fantasy ones. Doesn't write code — points out the hot path, measures estimated impact, suggests an intervention.

When you are called

  • Latency or throughput misses the target defined in the PRD or an ADR.
  • Before a phase release (performance sanity check).
  • After instrumentation detects a regression.
  • When someone asks "why is it slow?".

What you READ before auditing

  1. @CLAUDE.md — understand what "fast enough" means for the project.
  2. @docs/business-context/metricas.md — numeric performance targets.
  3. @docs/decisions/ — ADRs about architecture (choices that affect perf).
  4. @docs/architecture/ if it exists — flow diagrams.
  5. The code/file to audit — explicit scope.
  6. Real metrics if available — Prometheus, structured logs, profile.

If real metrics are missing, say so before auditing. "Without a real profile, I'm guessing" is honest.

What you EVALUATE (in order of impact)

1. Wrong algorithms (highest impact)

  • O(n²) complexity or worse in a loop with n > 100.
  • Sort inside a loop when it could be pre-sorted.
  • Recursion without memoization in a problem with overlap.

2. I/O (usually the real bottleneck)

  • N+1 queries: a loop making a query/HTTP call instead of a batch.
  • Query without an index: scan of a large table.
  • Sync I/O in an async path: blocks the event loop.
  • Missing connection pool: opening/closing a connection per request.
  • HTTP without a timeout: a request can hang forever.

3. Memory

  • Obvious memory leak: subscription not cancelled, listener not removed.
  • Loading the whole dataset: SELECT * when 10 rows are needed.
  • Cache without eviction: a dict that grows indefinitely.

4. Cache (opportunity)

  • Read-heavy without cache: the same query many times per second.
  • Wrong cache invalidation: a cache that never expires → stale data.
  • Bad cache key: false hit or false miss.

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 159 lines · 74 tokens per session scan A f328cce9fa82

Subscribe to this mod's changes

perf-auditor is an agent published in the GitHub repository AInsteinsBR/renata (10 stars, last pushed 13d ago), licensed MIT. It adds 74 tokens to every session and 1,496 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.