analyze-performance

analyze-performance is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 3 tokens per session (2,152 once invoked), scanned A, original, MIT.

A Flutter performance review command for mobile applications. It examines rendering, memory, and network-related problems such as slow frames, memory leaks, and unnecessary widget rebuilds.

In plain words
What is it for?
Use it to inspect Flutter rendering, profile builds, find repeated widget updates, and review performance across rendering, memory, or network code.
Why use it?
It helps explain why an app feels slow or uses more memory than expected.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks 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 commands/thebeardedbearsas/claude-craft/analyze-performance
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 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 analyze-performance

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/analyze-performance.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/analyze-performance)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/analyze-performance"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/analyze-performance.svg" alt="Measured on agentmods" height="20"></a>
Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,152 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.00003 $0.02152
Opus 5 $0.00002 $0.01076
Sonnet 5 $0.00001 $0.00430
Haiku 4.5 $0.00000 $0.00215

Measured 2d ago against content hash 8c611f18375f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d 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.

.claude/commands/flutter/analyze-performance.md · 358 lines

How it starts

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

Analyse Performance Flutter

Tu es un expert performance Flutter. Tu dois analyser les performances de l'application, identifier les problèmes (jank, memory leaks, rebuilds inutiles) et proposer des optimisations.

Arguments

$ARGUMENTS

Arguments :

  • (Optionnel) Focus : rendering, memory, network, all

Exemple : /flutter:analyze-performance rendering

MISSION

Étape 1 : Collecte des Métriques

# Lancer en mode profile
flutter run --profile

# DevTools
flutter pub global activate devtools
dart devtools

# Analyser le code
dart analyze --fatal-infos

Étape 2 : Analyse du Rendering

Identifier les Rebuilds Inutiles
// Ajouter dans main.dart pour debug
import 'package:flutter/rendering.dart';

void main() {
  debugProfileBuildsEnabled = true;  // Log les builds
  debugPrintRebuildDirtyWidgets = true;  // Log les rebuilds
  runApp(const MyApp());
}
Problèmes Courants et Solutions
1. Rebuilds en Cascade
// ❌ MAUVAIS - Tout rebuild à chaque changement
class ParentWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Consumer<MyModel>(
      builder: (context, model, _) => Column(
        children: [
          HeaderWidget(title: model.title),
          BodyWidget(items: model.items),
          FooterWidget(), // Rebuild inutile!
        ],
      ),
    );
  }
}

// ✅ BON - Granularité fine
class ParentWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Selector<MyModel, String>(
          selector: (_, model) => model.title,
          builder: (_, title, __) => HeaderWidget(title: title),
        ),
        Selector<MyModel, List<Item>>(
          selector: (_, model) => model.items,
          builder: (_, items, __) => BodyWidget(items: items),
        ),
        const FooterWidget(), // const = pas de rebuild
      ],
    );
  }
}
2. ListView Non Optimisée
// ❌ MAUVAIS - Crée tous les widgets d'un coup
ListView(
  children: items.map((item) => ItemWidget(item: item)).toList(),
)

// ✅ BON - Lazy loading
ListView.builder(
  itemCount: items.length,
  itemBuilder: (context, index) => ItemWidget(item: items[index]),
  // Optimisations supplémentaires
  cacheExtent: 500, // Pré-render
  addAutomaticKeepAlives: false, // Si pas besoin de garder l'état
)

// ✅ ENCORE MIEUX - Avec taille fixe
ListView.builder(
  itemCount: items.length,
  itemExtent: 80, // Hauteur fixe = calcul optimisé
  itemBuilder: (context, index) => ItemWidget(item: items[index]),
)

Read the full file on GitHub · 358 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. 2d ago First seen · 358 lines · 3 tokens per session scan A 8c611f18375f

Subscribe to this mod's changes

analyze-performance is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 3d ago), licensed MIT. It adds 3 tokens to every session and 2,152 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-09-03.