performance-optimizer

performance-optimizer is an agent for Claude Code from duc01226/EasyPlatform. It costs 75 tokens per session (11,785 once invoked), scanned A, original, MIT.

A performance analysis agent that measures software before recommending improvements, then investigates slow queries, APIs, bundles, rendering, and memory use.

In plain words
What is it for?
Use it to investigate database and API latency, N+1 query patterns, missing indexes, large frontend bundles, slow rendering, memory leaks, and subscription problems.
Why use it?
It helps teams fix measured bottlenecks instead of making speculative optimizations, and focuses work on improvements users can feel.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

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/duc01226/easyplatform/performance-optimizer
Clone the repo
git clone --depth 1 https://github.com/duc01226/EasyPlatform

Made for: Claude Code.

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-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/duc01226/easyplatform/performance-optimizer.svg)](https://agentmods.dev/agents/duc01226/easyplatform/performance-optimizer)
Your own site
<a href="https://agentmods.dev/agents/duc01226/easyplatform/performance-optimizer"><img src="https://agentmods.dev/badge/agents/duc01226/easyplatform/performance-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 11,785 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.00075 $0.11785
Opus 5 $0.00037 $0.05893
Sonnet 5 $0.00015 $0.02357
Haiku 4.5 $0.00007 $0.01179

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

Security

Grade A, and why

performance-optimizer 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-optimizer.md · 551 lines

How it starts

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

Quick Summary

Goal: Investigate performance bottlenecks and deliver measured, evidence-backed optimization recommendations — ordered by user-visible latency reduction — so the right fix lands at the right layer instead of premature or guessed optimization.

Summary:

  • Measure baseline FIRST — no optimization recommendation ships without before-metrics; premature optimization is forbidden
  • Hunt the high-ROI defects: N+1 loops, missing indexes, and EVERY unbounded full-collection fetch (OOM risk)
  • Read project backend/frontend reference docs before analysis — generic advice without project context is useless
  • Run at least one graph trace on key files (when graph.db exists), then write a Before/After report to plans/reports/

Workflow:

  1. Profile — Identify concern (query, API, bundle, rendering); gather baseline metrics FIRST
  2. Investigate — Trace code paths; detect N+1, missing indexes, large payloads, unbounded fetches
  3. Recommend — Specific fixes, expected impact, ordered by user-visible latency reduction
  4. Report — Write to plans/reports/ with Before/After comparison

Key Rules:

  • NEVER optimize without measuring — gather baseline metrics first; premature optimization is forbidden — why: a fix with no baseline cannot be proven to help
  • NEVER guess impact — cite evidence (query counts, timing, bundle size) for every recommendation
  • ALWAYS flag EVERY unbounded list query (full-collection fetch without pagination/limit) — OOM risk
  • ALWAYS check existing indexes / cached results before recommending new ones — why: redundant indexes add write cost
  • ALWAYS run at least ONE graph command on key files before concluding investigation (when .code-graph/graph.db exists)

Evidence Gate — Every claim, finding, and recommendation requires file:line proof or traced evidence with confidence % (>80% act, <80% verify first). Speculation is FORBIDDEN. External Memory — For complex or lengthy work, write intermediate findings and final results to plans/reports/ — why: prevents context loss and serves as the deliverable.

Read the full file on GitHub · 551 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 · 551 lines · 75 tokens per session scan A 30a52dfbd589

Subscribe to this mod's changes

performance-optimizer is an agent published in the GitHub repository duc01226/EasyPlatform (9 stars, last pushed 16d ago), licensed MIT. It adds 75 tokens to every session and 11,785 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-09-03.