Index of every page on this site: llms.txt
All skills
neha avatar

/performance

@eb9f097
Run it yourself

Review React Native code for rendering performance, list virtualisation, memoisation, image handling, animations, and memory/resource cleanup. Use when a screen feels janky, before merging UI-heavy code, or when profiling.

Use this Skill: https://skilld.dev/gh/neha/rn-developer-skills/performance

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈59 tokens for metadata: the name and description. ≈898 when used: this file.

Description uses 2.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈236 characters, or 2.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Performance Skill

Applicability

  • Platforms: iOS and Android
  • React Native: 0.76+ (New Architecture interop assumed unless a checklist item says otherwise)

When to Use

  • A screen drops frames, stutters, or feels slow
  • Reviewing UI-heavy code or long lists before merge
  • Profiling re-renders or memory growth over a session
  • Adding animations or large images

Severity

  • Merge-blocking: a timer, interval, or listener this diff adds is still running after unmount.
  • Should-fix: list virtualisation and memoisation.

Guidance

Rendering

Measure before adding memoisation. If the React Compiler is enabled for the file, do not add useMemo or useCallback only to satisfy this list.

  • A hot child that is already wrapped in React.memo does not receive a new function or object on every render
  • A computation that shows up in a profile is cached; trivial work is left as is
  • Styles in a list row are not new objects on every render

Incorrect:

<UserCard onPress={() => handlePress(user.id)} />

Correct:

<UserCard onPress={handlePress} userId={user.id} />

Lists

  • A list that can grow past one screen is virtualised. A short, bounded list may use a plain list
  • Large data sets paginate or use infinite scroll, never render the full array
  • List items are memoised when a profile shows the row re-rendering unnecessarily

Images

  • Images lazy loaded below the fold
  • Images use a modern compressed format (e.g. WebP) at correct dimensions (no oversized assets)

Animations

  • Complex animations run on the UI thread (e.g. Reanimated), not the JS thread
  • No animation work blocking interaction

Loading & Imports

  • Screens lazy loaded per navigation stack
  • No full-library imports for a single function (import only what is used)
  • No synchronous storage reads on mount that block the first render

Memory & Resources

This skill owns timers, intervals, and event listeners. Cancelling an in-flight request is owned by state-and-data.

  • Timers and intervals cleared on unmount
  • Event listeners removed on cleanup
  • Caches have a max size and an eviction policy

Incorrect:

useEffect(() => {
  const interval = setInterval(pollStatus, 5000);
  // No cleanup — keeps running after unmount
}, []);

Correct:

useEffect(() => {
  const interval = setInterval(pollStatus, 5000);
  return () => clearInterval(interval);
}, []);

Anti-Patterns

Anti-Pattern Risk Fix
Plain list for a list that can grow without bound Frame drops Virtualise (a virtualised list such as FlashList when the default list is not enough)
Frequent reads from slow storage Blocks JS thread Use a fast key-value store (e.g. MMKV)
Animated API for complex animations JS-thread jank Use Reanimated
New style object on every row render Extra work in a long list Stable styles, for example StyleSheet.create or a module-level object
Over-memoising trivial components Adds overhead with no benefit Measure first, memoise hotspots

Pitfalls

  • Over-memoising simple components costs more than it saves — measure before optimising.
  • useMemo or useCallback with the wrong dependency array silently returns stale values.
  • Memory leaks compound over a long session (users keep apps open for hours), so cleanup matters even for short-lived screens.
  • An AbortController must be created per request, not shared across calls.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The skill provides standard coding guidelines and best practices for React Native performance optimization and contains no security risks.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at eb9f097. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 2 months ago
version
1.2.0
platforms
[
  "ios",
  "android"
]
react-native-version
0.76+
Other metadata
tags
[
  "react-native",
  "performance",
  "memory",
  "rendering"
]

README badge

README badge for neha/rn-developer-skills/performance