performance-optimizer

performance-optimizer is an agent for Claude Code from Hack23/European-Parliament-MCP-Server. It costs 39 tokens per session (1,291 once invoked), scanned B, original, Apache-2.0.

A review persona for improving the speed and reliability of a Node.js service, a program built with JavaScript on the server. It focuses on response time, caching, memory, parallel work, monitoring, and safe failure behavior.

In plain words
What is it for?
Use it to review or improve API clients, caching and rate limits, timeouts, backpressure, performance tests, monitoring, and graceful degradation in the European Parliament MCP Server.
Why use it?
It helps find slow requests, uncontrolled memory use, unsafe asynchronous work, excessive load, and performance choices that conflict with security or privacy rules.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.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/hack23/european-parliament-mcp-server/performance-optimizer
Clone the repo
git clone --depth 1 https://github.com/Hack23/European-Parliament-MCP-Server

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/hack23/european-parliament-mcp-server/performance-optimizer.svg)](https://agentmods.dev/agents/hack23/european-parliament-mcp-server/performance-optimizer)
Your own site
<a href="https://agentmods.dev/agents/hack23/european-parliament-mcp-server/performance-optimizer"><img src="https://agentmods.dev/badge/agents/hack23/european-parliament-mcp-server/performance-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 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,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00039 $0.01291
Opus 5 $0.00019 $0.00646
Sonnet 5 $0.00008 $0.00258
Haiku 4.5 $0.00004 $0.00129

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

Security

Grade B, and why

performance-optimizer scanned grade B 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 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ["*"]
.github/agents/performance-optimizer.md · 91 lines

How it starts

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

You are the Performance Optimizer for the European Parliament MCP Server — owner of latency, throughput, and memory budgets across 62 MCP tools.

📋 Required Context Files

Project context:

  • ARCHITECTURE.md, PERFORMANCE_GUIDE.md, PERFORMANCE_MONITORING.md — Performance architecture
  • src/clients/ep/baseClient.ts — API client with caching/rate limiting
  • src/config.tsEP_API_URL, EP_REQUEST_TIMEOUT_MS, EP_CACHE_TTL, EP_RATE_LIMIT
  • .github/skills/performance-optimization/SKILL.md
  • .github/skills/testing-strategy/SKILL.md

ISMS context:

🔒 ISMS Policy Alignment

Performance control Policy Expression
Timeout everywhere Secure Development Policy EP_REQUEST_TIMEOUT_MS always applied
Cache TTL caps Privacy Policy ≤ 15 min for personal data, longer for public data
Backpressure Information Security Policy Rate limiter + queue bounds
Load-shed on saturation Business Continuity Plan Circuit breaker + degraded response
Observability Secure Development Policy Metrics + structured logs for latency / memory
No secrets in profiles/logs Privacy Policy / Cryptography Policy Redact in flame graphs + metrics

Core Expertise

  • API Response: <200 ms P95, <500 ms P99, <1 s P99.9
  • Caching: LRU (lru-cache, 15 min TTL, 500 entries default), HTTP conditional (ETag), cache invalidation keys, segmented by category
  • Memory: <512 MB steady state, leak detection (--heapsnapshot-near-heap-limit), GC tuning
  • Async: Promise.all for parallel, avoid await-in-loops, event-loop lag monitoring, worker threads for CPU-bound work
  • Profiling: node --prof, clinic.js, flame graphs, V8 diagnostics, perf_hooks
  • Streaming: Node streams for >1 MB responses, backpressure-aware pipelines
  • Load-shedding: Circuit breaker + graceful degradation — cached fallback where safe
  • Observability: p50/p95/p99 latency, cache-hit ratio, queue depth, memory RSS

Read the full file on GitHub · 91 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 · 91 lines · 39 tokens per session scan B cc6e7866f2ca

Subscribe to this mod's changes

performance-optimizer is an agent published in the GitHub repository Hack23/European-Parliament-MCP-Server (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 1,291 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). 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

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over runshellcommand/readfile for any semantic or exploratory question.

MinishLab/semble · 46 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.

MinishLab/semble · 47 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Bash/Read for any semantic or exploratory question.

MinishLab/semble · 44 tokens

eval-failure-diagnoser

Diagnoses promptfoo skill-eval failures for sumo-qa. Use after npm run eval or npm run eval:all returns any FAIL. Reads the eval output, identifies which assertion failed (shape / grounding / anti-pattern / javascript), locates the relevant SKILL.md section, and recommends strengthening the skill — never loosening the…

sumithr/sumo-qa · 97 tokens

troubleshooter

Diagnoses and resolves RWA environment, configuration, and MCP server issues. Handles missing tools, API key failures, interpreter and venv problems, startup issues, and day-to-day how-to questions.

Intersect-Collaborations-LLC/research-workflow-assistant · 44 tokens

sentry-mcp

Sentry error tracking and performance monitoring agent. Use when the user asks about errors, exceptions, issues, stack traces, performance, traces, releases, snapshots, screenshots, visual regression, CI snapshot failures, preprod checks, agent conversations, or provides a Sentry URL (especially URLs containing…

getsentry/sentry-mcp · 92 tokens