> flutter-performance
Optimization standards for rebuilds and memory. Use when optimizing Flutter widget rebuilds, reducing memory usage, or improving rendering performance. (triggers: lib/presentation/**, pubspec.yaml, const, buildWhen, ListView.builder, Isolate, RepaintBoundary)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/flutter-performance?format=md"Performance
Priority: P1 (OPERATIONAL)
Performance optimization techniques for smooth 60fps Flutter applications.
- Rebuilds: Use
constwidgets andbuildWhen/selectfor granular updates. - Lists: Always use
ListView.builderfor item recycling. - Heavy Tasks: Use
compute()orIsolatesfor parsing/logic. - Repaints: Use
RepaintBoundaryfor complex animations. UsedebugRepaintRainbowEnabledto debug. - Images: Use
CachedNetworkImage+memCacheWidth.precachePicturefor SVGs. - Keys: Provide
ValueKeyfor list items and stable IDs for reconciliation. - Resource Cleanup: Dispose controllers/streams in
dispose(). - Pagination: Default to 20 items per page for network lists.
- Build Purity: Keep
buildmethods free of heavy work; move logic to BLoC/Application. - Image Resizing: Always set
maxWidth/maxHeightwhen loading images.
🚫 Anti-Patterns
- Large Rebuilds:
**No SetState at Root**: Use granular builders (BlocBuilder, Consumer). - Logic in Build:
**No Heavy Work in body**: Perform parsing/sorting in the Business Layer. - Missing Const:
**No Dynamic Leaf Widgets**: Use const where possible.
BlocBuilder<UserBloc, UserState>(
buildWhen: (p, c) => p.id != c.id,
builder: (context, state) => Text(state.name),
)
🚫 Anti-Patterns
- Do NOT use standard patterns if specific project rules exist.
- Do NOT ignore error handling or edge cases.
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)