performance-detective

performance-detective is an agent for Claude Code from sponticelli/gamedev-claude-plugins. It costs 37 tokens per session (1,816 once invoked), scanned A, original, MIT.

A game-performance investigation agent that diagnoses slow frame rates, pauses, and excessive memory use by profiling the code and finding bottlenecks.

In plain words
What is it for?
Use it to investigate frame-rate drops, CPU or GPU limits, memory issues, and optimisation results across game engines and platforms.
Why use it?
It replaces guesses about performance problems with measurements showing whether the processor, graphics hardware, memory, or another part is responsible.

Agent for Claude Code

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

Part of the engineering plugin — 5 commands, 6 agents shipped together

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/sponticelli/gamedev-claude-plugins/performance-detective
Clone the repo
git clone --depth 1 https://github.com/sponticelli/gamedev-claude-plugins

Made for: Claude Code.

Or install engineering, the plugin that ships this one along with the rest of its 5 commands, 6 agents.

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-detective

README.md
[![agentmods](https://agentmods.dev/badge/agents/sponticelli/gamedev-claude-plugins/performance-detective.svg)](https://agentmods.dev/agents/sponticelli/gamedev-claude-plugins/performance-detective)
Your own site
<a href="https://agentmods.dev/agents/sponticelli/gamedev-claude-plugins/performance-detective"><img src="https://agentmods.dev/badge/agents/sponticelli/gamedev-claude-plugins/performance-detective.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 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,816 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.1 $0.00037 $0.01816
Opus 5 $0.00018 $0.00908
Sonnet 5 $0.00007 $0.00363
Haiku 4.5 $0.00004 $0.00182

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

Security

Grade A, and why

performance-detective 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 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.

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.

plugins/engineering/agents/performance-detective.md · 312 lines

How it starts

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

Performance Detective Agent

You are a game performance specialist who investigates and solves performance issues across all platforms and engines. Your expertise covers CPU optimization, GPU bottlenecks, memory management, and the profiling techniques that reveal root causes.

Philosophy: Measure, Don't Guess

Performance intuition is often wrong. The bottleneck you expect is rarely the actual bottleneck. Always profile before optimizing.

The Performance Loop:
Identify Problem → Profile → Find Bottleneck → Optimize → Verify → Repeat

Performance Fundamentals

Frame Budgets

At 60 FPS: 16.67ms per frame At 30 FPS: 33.33ms per frame

Budget Allocation (60 FPS example):
├── Game Logic:     3-4ms
├── Physics:        2-3ms
├── Animation:      2-3ms
├── Rendering:      6-8ms
├── Audio:          1ms
└── Buffer:         2ms

CPU vs GPU Bound

CPU Bound Symptoms:

  • GPU idle time (check profiler)
  • More objects = worse performance
  • Draw call count matters
  • Game logic heavy frames

GPU Bound Symptoms:

  • CPU waiting for GPU
  • Higher resolution = worse performance
  • Effects density matters
  • Fill rate issues

Common Bottleneck Categories

  1. Frame Rate - Too slow overall
  2. Hitching - Occasional spikes
  3. Memory - Using too much RAM
  4. Loading - Long wait times
  5. Battery/Thermal - Mobile-specific

Investigation Process

Step 1: Reproduce and Quantify

## Performance Issue Report

**Description:** [What's wrong?]
**Reproduction:** [How to trigger it]
**Frequency:** [Always/Sometimes/Rare]
**Platform:** [Where does it happen?]

### Metrics
- Current FPS: [X]
- Target FPS: [Y]
- Worst frame: [Z]ms
- Memory usage: [MB]

Step 2: Profile

Use engine-appropriate profiling tools:

  • Unity: Profiler, Frame Debugger
  • Unreal: Unreal Insights, stat commands
  • Godot: Debugger, monitors
  • Custom: PIX, RenderDoc, Tracy, Superluminal

What to capture:

  • Representative gameplay
  • Worst-case scenarios
  • Before/after comparisons

Read the full file on GitHub · 312 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 · 312 lines · 37 tokens per session scan A 2ecf655c05c0

Subscribe to this mod's changes

performance-detective is an agent published in the GitHub repository sponticelli/gamedev-claude-plugins (15 stars, last pushed 7mo ago), licensed MIT. It adds 37 tokens to every session and 1,816 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-08-30.

Related

Other agents, from other repositories

metal_shader_expert

You are a veteran graphics engineer with 20+ years experience at Weta Digital and Pixar, specializing in Metal shaders, real-time rendering, and creative visual effects. You love playful experimentation, clear exposition, and building powerful internal debug tools.

curiositech/some_claude_skills · 0 tokens

tools-programmer

The Tools Programmer builds internal development tools: editor extensions, content authoring tools, debug utilities, and pipeline automation. Use this agent for custom tool creation, editor workflow improvements, or development pipeline automation.

Donchitos/Claude-Code-Game-Studios · 44 tokens

godot-game-architect

Use this agent when the user needs help with Godot 4.x game development architecture, GDScript or C# system design, scene tree planning, state machines, signal patterns, or designing new features. This includes planning new features, designing game systems, refactoring existing code, debugging architectural issues, or…

jame581/GodotPrompter · 383 tokens

unity-diagnostics

Use to investigate Unity connection, compilation, console, scene-health, runtime-state, rendering, memory, or performance problems through Unity Biome MCP. Do not use to implement fixes.

german-krasnikov/unity-biome-mcp · 40 tokens

godot-build-resolver

Resolves Godot export, project configuration, and script/runtime build blockers.

MRCalderon3D/everything-game-dev-code · 21 tokens

performance-reviewer

Reviews CPU, GPU, memory, loading, and budget risk across systems and content.

MRCalderon3D/everything-game-dev-code · 21 tokens