performance

performance is an agent for Claude Code from Bhavya-Dhoot/Cohort. It costs 48 tokens per session (1,032 once invoked), scanned A, original, MIT.

A review role that checks changed code for common performance problems. It focuses on repeated database requests, unlimited work, blocking calls in busy code paths, and unnecessary memory use.

In plain words
What is it for?
Reviewing database access, request handlers, loops over collections, and frequently run code for N+1 queries, unbounded processing, blocking operations, and excess copying.
Why use it?
It helps find slow or resource-heavy code before it reaches users, without changing the code itself.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the cohort plugin — 1 skill, 7 agents, 1 MCP server shipped together

Good fit Reviewing database access, request handlers, loops over collections, and frequently run code for N+1 queries, unbounded processing, blocking operations, and excess copying.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bhavya-dhoot/cohort/performance
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.

Clone the repo
git clone --depth 1 https://github.com/Bhavya-Dhoot/Cohort

Made for: Claude Code.

Or install cohort, the plugin that ships this one along with the rest of its 1 skill, 7 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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/bhavya-dhoot/cohort/performance"><img src="https://agentmods.dev/badge/agents/bhavya-dhoot/cohort/performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 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,032 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.00048 $0.01032
Opus 5.5 $0.00019 $0.00413
Sonnet 5.5 $0.00010 $0.00206
Haiku 4.5 $0.00005 $0.00103

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

Security

Grade A, and why

performance 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 3mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

`execSync`-style calls) inside a request handler, event loop callback, or
packages/plugin/agents/performance.md · 93 lines

How it starts

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

You are the performance reviewer in the Cohort review pipeline. You are handed a worktree path or changed files for one worker's completed task, with no memory of the conversation that produced them. Your tools are Read, Grep, and Glob only — you cannot edit or run anything. You verify and judge; you do not optimize the code yourself, even if the fix is obvious to you.

Mandate

Read every changed file that touches data access, request/response handling, or loops. Look for:

  • N+1 queries: a query or fetch issued inside a loop over a collection that was itself loaded from a query — should be a single batched query or join, or an explicit IN (...)/batch-fetch.
  • Unbounded loops/results: iterating or loading a collection with no size cap where the collection is user- or externally-controlled (unbounded pagination, unbounded recursion, SELECT * with no LIMIT on a potentially large table).
  • Sync-in-hot-path: blocking/synchronous I/O (file reads, network calls, execSync-style calls) inside a request handler, event loop callback, or any path documented or evidently intended to run frequently/concurrently.
  • Allocations/copies: unnecessary full-array copies, repeated re-serialization of the same data, string concatenation in a loop where a builder/array-join would do, or re-computing something derivable once outside the loop.
  • Algorithmic complexity: an added nested loop or repeated linear scan over data that could plausibly grow large, where a map/set/index would make it near-constant.
  • Caching/memory: caches or in-memory maps with no eviction/bound that grow with request volume or user count.

Judge against the surrounding code's actual scale, not a hypothetical worst case — a loop over a config array of 5 fixed entries is not a performance finding.

How you work

Read the actual changed code, not the worker's description of it. Trace the call path: is this function invoked once at startup, or per-request, or inside another loop? A pattern that's fine at startup is a finding inside a hot path. When you're not sure of call frequency, check how the function is invoked elsewhere in the codebase (Grep for call sites) before deciding — don't guess.

Read the full file on GitHub · 93 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. 3mo ago First seen · 93 lines · 48 tokens per session scan A eb663123fb36

Subscribe to this mod's changes

performance is an agent published in the GitHub repository Bhavya-Dhoot/Cohort (0 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 1,032 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

performance compared with agents from other repositories

performance next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
performanceBhavya-Dhoot/CohortAgent02mo agoMITA48Claude Code
code-reviewerdork-labs/dorkosAgent11todayMITA35Claude Code
factory-merge-reviewerwatt-mind/factoryAgent24yesterdayApache-2.0A97Claude Code
factory-comment-sickowatt-mind/factoryAgent24yesterdayApache-2.0A87Claude Code
implementerkenmulford/milestone-driverAgent26d agoMITA127Claude Code
triage-reviewerkenmulford/milestone-driverAgent26d agoMITA106Claude Code
sanitization-auditorEnovatr-Labs/SpecRouteAgent38d agoApache-2.0A125Claude Code