/erne-universal:performance-optimizationfrom erne-universal
Diagnoses and optimizes React Native app performance: bundle size, rendering, animations, images, and memory. Use when apps feel slow, janky, or have high memory usage.
Ships in erne-universal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are performing a systematic performance diagnosis on a React Native application. Follow this step-by-step process.
Invoke when:
| Symptom | Likely Cause | First Check |
|---|---|---|
| Slow startup | Large bundle, heavy init | Bundle size, eager imports |
| Janky scrolling | List renderer, heavy cells | FlatList vs FlashList, cell complexity |
| Stuttering animations | JS thread blocking | Worklets, useAnimatedStyle |
| High memory | Leaks, large images | Image caching, subscription cleanup |
| Slow navigation | Heavy screens, eager loading | Lazy loading, screen weight |
Bundle Analysis:
npx react-native-bundle-visualizer
# or for Expo:
npx expo export --dump-sourcemap
Target: < 1.5MB JavaScript bundle
FPS Monitoring:
useFrameCallback from ReanimatedTTI (Time to Interactive):
Memory:
Bundle Size:
React.lazy() with SuspenseRendering:
FlatList with FlashList + estimatedItemSizeReact.memouseCallback for event handlers passed to childrenAnimations:
useAnimatedStyle instead of inline animated valueswithSequence/withDelaycancelAnimation for cleanupImages:
expo-image with cachePolicy="memory-disk"Memory:
useEffect returnRe-measure after each optimization:
## Performance Report
| Metric | Before | After | Target | Status |
|--------|--------|-------|--------|--------|
| Bundle size | 2.1MB | 1.4MB | <1.5MB | PASS |
| TTI | 3.2s | 1.8s | <2s | PASS |
| List FPS | 45fps | 60fps | 60fps | PASS |
| Memory (5min) | +80MB | +12MB | <20MB | PASS |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: hooks: PreToolUse/PermissionRequest hooks are declared at the top level outside "hooks" (or under an unrecognized key) — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed, author: Invalid input: expected object, received string
.claude-plugin/plugin.json: hooks: PreToolUse/PermissionRequest hooks are declared at the top level outside "hooks" (or under an unrecognized key) — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed, author: Invalid input: expected object, received string
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
8 skills in this plugin
/coding-standardsEnforce React Native coding standards as an actionable workflow/continuous-learning-v2Auto-generate skills and rules from observed React Native development patterns/higApple HIG design intelligence — build, review, animate, and analyze with Apple Human Interface Guidelines for React Native/Expo/native-module-scaffoldGuided wizard for creating Turbo Modules and Expo Modules with iOS and Android implementations/security-reviewMobile security audit for React Native applications/tdd-workflowTest-driven development workflow for React Native — Jest, React Native Testing Library, and DetoxOther plugins' skills for the same job