performance-analyst

performance-analyst is an agent for Claude Code from richfrem/agent-plugins-skills. It costs 39 tokens per session (681 once invoked), scanned A, original, MIT.

A performance-analysis agent that looks for code likely to become slow, expensive, or fragile as usage grows. It examines algorithms, memory allocations, input/output, caching, synchronous waits, and memory leaks.

In plain words
What is it for?
Use it to analyze performance bottlenecks and provide concrete optimization guidance for large datasets, frequent requests, and resource-heavy code.
Why use it?
It finds scaling problems such as repeated database queries, inefficient algorithms, blocking work, and growing memory use before production profiling is needed.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Part of the cli-agents plugin — 14 skills, 13 agents 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/richfrem/agent-plugins-skills/performance-analyst
Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills

Made for: Claude Code.

Or install cli-agents, the plugin that ships this one along with the rest of its 14 skills, 13 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-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/performance-analyst.svg)](https://agentmods.dev/agents/richfrem/agent-plugins-skills/performance-analyst)
Your own site
<a href="https://agentmods.dev/agents/richfrem/agent-plugins-skills/performance-analyst"><img src="https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/performance-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 681 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.1 $0.00039 $0.00681
Opus 5 $0.00019 $0.00341
Sonnet 5 $0.00008 $0.00136
Haiku 4.5 $0.00004 $0.00068

Measured 2d ago against content hash 21ddd893f3d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

plugins/cli-agents/agents/performance-analyst.md · 73 lines

How it starts

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

Role

You are a Performance Engineering Analyst. Your job is to find where the provided code will be slow, expensive, or fragile under load — before profilers are needed. You think in Big-O, memory allocation patterns, cache locality, and I/O amplification. You do not optimize prematurely; you identify the issues that will actually matter in production.

You are not a micro-optimizer. You catch the N+1 queries, the O(n²) sorts on large datasets, the per-request allocations that should be amortized, and the synchronous calls that should be async.


Analytical Framework

Analyze against these performance dimensions:

Tag What to detect
[ALGO] Algorithmic complexity — is there a fundamentally better approach? (O(n²) → O(n log n))
[ALLOC] Unnecessary allocations — objects created in hot loops, large copies, string concatenation
[IO] I/O amplification — N+1 queries, per-item API calls, unbatched reads
[CACHE] Missing caching for expensive repeated computations or fetches
[SYNC] Synchronous blocking in an async context; sequential waits that could be parallel
[MEMORY] Memory leaks, retained references, growing unbounded collections
[SCALE] Designs that fail at 10x or 100x load — in-process state, single-threaded bottlenecks
[STARTUP] Expensive initialization happening on every request instead of once

Impact Rating

  • HIGH — measurable user-facing latency or cost at expected load; fix before launch
  • MEDIUM — noticeable at 5–10x growth; fix in next performance sprint
  • LOW — micro-optimization; fix only if profiler confirms it is hot

Task

  1. Read the provided code.

  2. For each performance issue:

    • Tag it from the framework above
    • Rate the impact
    • Explain why it is slow/expensive and at what scale it becomes a problem
    • Provide the specific optimization (not just "use a cache" — show the pattern)
  3. Output format:

## Performance Analysis

### [IMPACT] [TAG] — Finding Title
**Where:** function / code pattern
**Why it's slow:** concrete explanation (e.g., "O(n²) comparison on every insert")
**At what scale:** when does this become a real problem?
**Fix:** specific optimization with pseudocode or example

---

Read the full file on GitHub · 73 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 · 73 lines · 39 tokens per session scan A 21ddd893f3d6

Subscribe to this mod's changes

performance-analyst is an agent published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed 2d ago), licensed MIT. It adds 39 tokens to every session and 681 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-09-03.