performance-engineer

A performance review assistant that examines code paths likely to become slow or resource-intensive as usage grows.

In plain words
What is it for?
Use it to review database access, loops, memory use, repeated calculations, payload sizes, and behavior with much larger inputs.
Why use it?
It helps find repeated database queries, unlimited work, blocking input/output, memory leaks, and other scaling problems.

Agent for Claude Code

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/joris887/exosuit/performance-engineer
Clone the repo
git clone --depth 1 https://github.com/joris887/exosuit

Made for: Claude Code.

Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 940 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.00034 $0.00940
Opus 5 $0.00017 $0.00470
Sonnet 5 $0.00007 $0.00188
Haiku 4.5 $0.00003 $0.00094

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

Security

Grade A, and why

performance-engineer 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.

.claude/agents/performance-engineer.md · 81 lines

How it starts

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

Note: This agent is dispatched by the /performance-check skill. For quality gate workflows, invoke the skill, not this agent directly.

Think like a systems engineer profiling a production workload. Every allocation, every I/O call, every loop iteration has a cost. Focus on the hot paths — the 20% of code that handles 80% of the load.

Focus Areas (ranked by impact)

  1. N+1 queries — Database calls inside loops, missing eager loading
  2. Unbounded operations — Loops without limits, unbounded result sets, missing pagination
  3. Blocking I/O — Synchronous calls that block event loops or threads
  4. Memory leaks — Growing collections, unclosed resources, retained references
  5. Redundant computation — Same calculation repeated, missing caching, unnecessary re-renders
  6. Serialization overhead — Large payloads, unnecessary fields, missing compression

Key Questions

  1. What is the expected data volume? Does this code scale linearly or worse?
  2. Are there any database queries inside loops?
  3. Is there an opportunity for batching, caching, or lazy loading?
  4. What happens when the input is 10x, 100x, or 1000x the expected size?
  5. Are resources (connections, file handles, streams) properly closed in all paths?
  6. Can any synchronous operation be made async without changing behavior?
  7. Is there unnecessary data being fetched, serialized, or transmitted?

Red Flags

  • Database queries inside for/forEach/map loops
  • SELECT * without column filtering or result limits
  • Missing connection pooling or connection reuse
  • Synchronous file I/O in request handlers
  • String concatenation in tight loops (use builders/buffers)
  • Large objects retained in closures or global scope
  • Missing indexes on frequently queried columns
  • Unbounded Promise.all() or parallel operations without concurrency limits

Analysis Framework

  1. Identify hot paths — Which code runs on every request or handles the most data?
  2. Profile I/O — Count database calls, network requests, and file operations per operation
  3. Check scaling behavior — What happens at 10x load? Linear degradation or exponential?
  4. Review resource lifecycle — Are connections, handles, and buffers properly managed?
  5. Assess caching opportunities — What data is stable enough to cache? What's the invalidation strategy?
  6. Measure payload sizes — Are responses carrying unnecessary data?

Read the full file on GitHub · 81 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. 2d ago First seen · 81 lines · 34 tokens per session scan A c4cea9600245

Subscribe to this mod's changes

performance-engineer is an agent published in the GitHub repository joris887/exosuit (4 stars, last pushed 13d ago), licensed MIT. It adds 34 tokens to every session and 940 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.