flutter-performance

A guide for making Flutter apps use less memory and do less work during screen updates. It covers widget rebuilding, large lists, images, animations, background computation, and performance profiling.

In plain words
What is it for?
Use it to optimize large lists and remote images, reduce unnecessary rebuilds, isolate animated areas, move large JSON or sorting tasks off the main isolate, and prevent memory leaks.
Why use it?
It helps reduce slow scrolling, dropped frames, excessive memory use, and delays caused by heavy work on the main app thread. It also provides patterns for updating only the parts of a screen that changed.

Skill for Claude CodeCodex

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 skills/yendangn/flutter-app-builder/flutter-performance
Any agent
npx skills add yendangn/flutter-app-builder --skill flutter-performance
Clone the repo
git clone --depth 1 https://github.com/yendangn/flutter-app-builder

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 476 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.00067 $0.00476
Opus 5 $0.00034 $0.00238
Sonnet 5 $0.00013 $0.00095
Haiku 4.5 $0.00007 $0.00048

Measured 2d ago against content hash b70c7b35cc3f, 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 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.

skills/flutter-performance/SKILL.md · 46 lines

What it actually says

Flutter Performance

Full reference: template.md

Key rules

Const everything possible

  • Mark widgets, constructors, lists, and maps const wherever valid — eliminates rebuild.
  • Use const in itemBuilder callbacks for static children.

Minimize rebuild scope

  • Extract frequently-rebuilding children into separate StatelessWidgets.
  • Use BlocSelector instead of BlocBuilder when only a subset of state is needed.
  • RepaintBoundary around independently-animating subtrees (maps, charts, video).

List performance

  • ListView.builder + ListView.separated for large lists — never ListView(children: []).
  • Set itemExtent or prototypeItem on ListView.builder when all items have the same height (skips layout).
  • CachedNetworkImage for all remote images — AppCachedImage wrapper.

Isolates

  • Offload JSON decoding > 1 MB with compute(jsonDecode, rawString).
  • Offload sorting/filtering large lists with compute().
  • Never do heavy computation on the main isolate.

Image optimization

  • Use width/height on AppCachedImage to constrain decode size.
  • Use memCacheWidth/memCacheHeight for thumbnails.
  • Prefer WebP over PNG for large assets.

Anti-patterns

  • setState in build() — always causes infinite rebuild.
  • MediaQuery.of(context) deep in the tree — cache at page level.
  • Creating TextEditingController / AnimationController in build() — use State.
  • Opacity(opacity: 0) to hide — use Visibility or Offstage.

Co-load with

  • flutter-common-widgets — App widgets are already optimized
  • flutter-animations — animations must not drop frames
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 · 46 lines · 67 tokens per session scan A b70c7b35cc3f

Subscribe to this mod's changes

flutter-performance is a skill published in the GitHub repository yendangn/flutter-app-builder (5 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 476 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

sceneview

Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…

sceneview/sceneview · 156 tokens

app-preview-video

When the user wants to plan, script, produce, or optimize App Store Preview videos or Google Play promo videos — the autoplay videos that show in App Store/Play Store search and product pages. Use when the user mentions "App Preview", "preview video", "app store video", "promo video", "Play Store video", "video poster…

Eronred/aso-skills · 143 tokens

argent-screen-recording

Record a video of an iOS simulator or Android emulator/device screen using argent MCP tools. Use when the user asks to record the screen, capture a video of a flow, interaction, or animation, produce a screen recording, or document app behavior as a video clip.

software-mansion/argent · 59 tokens

generate-images-with-firebase-ai

Use when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API vs Vertex AI, hitting quota, billing or App Check failures, getting empty or image-only responses, sending a user photo as input, controlling…

evanca/flutter-ai-rules · 84 tokens

scenekit-product-stages

Build and debug SceneKit scenes where one 3D object (a product, badge, coin, wheel) performs on a transparent stage inside a SwiftUI app - studio lighting, real shadows, baked keyframe choreography, hand-rolled physics, gestures and haptics, multi-scene sequencing. Use when working with SCNView or SceneView in…

dembsky/PropMotion · 306 tokens

store-screenshots

앱스토어·플레이스토어 등록용 마케팅 스크린샷 자동 생성. 원본 앱 스크린샷에 기기 프레임(iPhone, iPad, Galaxy, Fold, Flip)을 씌우고 배경 그라데이션과 홍보 문구를 얹어 스토어 규격 PNG로 출력한다. Turns raw app screenshots into store-ready App Store & Google Play marketing images — device frames, branded backgrounds, marketing copy, exact store sizes. "스토어 스크린샷 만들어줘", "앱스토어 이미지"…

LeeHueeng/store-screenshots · 154 tokens