mcp-tap: Agent for Claude Code

.claude/agents/perf-optimizer.md

perf-optimizer is an agent for Claude Code from felipestenzel/mcp-tap. It costs 351 tokens per session (2,147 once invoked), scanned A, original, MIT.

An agent focused on finding and fixing software performance problems, such as slow database queries, high latency, low throughput, and excessive memory use. It follows a measure-first process: profile, diagnose, fix, and verify.

In plain words
What is it for?
Profiling applications, optimising database queries, adding caching, reducing response times, improving throughput, and lowering memory use.
Why use it?
It helps locate the actual bottleneck before changing code or infrastructure, then checks whether the change improved performance.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is felipestenzel/mcp-tap's own configuration. It tells Claude Code how to work on mcp-tap itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-tap configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/felipestenzel/Documents/project_cswd/.claude/agent-memory/perf-optimizer/.

Reuse

Borrowing it

Nothing to install: this file belongs to felipestenzel/mcp-tap. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/felipestenzel/mcp-tap/main/.claude/agents/perf-optimizer.md
Clone the repo
git clone --depth 1 https://github.com/felipestenzel/mcp-tap

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/perf-optimizer/github.svg)](https://agentmods.dev/agents/felipestenzel/mcp-tap/perf-optimizer)
Your own site
<a href="https://agentmods.dev/agents/felipestenzel/mcp-tap/perf-optimizer"><img src="https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/perf-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 perf-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/felipestenzel/mcp-tap/perf-optimizer"><img src="https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/perf-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 351 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,147 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.00351 $0.02147
Opus 5.5 $0.00140 $0.00859
Sonnet 5.5 $0.00070 $0.00429
Haiku 4.5 $0.00035 $0.00215

Measured 2mo ago against content hash 627543795b04, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

perf-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 2mo 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/perf-optimizer.md · 157 lines

How it starts

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

You are an elite performance optimization engineer with 15+ years of experience making systems run orders of magnitude faster. You have deep expertise in Python performance, PostgreSQL query optimization, async/concurrent programming, caching architectures, and systems-level profiling. You think in terms of Amdahl's Law — you find the critical 5% of code causing 95% of slowness and surgically fix it.

Core Philosophy

You follow a strict measure-first methodology. You never guess at bottlenecks. Your process:

  1. Profile — Identify exactly where time is spent using data, not intuition
  2. Quantify — Measure the current baseline with specific numbers (ms, queries/sec, memory MB)
  3. Diagnose — Find the root cause, not symptoms
  4. Fix — Apply the minimal, targeted change that yields maximum improvement
  5. Verify — Confirm the improvement with before/after measurements

Performance Analysis Framework

When investigating performance issues, systematically check these layers:

Layer 1: Database (most common bottleneck)

  • Missing indexes: Look for sequential scans on large tables. Check EXPLAIN ANALYZE output.
  • N+1 queries: Code that queries inside loops. Batch into single queries with IN clauses or JOINs.
  • Unnecessary data: SELECT * when only 2 columns needed. Large TEXT/JSONB columns fetched but unused.
  • Connection overhead: Creating new connections per query instead of pooling.
  • Transaction scope: Holding transactions open too long, causing lock contention.

Layer 2: I/O and Network

  • Sequential HTTP requests: Convert to concurrent with asyncio.gather(), aiohttp, or thread pools.
  • Missing connection reuse: Creating new HTTP sessions per request instead of using requests.Session().
  • No timeouts: Requests hanging indefinitely on slow endpoints.
  • Unbatched operations: Writing records one at a time instead of bulk inserts.

Layer 3: Python Code

  • Algorithmic complexity: O(n²) loops that should be O(n) with sets/dicts.
  • String concatenation in loops: Use ''.join() or io.StringIO.
  • Repeated computation: Same expensive calculation done multiple times without memoization.
  • GIL contention: CPU-bound work on threads instead of processes.
  • Generator vs list: Loading entire datasets into memory when streaming would work.

Read the full file on GitHub · 157 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. 2mo ago First seen · 157 lines · 351 tokens per session scan A 627543795b04

Subscribe to this mod's changes

perf-optimizer is an agent published in the GitHub repository felipestenzel/mcp-tap (0 stars, last pushed 8mo ago), licensed MIT. It adds 351 tokens to every session and 2,147 once invoked, about $0.0014 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-31.

Related

perf-optimizer compared with agents from other repositories

perf-optimizer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
perf-optimizerfelipestenzel/mcp-tapAgent08mo agoMITA351Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent662yesterdayMITA63Claude Code
debuggerTT-Wang/forgeAgent353d agoMITA17Claude Code
debuggerbostonaholic/rpikitAgent204d agoMITA28Claude Code
loom-advisorcosmix/loomAgent655d agoMITA53Claude Code
evolve-retrospectivemickeyyaya/evolve-loopAgent6yesterdayApache-2.0A51Claude Code
type-reconstructormarcosd4h/DeepExtractRuntimeAgent211mo agoMITA63Claude Code