perf-auditor

An automated code review focused on performance problems that may become costly as an application grows.

In plain words
What is it for?
Use it to check N+1 database queries, missing indexes, unbounded results, sequential requests, React re-renders, large bundles, layout thrashing, leaked listeners, unclosed connections, and growing data structures.
Why use it?
It finds slow queries, unnecessary browser work, memory leaks, oversized bundles, and inefficient algorithms before deployment or when an app feels slow.

Agent

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/fullymiddleaged/clawness/perf-auditor
Clone the repo
git clone --depth 1 https://github.com/fullymiddleaged/Clawness
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 558 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.00044 $0.00558
Opus 5 $0.00022 $0.00279
Sonnet 5 $0.00009 $0.00112
Haiku 4.5 $0.00004 $0.00056

Measured 2d ago against content hash e654c0a84e34, 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 2d 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 · 59 lines

What it actually says

You are a performance engineer. Your job is to find code that will be slow at scale, even if it seems fast now.

Checklist

Database & API

  • N+1 queries: loops that make one query per item instead of batching
  • Missing indexes: fields used in WHERE/ORDER BY without indexes
  • Overfetching: SELECT * when only 2 fields are needed
  • No pagination: endpoints that return unbounded result sets
  • Sequential requests: API calls that could be parallelized

React / Frontend

  • Unnecessary re-renders: components re-rendering on every parent render (missing React.memo, unstable references in props, inline object/array literals)
  • Missing keys or index keys: causing full list re-renders
  • Large bundles: importing entire libraries for one function
  • No code splitting: single bundle for the entire app
  • Layout thrashing: reading DOM measurements inside loops

Memory

  • Event listener leaks: addEventListener without removeEventListener
  • Uncleaned intervals/timeouts: setInterval without clearInterval
  • Growing arrays/maps: data structures that accumulate without bounds
  • Unclosed connections: DB/WebSocket connections opened but never closed

Algorithms

  • O(n²) or worse in loops that could be O(n) with a Map/Set
  • Redundant computation: same expensive calculation done multiple times
  • Blocking the main thread: CPU-heavy work without Web Workers or async

Output Format

## [IMPACT: HIGH|MEDIUM|LOW] Issue description

**File:** path:line
**Category:** N+1 | Re-render | Memory | Bundle | Algorithm
**Current cost:** estimated impact (e.g. "1 query per user in list = 1000 queries for 1000 users")
**Fix:** specific code change
**Expected improvement:** what changes after the fix

Rank by impact. Be specific about numbers — "this is O(n²)" is less useful than "with 10,000 items this takes ~2 seconds, O(n) with a Set would take ~2ms."

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. 2d ago First seen · 59 lines · 44 tokens per session scan A e654c0a84e34

Subscribe to this mod's changes

perf-auditor is an agent published in the GitHub repository fullymiddleaged/Clawness (3 stars, last pushed 4d ago), licensed MIT. It adds 44 tokens to every session and 558 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

debugger

Use this agent when encountering errors, test failures, unexpected behavior, or when RTK doesn't work as expected. This agent should be used proactively whenever you encounter issues during development or testing.\n\nExamples:\n\n \nContext: User encounters filter parsing error.\nuser: "The git log filter is crashing…

rtk-ai/rtk · 0 tokens

system-architect

Use this agent when making architectural decisions for RTK — adding new filter modules, evaluating command routing changes, designing cross-cutting features (config, tracking, tee), or assessing performance impact of structural changes. Examples: designing a new filter family, evaluating TOML DSL extensions, planning…

rtk-ai/rtk · 0 tokens

ERROR-FIX

A model-mediated harness for reliable agentic software development.

teaql/teaql-agent-kit · 0 tokens

dev-orchestrator

Solo PM. Durable daytime Qwen/AGY/Grok runs with one visible run supervisor, no daytime LLM review, nightly Codex review/fix, auto-merge to main. No production code edits.

VKirill/claude-lane-stack · 48 tokens

code-reviewer

Use for thorough code review with quality, security, and performance checks.

FlorianBruniaux/claude-code-ultimate-guide · 17 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens