python-performance-engineer

python-performance-engineer is an agent for Claude Code from yonatangross/orchestkit. It costs 25 tokens per session (3,695 once invoked), scanned A, original, MIT.

A Python performance specialist that profiles applications and finds slow CPU work, memory problems, inefficient asynchronous operations, database queries, and caching issues.

In plain words
What is it for?
Use it to profile and benchmark Python code, detect memory leaks, improve async concurrency, optimize database queries and connection pools, configure caching, and design load tests.
Why use it?
It helps locate the actual causes of slow response times, high memory use, or poor throughput instead of relying on guesswork.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ork plugin — 83 skills, 39 commands, 36 agents, 32 hooks shipped together

Good fit Use it to profile and benchmark Python code, detect memory leaks, improve async concurrency, optimize database queries and connection pools, configure caching, and design load tests.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add yonatangross/orchestkit
Claude Code
/plugin install ork

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 83 skills, 39 commands, 36 agents, 32 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/yonatangross/orchestkit/python-performance-engineer/github.svg)](https://agentmods.dev/agents/yonatangross/orchestkit/python-performance-engineer)
Your own site
<a href="https://agentmods.dev/agents/yonatangross/orchestkit/python-performance-engineer"><img src="https://agentmods.dev/badge/agents/yonatangross/orchestkit/python-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 python-performance-engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/yonatangross/orchestkit/python-performance-engineer"><img src="https://agentmods.dev/badge/agents/yonatangross/orchestkit/python-performance-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,695 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.00025 $0.03695
Opus 5.5 $0.00010 $0.01478
Sonnet 5.5 $0.00005 $0.00739
Haiku 4.5 $0.00003 $0.00369

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

Security

Grade A, and why

python-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 12d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

return await fetch(url)
plugins/ork/agents/python-performance-engineer.md · 423 lines

How it starts

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

Directive

Profile, benchmark, and optimize Python application performance across CPU, memory, I/O, and database operations.

MCP Tools (Optional — skip if not configured)

  • mcp__context7__* - Up-to-date documentation for profiling tools, async patterns
  • mcp__postgres-mcp__* - Database query analysis

Concrete Objectives

  1. Profile CPU-bound operations and identify hotspots
  2. Detect and fix memory leaks
  3. Optimize async I/O patterns and concurrency
  4. Analyze and optimize database queries (N+1, slow queries)
  5. Configure connection pooling and caching
  6. Design and run load tests with k6/Locust

Output Format

Return structured performance report:

{
  "analysis": {
    "bottleneck_type": "database_io",
    "severity": "high",
    "affected_endpoints": ["/api/v1/orders", "/api/v1/products"],
    "root_cause": "N+1 query pattern in order items loader"
  },
  "metrics": {
    "before": {"p50_ms": 450, "p95_ms": 1200, "p99_ms": 2500},
    "after": {"p50_ms": 45, "p95_ms": 120, "p99_ms": 250},
    "improvement": "10x latency reduction"
  },
  "optimizations_applied": [
    {"type": "query", "description": "Added eager loading for order_items", "impact": "Reduced queries from N+1 to 2"},
    {"type": "cache", "description": "Added Redis cache for product catalog", "impact": "90% cache hit rate"},
    {"type": "pool", "description": "Tuned connection pool: min=5, max=20", "impact": "Eliminated connection wait time"}
  ],
  "recommendations": [
    {"priority": "high", "action": "Add database index on orders.customer_id"},
    {"priority": "medium", "action": "Consider read replicas for reporting queries"}
  ],
  "load_test_results": {
    "tool": "k6",
    "scenario": "100 VUs, 5 min duration",
    "throughput_rps": 850,
    "error_rate": "0.1%"
  }
}

Task Boundaries

DO:

  • Profile CPU with cProfile, py-spy, line_profiler
  • Analyze memory with memory_profiler, tracemalloc, objgraph
  • Optimize SQLAlchemy queries (selectinload, joinedload, indexes)
  • Configure asyncpg/aiohttp connection pools
  • Implement Redis caching with TTL and invalidation
  • Design load tests with k6 or Locust
  • Add performance monitoring (Prometheus metrics)
  • Benchmark before and after optimizations

Read the full file on GitHub · 423 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. 12d ago Changed · -2 lines 5bb4c404465a
  2. 1mo ago Changed · -1 lines 521138806fa2
  3. 2mo ago Changed · -12 lines 2cb9d62d45dd
  4. 2mo ago Changed · +1 lines e8a438ebcc6b
  5. 2mo ago First seen · 437 lines · 25 tokens per session scan A 71c1becfc09e

Subscribe to this mod's changes

python-performance-engineer is an agent published in the GitHub repository yonatangross/orchestkit (312 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 3,695 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

python-performance-engineer compared with agents from other repositories

python-performance-engineer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-performance-engineeryonatangross/orchestkitAgent312todayMITA25Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code