analyze-performance

analyze-performance is a command for Claude Code from Matt-Dionis/claude-code-configs. It costs 7 tokens per session (285 once invoked), scanned A, original, MIT.

A command that examines a Next.js application for speed problems and produces an optimization report. It looks at JavaScript bundle size, loading metrics, rendering, images, fonts, scripts, data fetching, and caching.

In plain words
What is it for?
Use it to inspect large dependencies, code-splitting opportunities, Core Web Vitals such as LCP, CLS, and INP, rendering choices, and Next.js caching.
Why use it?
It helps locate code and configuration that make pages load slowly or respond poorly. The report connects these problems with specific changes to consider.

Command for Claude Code

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 commands/matt-dionis/claude-code-configs/analyze-performance
Clone the repo
git clone --depth 1 https://github.com/Matt-Dionis/claude-code-configs

Made for: Claude Code.

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 analyze-performance

README.md
[![agentmods](https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/analyze-performance.svg)](https://agentmods.dev/commands/matt-dionis/claude-code-configs/analyze-performance)
Your own site
<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/analyze-performance"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/analyze-performance.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 285 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.00007 $0.00285
Opus 5 $0.00003 $0.00143
Sonnet 5 $0.00001 $0.00057
Haiku 4.5 $0.00001 $0.00028

Measured 5d ago against content hash 5fab2488b568, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze-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 5d 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.

configurations/frameworks/nextjs-15/.claude/commands/analyze-performance.md · 47 lines

What it actually says

Perform a comprehensive performance analysis of the Next.js application:

Bundle Analysis

  1. Check if @next/bundle-analyzer is installed, install if needed
  2. Run build with ANALYZE=true to generate bundle analysis
  3. Identify large dependencies and opportunities for code splitting

Core Web Vitals Analysis

  1. Check for Web Vitals monitoring setup
  2. Analyze current implementation for:
    • Largest Contentful Paint (LCP) issues
    • Cumulative Layout Shift (CLS) problems
    • First Input Delay (FID) / Interaction to Next Paint (INP)

Code Analysis

  1. Find components not using dynamic imports where appropriate
  2. Check image optimization (using next/image properly)
  3. Verify font optimization (using next/font)
  4. Analyze third-party script loading strategies
  5. Check for unnecessary client-side data fetching

Caching Analysis

  1. Review fetch caching strategies
  2. Check for proper use of revalidate
  3. Analyze static vs dynamic rendering choices

Generate Report

Create a detailed performance report with:

  • Current bundle size metrics
  • Largest dependencies
  • Optimization opportunities ranked by impact
  • Specific code changes needed
  • Estimated performance improvements

Save the report to performance-report.md with actionable recommendations.

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. 5d ago First seen · 47 lines · 7 tokens per session scan A 5fab2488b568

Subscribe to this mod's changes

analyze-performance is a command published in the GitHub repository Matt-Dionis/claude-code-configs (625 stars, last pushed 1y ago), licensed MIT. It adds 7 tokens to every session and 285 once invoked, about $0.0000 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.