profile-optimizer

profile-optimizer is a skill for Claude Code from mthines/agent-skills. It costs 60 tokens per session (2,379 once invoked), scanned A, original, MIT.

A tool for reading performance and memory diagnostic files from React DevTools and Chrome. It finds costly work such as slow tasks, expensive component renders, layout problems, blocked scripts, retained memory, and leaks.

In plain words
What is it for?
Use it to inspect React render profiles, browser performance traces, CPU profiles, heap snapshots, heap timelines, and sampled allocation profiles.
Why use it?
It turns raw profiling data into a ranked explanation of what is slowing an application or using memory unnecessarily.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the mthines-agent-skills plugin — 54 skills, 3 agents, 2 hooks shipped together

Good fit Use it to inspect React render profiles, browser performance traces, CPU profiles, heap snapshots, heap timelines, and sampled allocation profiles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mthines/agent-skills/profile-optimizer
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 mthines/agent-skills --skill profile-optimizer
Clone the repo
git clone --depth 1 https://github.com/mthines/agent-skills

Made for: Claude Code.

Or install mthines-agent-skills, the plugin that ships this one along with the rest of its 54 skills, 3 agents, 2 hooks.

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 profile-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/mthines/agent-skills/profile-optimizer/github.svg)](https://agentmods.dev/skills/mthines/agent-skills/profile-optimizer)
Your own site
<a href="https://agentmods.dev/skills/mthines/agent-skills/profile-optimizer"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/profile-optimizer/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 profile-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/mthines/agent-skills/profile-optimizer"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/profile-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,379 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 100
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 102
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 107
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 103
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 108
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 123
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
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.00060 $0.02379
Opus 5.5 $0.00024 $0.00952
Sonnet 5.5 $0.00012 $0.00476
Haiku 4.5 $0.00006 $0.00238

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

Security

Grade A, and why

profile-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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/heap-diff.mjs, scripts/heap-summary.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/analysis/profile-optimizer/SKILL.md · 203 lines

How it starts

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

Profile Optimizer

Turn a profile file into a ranked, evidence-backed optimisation plan.

Index file. Detailed analysis rules, optimisation patterns, and report templates live under rules/, references/, and templates/. Load only what the current phase needs — the body of SKILL.md is a thin orchestrator.


Inputs

The user passes one or more profile files. Accept any of:

Format Extension Detection signal
React DevTools Profiler .json (often .reactprofile) Top-level keys include dataForRoots and rendererID / version
Chrome Performance trace .json / .json.gz Top-level traceEvents array (or NDJSON with ph, ts, cat)
Chrome CPU profile (legacy) .cpuprofile Top-level nodes, samples, timeDeltas
Chrome heap snapshot .heapsnapshot Top-level snapshot.meta.node_fields + nodes/edges/strings
Chrome heap timeline .heaptimeline Heap snapshot shape + samples array
Chrome heap profile (sampled allocations) .heapprofile Top-level head + samples (V8 sampling-allocation profile)

If the file is gzipped, decompress with gunzip -k before parsing.

If multiple formats are passed, treat them as complementary evidence:

  • React profile + Chrome trace → correlate by wall-clock timestamp (React shows component cost, Chrome shows where the main thread actually spent time).
  • Two or three heap snapshots → diff them to find what grew (leak detection).
  • Chrome trace + heap timeline of the same interaction → CPU + memory cost of one action correlated.

See rules/input-detection.md for the precise detection logic.

Read the full file on GitHub · 203 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. 1mo ago Changed · -9 lines · -158 tokens per session ef921fb0c1f2
  2. 3mo ago First seen · 212 lines · 218 tokens per session scan A f2976e90c36b

Subscribe to this mod's changes

profile-optimizer is a skill published in the GitHub repository mthines/agent-skills (22 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 2,379 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-31.

Related

profile-optimizer compared with skills from other repositories

profile-optimizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
profile-optimizermthines/agent-skillsSkill22yesterdayMITA60Claude Code
ego-lite-simplifycitrolabs/ego-liteSkill26kyesterdayMITA68Codex
debugging-and-error-recoveryshennawardana23/skillmeSkill41mo agoApache-2.0A92Claude Code
go-expertshennawardana23/skillmeSkill41mo agoApache-2.0A107Claude Code
security-analysisshennawardana23/skillmeSkill41mo agoApache-2.0A87Claude Code
debugshennawardana23/skillmeSkill41mo agoApache-2.0A94Claude Code
layered-logging-and-alerting-patternsshennawardana23/skillmeSkill41mo agoApache-2.0A95Claude Code