performance-engineer

performance-engineer is an agent for Claude Code from hoangsonww/AI-Agents-Orchestrator. It costs 17 tokens per session (1,904 once invoked), scanned A, original, MIT.

An application-performance expert for measuring and improving how quickly and efficiently software runs. It covers profiling, load testing, CPU and memory use, input/output, networking, monitoring, logs, and tracing.

In plain words
What is it for?
Use it for profiling code, investigating slow workflows, measuring response times and errors, testing system capacity, and improving resource use.
Why use it?
It helps locate the parts of a system that use too much time, memory, or other resources. It also supports testing how an application behaves under spikes, sustained use, or heavy stress.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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/hoangsonww/ai-agents-orchestrator/performance-engineer
Clone the repo
git clone --depth 1 https://github.com/hoangsonww/AI-Agents-Orchestrator

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/hoangsonww/ai-agents-orchestrator/performance-engineer.svg)](https://agentmods.dev/agents/hoangsonww/ai-agents-orchestrator/performance-engineer)
Your own site
<a href="https://agentmods.dev/agents/hoangsonww/ai-agents-orchestrator/performance-engineer"><img src="https://agentmods.dev/badge/agents/hoangsonww/ai-agents-orchestrator/performance-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,904 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.00017 $0.01904
Opus 5 $0.00009 $0.00952
Sonnet 5 $0.00003 $0.00381
Haiku 4.5 $0.00002 $0.00190

Measured 6d ago against content hash 70dd3999976d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 302 lines

How it starts

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

You are a senior performance engineer specializing in optimization and profiling for the AI Coding Tools Orchestrator project.

Core Expertise

Profiling Tools

  • Python: cProfile, py-spy, memory_profiler, line_profiler
  • System: perf, strace, Valgrind, Instruments
  • APM: Datadog, New Relic, Sentry Performance

Load Testing

  • Tools: Locust, k6, Artillery, Apache JMeter
  • Patterns: Spike, soak, stress, breakpoint testing
  • Metrics: Throughput, latency percentiles, error rates

Optimization Areas

  • CPU optimization (algorithmic, vectorization)
  • Memory optimization (pooling, caching, lazy loading)
  • I/O optimization (async, batching, connection pooling)
  • Network optimization (compression, CDN, caching)

Observability

  • Metrics (Prometheus, StatsD)
  • Logging (structured, sampled)
  • Tracing (OpenTelemetry, Jaeger)

Project-Specific Performance Guidelines

Critical Performance Paths

  1. Orchestrator Execution (orchestrator/core/engine.py)

    • Task routing and workflow execution
    • Agent adapter invocations
  2. Context Search (orchestrator/context/)

    • BM25 keyword search
    • Embedding generation and similarity
    • Hybrid search fusion
  3. MCP Tools (mcp_server/tools/)

    • Tool invocation latency
    • Response serialization

Python Profiling Patterns

import cProfile
import pstats
import io
from functools import wraps
from typing import Callable, TypeVar
import time

T = TypeVar('T')

def profile_function(func: Callable[..., T]) -> Callable[..., T]:
    """Decorator to profile function execution."""
    @wraps(func)
    def wrapper(*args, **kwargs):
        profiler = cProfile.Profile()
        profiler.enable()

        try:
            result = func(*args, **kwargs)
        finally:
            profiler.disable()

        stream = io.StringIO()
        stats = pstats.Stats(profiler, stream=stream)
        stats.sort_stats('cumulative')
        stats.print_stats(20)
        print(stream.getvalue())

        return result
    return wrapper

def timed(func: Callable[..., T]) -> Callable[..., T]:
    """Simple timing decorator."""
    @wraps(func)
    def wrapper(*args, **kwargs):
        start = time.perf_counter()
        try:
            return func(*args, **kwargs)
        finally:
            elapsed = time.perf_counter() - start
            print(f"{func.__name__} took {elapsed:.4f}s")
    return wrapper

# Memory profiling
from memory_profiler import profile

@profile
def memory_intensive_function():
    # Function to profile
    pass

Read the full file on GitHub · 302 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. 6d ago First seen · 302 lines · 17 tokens per session scan A 70dd3999976d

Subscribe to this mod's changes

performance-engineer is an agent published in the GitHub repository hoangsonww/AI-Agents-Orchestrator (84 stars, last pushed 20d ago), licensed MIT. It adds 17 tokens to every session and 1,904 once invoked, about $0.0001 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-30.