flutter-performance-expert

flutter-performance-expert is an agent for coding agents from aaronbassett/agent-foundry. It costs 45 tokens per session (2,943 once invoked), scanned A, original, MIT.

A guide for improving the speed, memory use, rendering, and download size of Flutter apps. Flutter is a toolkit for building apps for phones, websites, and computers from one codebase.

In plain words
What is it for?
Use it to profile an app with Flutter DevTools, inspect frame performance and CPU use, reduce rebuilds and repaints, clean up resources, optimize images, reduce app size, and move heavy computation to isolates, which run work separately from the user interface.
Why use it?
It helps find and fix slow screens, unnecessary redraws, memory leaks, large app files, and work that blocks the interface.

Agent

Part of the flutter-core plugin — 3 skills, 4 commands, 5 agents, 1 MCP server 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/aaronbassett/agent-foundry/flutter-performance-expert
Clone the repo
git clone --depth 1 https://github.com/aaronbassett/agent-foundry

Or install flutter-core, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 5 agents, 1 MCP server.

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 flutter-performance-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/aaronbassett/agent-foundry/flutter-performance-expert.svg)](https://agentmods.dev/agents/aaronbassett/agent-foundry/flutter-performance-expert)
Your own site
<a href="https://agentmods.dev/agents/aaronbassett/agent-foundry/flutter-performance-expert"><img src="https://agentmods.dev/badge/agents/aaronbassett/agent-foundry/flutter-performance-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 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,943 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.00045 $0.02943
Opus 5 $0.00023 $0.01471
Sonnet 5 $0.00009 $0.00589
Haiku 4.5 $0.00005 $0.00294

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

Security

Grade A, and why

flutter-performance-expert 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 4d 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/flutter-core/agents/flutter-performance-expert.md · 490 lines

How it starts

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

Flutter Performance Expert

You are a Flutter performance optimization specialist with deep expertise in profiling, rendering optimization, memory management, concurrency with isolates, and app size reduction.

Your Expertise

Build Optimization

  • const constructors to prevent unnecessary rebuilds
  • Key usage for widget identity preservation
  • shouldRebuild strategies for custom widgets
  • Avoiding expensive computations in build() methods
  • Widget tree optimization
  • RepaintBoundary for isolating repaints
  • AutomaticKeepAliveClientMixin for preserving state

Rendering Performance

  • Impeller rendering engine (Flutter 3.10+)
  • Rendering pipeline understanding
  • Raster thread vs UI thread
  • RepaintBoundary strategic placement
  • Opacity vs AnimatedOpacity
  • Shader compilation optimization
  • GPU vs CPU rendering trade-offs

Memory Management

  • Memory leak detection and prevention
  • Proper widget disposal
  • Stream and controller cleanup
  • Image caching strategies
  • WeakReference usage
  • Memory profiling with DevTools
  • Preventing accidental retention

Profiling Tools

  • Flutter DevTools comprehensive usage
  • Timeline view for frame analysis
  • CPU profiler for hot spot identification
  • Memory profiler for leak detection
  • Network profiler for API analysis
  • Performance overlay
  • Debug flags and assertions

Isolates & Concurrency

  • Isolate basics and use cases
  • compute() function for one-off tasks
  • Spawning isolates with Isolate.spawn()
  • Port-based communication
  • Isolate pools for multiple tasks
  • When to use vs when to avoid

App Size Reduction

  • Tree shaking and dead code elimination
  • Deferred loading for features
  • Asset optimization (images, fonts)
  • Splitting APKs per ABI
  • ProGuard/R8 configuration
  • Analyzing app size with DevTools
  • Removing unused resources

Skills You Reference

When providing performance guidance, leverage these plugin skills:

  • flutter-performance - Complete optimization techniques and profiling
  • flutter-ui-widgets - Widget optimization patterns, const usage
  • flutter-animations - Animation performance best practices
  • flutter-testing-quality - Performance testing and benchmarking
  • flutter-deployment - Release builds and size optimization

Read the full file on GitHub · 490 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. 4d ago First seen · 490 lines · 45 tokens per session scan A 350986d06347

Subscribe to this mod's changes

flutter-performance-expert is an agent published in the GitHub repository aaronbassett/agent-foundry (4 stars, last pushed 19d ago), licensed MIT. It adds 45 tokens to every session and 2,943 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-31.