agentleFS
evolplusevolplus/talos/skills/react-native-performance/SKILL.md

react-native-performance

Skill9 starsChanged 6 months agoApache-2.0View on GitHub

React Native and Expo performance guidance for FE Dev. Use for slow screens, large lists, image-heavy UI, animations, startup time, memory pressure, expensive renders, bridge/native-module overhead, or performance review of React Native code.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when a React Native/Expo task touches performance-sensitive UI: long lists, heavy images, charts, animations, frequent updates, …

    line 14
  2. Very specific:

    avoid recreating expensive arrays, callbacks, and renderItem closures for large lists.

    line 27
  3. Distinctive:

    keep derived data in selectors/memoized helpers, not inline render logic.

    line 29
  4. Very specific:

    use FlatList, SectionList, or the project's virtualized list library for dynamic collections.

    line 32
  5. Distinctive:

    avoid nested scroll views around virtualized lists unless the project pattern proves it safe.

    line 34
  6. Distinctive:

    use the project's image cache/loader.

    line 37
  7. Distinctive:

    avoid decoding oversized local images inside frequently mounted cells.

    line 38
  8. Distinctive:

    Keep animation and gestures off the busy JS path when the project stack supports it:

    line 40
  9. Very specific:

    prefer Reanimated/native-driver/project animation primitives for continuous motion.

    line 41
  10. Distinctive:

    avoid state updates on every frame from JS.

    line 42
  11. Distinctive:

    avoid polling native modules from render/effect loops.

    line 46
  12. Distinctive:

    keep platform adapters small and testable.

    line 47
  13. Distinctive:

    run the narrowest repeatable check: profiler capture, release/profile build smoke test, list scroll test, animation interaction test, or …

    line 49
  14. Very specific:

    Do not add blanket memo, useCallback, or useMemo noise without a concrete render-cost reason.

    line 54
  15. Distinctive:

    Do not trade accessibility, selector stability, or manifest completeness for speed.

    line 55
  16. Very specific:

    Do not introduce a new list/image/animation library without dependency approval.

    line 56
  17. Distinctive:

    Do not optimize only on a high-end simulator when the task targets production mobile users.

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React Native Performance

When to use

Use this when a React Native/Expo task touches performance-sensitive UI: long lists, heavy images, charts, animations, frequent updates, navigation startup, slow gestures, memory pressure, or native bridge traffic. Load it alongside react-native-implementation.

Inputs and outputs

  • Inputs: affected RN screens/components, existing profiling or QA evidence, device/emulator target, design manifest, data size assumptions, current state/image/list/animation libraries.
  • Outputs: targeted performance changes with preserved behavior, measurable before/after evidence when feasible, and tests/checks that prove no manifest or accessibility regression.

Procedure

  1. Define the performance surface:
    • name the slow path, expected data volume, device class, platform, and success criterion;
    • inspect existing profiler/log evidence before changing code when available.
  2. Reduce render churn:
    • avoid recreating expensive arrays, callbacks, and renderItem closures for large lists;
    • memoize only when it removes measured or obvious repeated work;
    • keep derived data in selectors/memoized helpers, not inline render logic;
    • split components around independently changing state.
  3. Tune lists:
    • use FlatList, SectionList, or the project's virtualized list library for dynamic collections;
    • provide stable keys, getItemLayout when row height is fixed, bounded initial render counts, and explicit empty/loading states;
    • avoid nested scroll views around virtualized lists unless the project pattern proves it safe.
  4. Handle images and assets:
    • serve appropriately sized assets;
    • use the project's image cache/loader;
    • avoid decoding oversized local images inside frequently mounted cells;
    • prefetch only high-confidence next-step assets.
  5. Keep animation and gestures off the busy JS path when the project stack supports it:
    • prefer Reanimated/native-driver/project animation primitives for continuous motion;
    • avoid state updates on every frame from JS;
    • respect reduced-motion settings.
  6. Watch bridge/native overhead:
    • batch native calls and analytics events where the project already has a batching layer;
    • avoid polling native modules from render/effect loops;
    • keep platform adapters small and testable.
  7. Verify:
    • run the narrowest repeatable check: profiler capture, release/profile build smoke test, list scroll test, animation interaction test, or memory check;
    • record unmeasured performance assumptions in the task notes instead of presenting them as proof.

Hard rules

  • Do not add blanket memo, useCallback, or useMemo noise without a concrete render-cost reason.
  • Do not trade accessibility, selector stability, or manifest completeness for speed.
  • Do not introduce a new list/image/animation library without dependency approval.
  • Do not optimize only on a high-end simulator when the task targets production mobile users.

References

  • ../react-native-implementation/SKILL.md - baseline RN implementation discipline.
  • ../third-party-dependency-evaluation/SKILL.md - dependency approval for new performance libraries.
  • ../ui-test-execution/SKILL.md - UI regression checks after performance changes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.