performance

performance is a skill for Claude Code from mehrad-dm/mastermind. It costs 57 tokens per session (746 once invoked), scanned A, original, MIT.

A performance-investigation workflow for finding and fixing measurable causes of slow software. Performance means how quickly and efficiently a program runs.

In plain words
What is it for?
Use it to reproduce slowness, record a baseline, profile the system, identify the largest source of delay, and verify the improvement.
Why use it?
It prevents time being spent on guesses or changes that do not address the actual bottleneck.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mastermind plugin — 32 skills, 4 agents, 1 hook shipped together

Good fit Use it to reproduce slowness, record a baseline, profile the system, identify the largest source of delay, and verify the improvement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mehrad-dm/mastermind/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.

Any agent
npx skills add mehrad-dm/mastermind --skill performance
Clone the repo
git clone --depth 1 https://github.com/mehrad-dm/mastermind

Made for: Claude Code.

Or install mastermind, the plugin that ships this one along with the rest of its 32 skills, 4 agents, 1 hook.

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/skills/mehrad-dm/mastermind/performance/github.svg)](https://agentmods.dev/skills/mehrad-dm/mastermind/performance)
Your own site
<a href="https://agentmods.dev/skills/mehrad-dm/mastermind/performance"><img src="https://agentmods.dev/badge/skills/mehrad-dm/mastermind/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/skills/mehrad-dm/mastermind/performance"><img src="https://agentmods.dev/badge/skills/mehrad-dm/mastermind/performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 746 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.00057 $0.00746
Opus 5.5 $0.00023 $0.00298
Sonnet 5.5 $0.00011 $0.00149
Haiku 4.5 $0.00006 $0.00075

Measured 15d ago against content hash cf9d68342936, 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 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 15d 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.

skills/performance/SKILL.md · 43 lines

How it starts

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

Performance: measure, find the real bottleneck, fix the biggest, verify

Slowness has a real, measurable cause. The cardinal sin is optimizing by intuition. You'll spend effort on the wrong thing and maybe trade away correctness for nothing. Get data first.

The loop

  1. Reproduce + measure. Get a real number under a realistic scenario: wall-clock, FPS/frame time, query ms (EXPLAIN ANALYZE), request latency, bundle size, memory. No number, no optimizing. Write it down; it's your before.
  2. Find the bottleneck: profile it. Use the right instrument (browser Performance panel / React Profiler, a flame graph, DB query plan, a tracer) and find where the time actually goes, the ~20% causing ~80%. The universal classes of waste: repeated work (recomputed per item/render instead of once), amplified work (one request fanning out into N), missing lookup structure (a scan where an index/map belongs), serial waiting (round-trips that could be batched or parallel), oversized payloads, and no caching of stable results. For the domain-specific suspects, load the active field pack (engineering/active-field.md → the pack's performance section); if the field has no pack, let the profile, not a checklist, name the suspect.
  3. Fix the biggest one. Make the single change with the most impact; resist micro-optimizing noise. Prefer doing less work (cache, batch, index, memoize, defer, paginate) over doing the same work faster.
  4. Verify the win. Re-measure the same way: confirm the number actually moved, and that behavior and correctness are unchanged (core/rigor.md). A "faster" version that's subtly wrong is a regression.
  5. Guard it. Note the metric (a comment, a budget, a perf test) so the regression is visible next time.

After

Run levelup (capture) to record the bottleneck class and its lesson in the active field's lessons.md: including the wrong suspect you ruled out, so MasterMind doesn't re-profile it next time. Report: before → after numbers, the cause, the fix, and the guard added.

Read the full file on GitHub · 43 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 15d ago Changed cf9d68342936
  2. 1mo ago First seen · 43 lines · 57 tokens per session scan A e79cef67c02b

Subscribe to this mod's changes

performance is a skill published in the GitHub repository mehrad-dm/mastermind (23 stars, last pushed 6d ago), licensed MIT. It adds 57 tokens to every session and 746 once invoked, about $0.0002 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-30.