performance-optimizer

performance-optimizer is an agent for coding agents from affaan-m/ECC. It costs 44 tokens per session (1,100 once invoked), scanned A, original, MIT.

A guide for finding why an application is slow or uses too much memory, then improving its code, page rendering, network requests, database queries, and JavaScript bundle size.

In plain words
What is it for?
Use it to profile applications, reduce browser bundle sizes, improve React rendering, speed up algorithms, optimize database and API usage, and reduce memory use.
Why use it?
It helps locate the actual bottleneck instead of guessing which code needs changing. It also covers issues such as memory leaks and unnecessary screen updates.

Agent

Part of the ecc plugin — 70 skills, 56 commands, 68 agents, 1 MCP server shipped together

About the project

ECC is a toolkit that organizes and improves how coding agents work through skills, memory, security checks, research practices, and related extensions. It is for developers using agents such as Claude Code, Codex, OpenCode, and Cursor.

affaan-m/ECC · 248,541 stars · on GitHub

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/affaan-m/ecc/performance-optimizer
Clone the repo
git clone --depth 1 https://github.com/affaan-m/ECC

Or install ecc, the plugin that ships this one along with the rest of its 70 skills, 56 commands, 68 agents, 1 MCP server.

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/affaan-m/ecc/performance-optimizer.svg)](https://agentmods.dev/agents/affaan-m/ecc/performance-optimizer)
Your own site
<a href="https://agentmods.dev/agents/affaan-m/ecc/performance-optimizer"><img src="https://agentmods.dev/badge/agents/affaan-m/ecc/performance-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 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,100 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 $0.00044 $0.01100
Opus 5 $0.00022 $0.00550
Sonnet 5 $0.00009 $0.00220
Haiku 4.5 $0.00004 $0.00110

Measured yesterday against content hash ecd7172e0719, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

.kiro/agents/performance-optimizer.md · 128 lines

How it starts

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

Performance Optimizer

You are an expert performance specialist focused on identifying bottlenecks and optimizing application speed, memory usage, and efficiency. Your mission is to make code faster, lighter, and more responsive.

Core Responsibilities

  1. Performance Profiling — Identify slow code paths, memory leaks, and bottlenecks
  2. Bundle Optimization — Reduce JavaScript bundle sizes, lazy loading, code splitting
  3. Runtime Optimization — Improve algorithmic efficiency, reduce unnecessary computations
  4. React/Rendering Optimization — Prevent unnecessary re-renders, optimize component trees
  5. Database & Network — Optimize queries, reduce API calls, implement caching
  6. Memory Management — Detect leaks, optimize memory usage, cleanup resources

Analysis Commands

# Bundle analysis
npx bundle-analyzer
npx source-map-explorer build/static/js/*.js

# Node.js profiling
node --prof your-app.js
node --prof-process isolate-*.log

# React profiling (in browser) — React DevTools > Profiler tab

Performance Review Workflow

1. Critical Performance Indicators

Metric Target Action if Exceeded
First Contentful Paint < 1.8s Optimize critical path, inline critical CSS
Largest Contentful Paint < 2.5s Lazy load images, optimize server response
Time to Interactive < 3.8s Code splitting, reduce JavaScript
Cumulative Layout Shift < 0.1 Reserve space for images, avoid layout thrashing
Total Blocking Time < 200ms Break up long tasks, use web workers
Bundle Size (gzipped) < 200KB Tree shaking, lazy loading, code splitting

2. Algorithmic Analysis

Pattern Complexity Better Alternative
Nested loops on same data O(n²) Use Map/Set for O(1) lookups
Repeated array searches O(n) per search Convert to Map for O(1)
Sorting inside loop O(n² log n) Sort once outside loop
String concatenation in loop O(n²) Use array.join()
Deep cloning large objects O(n) each time Use shallow copy or immer
Recursion without memoization O(2^n) Add memoization

Read the full file on GitHub · 128 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. yesterday First seen · 128 lines · 44 tokens per session scan A ecd7172e0719

Subscribe to this mod's changes

performance-optimizer is an agent published in the GitHub repository affaan-m/ECC (248,541 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 1,100 once invoked, about $0.0002 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-09-03.

Related

Other agents, from other repositories

frontend-developer

Build React components, implement responsive layouts, and handle client-side state management. Optimizes frontend performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.

echoVic/blade-code · 41 tokens

frontend

Builds and improves production-grade web UI (HTML/CSS/JS, React, etc.) by applying the impeccable design methodology.

Nafjan/summon · 0 tokens

design

Agent "design" from Miosa-osa/OSA, covering design — design & creative, default territory, design files & tokens, css / styling config and component documentation.

Miosa-osa/OSA · 0 tokens

fixed-nav-clearance

Every page-level container that sits directly under MUST provide its own top clearance to sit below the fixed nav. The site nav ( in docs/js/site-nav.js, rule at docs/css/styles.css L299–315) is position: fixed with padding: .9rem 2rem + a 1px border, giving it an effective height of 58px. Nothing in the layout…

gaia-research/gaia-skill-tree · 0 tokens

Praxis — Figma Make + Sites Producer

God Agent — Figma Make + Sites Producer & Publishing Director. Praxis (πρᾶξις) — Aristotles concept of practice, action directed toward a goal. Praxis is.

Holley-Studio/thesmos-governance · 52 tokens

frontend-specialist

Senior Frontend Architect who builds maintainable React/Next.js systems with performance-first mindset. Use when working on UI components, styling, state management, responsive design, or frontend architecture. Triggers on keywords like component, react, vue, ui, ux, css, tailwind, responsive.

ashrafmusa/agenticana · 63 tokens