performance-optimizer

performance-optimizer is an agent for Claude Code from ChanningLua/prax-agent. It costs 9 tokens per session (419 once invoked), scanned A, original, MIT.

An agent for finding and improving slow parts of software by measuring where time and memory are spent.

In plain words
What is it for?
Use it to investigate performance bottlenecks, review profiling results, and apply targeted improvements to code, database queries, input/output, memory, or parallel work.
Why use it?
It reduces guesswork by requiring profiling and before-and-after measurements, while focusing on causes such as inefficient algorithms, database access, memory use, and concurrency.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; names the TodoWrite tool.

Good fit Use it to investigate performance bottlenecks, review profiling results, and apply targeted improvements to code, database queries, input/output, memory, or parallel work.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/channinglua/prax-agent/performance-optimizer
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/ChanningLua/prax-agent

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/channinglua/prax-agent/performance-optimizer/github.svg)](https://agentmods.dev/agents/channinglua/prax-agent/performance-optimizer)
Your own site
<a href="https://agentmods.dev/agents/channinglua/prax-agent/performance-optimizer"><img src="https://agentmods.dev/badge/agents/channinglua/prax-agent/performance-optimizer/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-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/channinglua/prax-agent/performance-optimizer"><img src="https://agentmods.dev/badge/agents/channinglua/prax-agent/performance-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00009 $0.00419
Opus 5.5 $0.00004 $0.00168
Sonnet 5.5 $0.00002 $0.00084
Haiku 4.5 $0.00001 $0.00042

Measured 1mo ago against content hash 4d7b9258159f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.prax/agents/performance-optimizer.md · 76 lines

What it actually says

Performance Optimizer Agent

You are a performance engineering specialist. Identify bottlenecks and apply targeted optimizations.

Analysis Workflow

  1. Profile first — never optimize blindly
  2. Identify the critical path (80% of time in 20% of code)
  3. Measure before and after every change
  4. Prefer algorithmic improvements over micro-optimizations

Common Bottlenecks

Algorithmic

  • O(n²) loops → O(n log n) sort + binary search
  • Repeated computation in loops → hoist or memoize
  • Unnecessary copies → use references/views

I/O

  • N+1 queries → batch or eager-load
  • Synchronous I/O in hot path → async/non-blocking
  • Missing indexes on filtered/sorted columns

Memory

  • Large objects in long-lived scope → scope reduction
  • Unbounded caches → LRU with size limit
  • String concatenation in loops → join or buffer

Concurrency

  • Sequential tasks that can parallelize → asyncio.gather / ThreadPoolExecutor
  • Lock contention → reduce critical section size

Output Format

## Performance Report

### Profiling Summary
Hotspot: <file>:<line> — <% of total time>

### Issues Found
1. [ALGORITHMIC|IO|MEMORY|CONCURRENCY] Description — file:line
   Current: O(?) / <metric>
   Fix: ...
   Expected gain: ~Nx

### Applied Changes
...

### Verification
Run: <benchmark command>
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. 1mo ago First seen · 76 lines · 9 tokens per session scan A 4d7b9258159f

Subscribe to this mod's changes

performance-optimizer is an agent published in the GitHub repository ChanningLua/prax-agent (272 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 419 once invoked, about $0.0000 per session on Opus 5.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-30.

Related

Other agents, from other repositories

bench

Design API benchmarks, profile p50/p95/p99 latency, set up throughput tests, and detect performance regressions with k6/wrk. Use when establishing baselines or catching latency regressions in CI. Trigger with "benchmark this API", "set up a performance test".

jeremylongshore/tons-of-skills-marketplace · 58 tokens

rust-pro

Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use proactively for Rust memory safety, performance optimization, or systems programming.

NickCrew/Claude-Cortex · 50 tokens

07-production

Production Quality - Testing, Performance, Security, Deployment (95 hours).

pluginagentmarketplace/custom-plugin-android · 17 tokens

context-finder

Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the code index and prior session memory first and greps last…

futuregerald/futuregerald-claude-plugin · 107 tokens

wiki-ingest

Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.

karlorz/llm-wiki · 64 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens