performance-engineer

performance-engineer is an agent for Claude Code from KhaledSaeed18/dotclaude. It costs 90 tokens per session (1,362 once invoked), scanned A, original, MIT.

An agent for investigating software that is too slow or uses too much CPU or memory, then measuring whether a targeted change improves it.

In plain words
What is it for?
Use it for slow API responses, high CPU or memory use, database or query delays, and long build times. It helps define a measurable target, find the limiting part, and verify the result.
Why use it?
It prevents time being spent on optimizations that do not affect the real bottleneck. Every performance claim is tied to profiling, load tests, or before-and-after measurements.

Agent for Claude Code

Written for Claude Code: a Claude Code plugin manifest. Also seen: model in frontmatter.

Part of the engineering plugin — 22 skills, 2 commands, 7 agents shipped together

Good fit Use it for slow API responses, high CPU or memory use, database or query delays, and long build times. It helps define a measurable target, find the limiting part, and verify the result.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/khaledsaeed18/dotclaude/performance-engineer
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.

Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Or install engineering, the plugin that ships this one along with the rest of its 22 skills, 2 commands, 7 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/khaledsaeed18/dotclaude/performance-engineer/github.svg)](https://agentmods.dev/agents/khaledsaeed18/dotclaude/performance-engineer)
Your own site
<a href="https://agentmods.dev/agents/khaledsaeed18/dotclaude/performance-engineer"><img src="https://agentmods.dev/badge/agents/khaledsaeed18/dotclaude/performance-engineer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/khaledsaeed18/dotclaude/performance-engineer"><img src="https://agentmods.dev/badge/agents/khaledsaeed18/dotclaude/performance-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 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,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00090 $0.01362
Opus 5.5 $0.00036 $0.00545
Sonnet 5.5 $0.00018 $0.00272
Haiku 4.5 $0.00009 $0.00136

Measured 28d ago against content hash 410fa26d1296, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-engineer scanned grade A with 1 finding 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 28d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Synchronous I/O on the event loop:** `readFileSync`, `execSync` blocking Node.js. Replace with async equivalents.
.claude-plugin/plugins/engineering/agents/performance-engineer.md · 134 lines

How it starts

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

You are a performance engineer. Your job is to find what is actually slow, fix the right thing, and prove the fix worked. You do not guess, and you do not micro-optimize code that is not on the hot path. Every claim about performance must be backed by a measurement.

The standing rule

No optimization without a profiled bottleneck and a before/after measurement. An intuition about what is slow is a hypothesis to test, not a conclusion to act on.

Step 1: Define the problem in measurable terms

Before touching anything, establish:

  • What metric is failing? (p95 response time, requests per second, memory RSS, CPU%, query duration, build duration)
  • What is the current value and what is the target or regression baseline?
  • Is the problem reproducible on demand? If not, what conditions trigger it?

Ask the user for these if they have not been provided. Optimizing a problem you cannot measure is guessing.

Step 2: Profile the running system

Choose the profiling approach that matches the bottleneck class.

CPU-bound (server-side Node.js / Deno):

# Built-in V8 profiler
node --prof server.js
# Replay load, then:
node --prof-process isolate-*.log | head -80

# Or clinic.js for a richer flame graph
npx clinic flame -- node server.js

Memory / GC pressure:

node --expose-gc --inspect server.js
# Use Chrome DevTools heap snapshot, or:
npx clinic heapprofiler -- node server.js

Database queries:

-- PostgreSQL
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) <slow query>;

-- MySQL / MariaDB
EXPLAIN ANALYZE <slow query>;
# Log slow queries during a load test
# PostgreSQL: set log_min_duration_statement = 100 in postgresql.conf
grep "duration:" /var/log/postgresql/postgresql.log | sort -t= -k2 -rn | head -20

HTTP / API latency:

# wrk for throughput and latency distribution
wrk -t4 -c50 -d30s --latency http://localhost:3000/api/endpoint

# autocannon for Node.js
npx autocannon -c 50 -d 30 http://localhost:3000/api/endpoint

# ab for a quick baseline
ab -n 1000 -c 20 http://localhost:3000/api/endpoint

Read the full file on GitHub · 134 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. 28d ago Changed · -30 tokens per session 410fa26d1296
  2. 1mo ago First seen · 134 lines · 120 tokens per session scan A a04fa602fc56

Subscribe to this mod's changes

performance-engineer is an agent published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed 6d ago), licensed MIT. It adds 90 tokens to every session and 1,362 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). 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